|
@@ -81,6 +81,8 @@ public class MiddleMeterApplyServiceImpl extends BaseServiceImpl<MiddleMeterAppl
|
|
|
|
|
|
private final MeterContractInfoService meterContractInfoService;
|
|
|
|
|
|
+ private final IAttachmentFormServiceTask attachmentFormServiceTask;
|
|
|
+
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -1013,6 +1015,7 @@ public class MiddleMeterApplyServiceImpl extends BaseServiceImpl<MiddleMeterAppl
|
|
|
List<AttachmentForm> files = new ArrayList<>();
|
|
|
for (InformationQuery query : list) {
|
|
|
AttachmentForm form = new AttachmentForm();
|
|
|
+ form.setId(SnowFlakeUtil.getId());
|
|
|
form.setFileType(1);
|
|
|
form.setProjectId(apply.getProjectId());
|
|
|
form.setContractId(apply.getContractId());
|
|
@@ -1033,11 +1036,20 @@ public class MiddleMeterApplyServiceImpl extends BaseServiceImpl<MiddleMeterAppl
|
|
|
}
|
|
|
//保存附件
|
|
|
attachmentFormService.saveBatch(files);
|
|
|
+ //为task附件表同步附件
|
|
|
+ List<AttachmentFormTask> taskList = files.stream().map(l -> {
|
|
|
+ AttachmentFormTask formTask = new AttachmentFormTask();
|
|
|
+ BeanUtils.copyProperties(l, formTask);
|
|
|
+ formTask.setTaskId(task.getId());
|
|
|
+ return formTask;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ attachmentFormServiceTask.saveBatch(taskList);
|
|
|
//修改中间计量申请的关联状态
|
|
|
this.update(new LambdaUpdateWrapper<MiddleMeterApply>()
|
|
|
.eq(MiddleMeterApply::getId,id)
|
|
|
.set(MiddleMeterApply::getIsLinkData,1));
|
|
|
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|