fix(征求意见流程): 设计工程师填写征求意见问题修复
This commit is contained in:
+46
-38
@@ -444,7 +444,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
|||||||
});
|
});
|
||||||
|
|
||||||
setUserName(userLink);
|
setUserName(userLink);
|
||||||
|
processFbStandardConsultationVO.setProcessFbConsultationUserLink(userLink);
|
||||||
return processInfoVO;
|
return processInfoVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -618,27 +618,31 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
|||||||
|
|
||||||
String userLinkId = task.getFormKey();
|
String userLinkId = task.getFormKey();
|
||||||
log.info("userLinkId: {}", userLinkId);
|
log.info("userLinkId: {}", userLinkId);
|
||||||
ProcessFbConsultationUserLink processFbConsultationUserLink = processFbConsultationUserLinkService.getById(userLinkId);
|
processFbConsultationUserLinkService.update(
|
||||||
|
new LambdaUpdateWrapper<ProcessFbConsultationUserLink>()
|
||||||
|
.eq(ProcessFbConsultationUserLink::getId, userLinkId)
|
||||||
|
.set(ProcessFbConsultationUserLink::getDesignEngineerId, designEngineerId));
|
||||||
|
// ProcessFbConsultationUserLink processFbConsultationUserLink = processFbConsultationUserLinkService.getById(userLinkId);
|
||||||
|
//
|
||||||
List<String> designEngineerIdList = Arrays.asList(designEngineerId.split(","));
|
List<String> designEngineerIdList = Arrays.asList(designEngineerId.split(","));
|
||||||
List<ProcessFbConsultationUserLink> userLinkList = new ArrayList<>();
|
// List<ProcessFbConsultationUserLink> userLinkList = new ArrayList<>();
|
||||||
|
//
|
||||||
|
// designEngineerIdList.forEach(designEngineer -> {
|
||||||
|
// ProcessFbConsultationUserLink userLink = new ProcessFbConsultationUserLink();
|
||||||
|
// userLink.setUserType(FbCommon.USER_TYPE_MODULE_OWNER);
|
||||||
|
// userLink.setBusinessId(processFbConsultationUserLink.getBusinessId());
|
||||||
|
// userLink.setDepartLeaderId(processFbConsultationUserLink.getDepartLeaderId());
|
||||||
|
// userLink.setModuleOwnerId(processFbConsultationUserLink.getModuleOwnerId());
|
||||||
|
// userLink.setDesignEngineerId(designEngineer);
|
||||||
|
// userLinkList.add(userLink);
|
||||||
|
// });
|
||||||
|
//
|
||||||
|
// processFbConsultationUserLinkService.removeById(userLinkId); // 先删除
|
||||||
|
// processFbConsultationUserLinkService.saveBatch(userLinkList, userLinkList.size()); // 后新增
|
||||||
|
|
||||||
designEngineerIdList.forEach(designEngineer -> {
|
// List<String> idList = userLinkList.stream().map(ProcessFbConsultationUserLink::getId).collect(Collectors.toList());
|
||||||
ProcessFbConsultationUserLink userLink = new ProcessFbConsultationUserLink();
|
|
||||||
userLink.setUserType(FbCommon.USER_TYPE_MODULE_OWNER);
|
|
||||||
userLink.setBusinessId(processFbConsultationUserLink.getBusinessId());
|
|
||||||
userLink.setDepartLeaderId(processFbConsultationUserLink.getDepartLeaderId());
|
|
||||||
userLink.setModuleOwnerId(processFbConsultationUserLink.getModuleOwnerId());
|
|
||||||
userLink.setDesignEngineerId(designEngineer);
|
|
||||||
userLinkList.add(userLink);
|
|
||||||
});
|
|
||||||
|
|
||||||
processFbConsultationUserLinkService.removeById(userLinkId); // 先删除
|
|
||||||
processFbConsultationUserLinkService.saveBatch(userLinkList, userLinkList.size()); // 后新增
|
|
||||||
|
|
||||||
List<String> idList = userLinkList.stream().map(ProcessFbConsultationUserLink::getId).collect(Collectors.toList());
|
|
||||||
String processInstanceId = task.getProcessInstanceId();
|
String processInstanceId = task.getProcessInstanceId();
|
||||||
runtimeService.setVariableLocal(processInstanceId, FbCommon.VARIABLE_DESIGN_ENGINEER_LIST, idList);
|
runtimeService.setVariableLocal(processInstanceId, FbCommon.VARIABLE_DESIGN_ENGINEER_LIST, designEngineerIdList);
|
||||||
saveNodeUserLink(processInstanceId, ConsultationNodeSort.DESIGN_ENGINEER_LIST, designEngineerIdList);
|
saveNodeUserLink(processInstanceId, ConsultationNodeSort.DESIGN_ENGINEER_LIST, designEngineerIdList);
|
||||||
|
|
||||||
// 完成任务
|
// 完成任务
|
||||||
@@ -660,26 +664,30 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
|||||||
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
|
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
|
||||||
|
|
||||||
String userLinkId = task.getFormKey();
|
String userLinkId = task.getFormKey();
|
||||||
ProcessFbConsultationUserLink processFbConsultationUserLink = processFbConsultationUserLinkService.getById(userLinkId);
|
processFbConsultationUserLinkService.update(
|
||||||
|
new LambdaUpdateWrapper<ProcessFbConsultationUserLink>()
|
||||||
|
.eq(ProcessFbConsultationUserLink::getId, userLinkId)
|
||||||
|
.set(ProcessFbConsultationUserLink::getDesignEngineerId, designEngineerId));
|
||||||
|
// ProcessFbConsultationUserLink processFbConsultationUserLink = processFbConsultationUserLinkService.getById(userLinkId);
|
||||||
|
// List<String> designEngineerIdList = Arrays.asList(designEngineerId.split(","));
|
||||||
|
// List<ProcessFbConsultationUserLink> userLinkList = new ArrayList<>();
|
||||||
|
|
||||||
List<String> designEngineerIdList = Arrays.asList(designEngineerId.split(","));
|
// designEngineerIdList.forEach(designEngineer -> {
|
||||||
List<ProcessFbConsultationUserLink> userLinkList = new ArrayList<>();
|
// ProcessFbConsultationUserLink userLink = new ProcessFbConsultationUserLink();
|
||||||
|
// userLink.setUserType(FbCommon.USER_TYPE_MODULE_OWNER);
|
||||||
designEngineerIdList.forEach(designEngineer -> {
|
// userLink.setBusinessId(processFbConsultationUserLink.getBusinessId());
|
||||||
ProcessFbConsultationUserLink userLink = new ProcessFbConsultationUserLink();
|
// userLink.setBusinessId(processInfoVO.getBusinessId());
|
||||||
userLink.setUserType(FbCommon.USER_TYPE_MODULE_OWNER);
|
// userLink.setDepartLeaderId(processFbConsultationUserLink.getDepartLeaderId());
|
||||||
userLink.setBusinessId(processFbConsultationUserLink.getBusinessId());
|
// userLink.setModuleOwnerId(processFbConsultationUserLink.getModuleOwnerId());
|
||||||
userLink.setDepartLeaderId(processFbConsultationUserLink.getDepartLeaderId());
|
// userLink.setDesignEngineerId(designEngineer);
|
||||||
userLink.setModuleOwnerId(processFbConsultationUserLink.getModuleOwnerId());
|
// userLinkList.add(userLink);
|
||||||
userLink.setDesignEngineerId(designEngineer);
|
// });
|
||||||
userLinkList.add(userLink);
|
//
|
||||||
});
|
// int size = userLinkList.size();
|
||||||
|
// if (size > 0) {
|
||||||
int size = userLinkList.size();
|
// processFbConsultationUserLinkService.removeById(userLinkId); // 先删除
|
||||||
if (size > 0) {
|
// processFbConsultationUserLinkService.saveBatch(userLinkList, size); // 后新增
|
||||||
processFbConsultationUserLinkService.removeById(userLinkId); // 先删除
|
// }
|
||||||
processFbConsultationUserLinkService.saveBatch(userLinkList, size); // 后新增
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user