update 标准征求意见流程
This commit is contained in:
+128
-4
@@ -239,8 +239,6 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
String taskId = taskInfoDTO.getTaskId();
|
||||
|
||||
ProcessFbStandardConsultation processFbStandardConsultation = businessInfoDTO.getProcessFbStandardConsultation();
|
||||
ProcessFbConsultationUserLink processFbConsultationUserLink = businessInfoDTO.getProcessFbConsultationUserLink();
|
||||
List<ProcessFbConsultationList> processFbConsultationLists = businessInfoDTO.getProcessFbConsultationLists();
|
||||
|
||||
if (StringUtils.isBlank(taskId)) { // 法规工程师发起
|
||||
saveOrUpdate(processFbStandardConsultation);
|
||||
@@ -248,21 +246,25 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
|
||||
String taskDefinitionKey = task.getTaskDefinitionKey();
|
||||
switch (taskDefinitionKey) {
|
||||
case ConsultationTaskKey.DEPART_LEADER_START_1: // 各部所主管级领导分发
|
||||
case ConsultationTaskKey.DEPART_LEADER_START_1:
|
||||
processDepartLeaderStart_1_draft(processInfoVO); // 各部所主管级领导分发
|
||||
break;
|
||||
case ConsultationTaskKey.DESIGN_ENGINEER_1: // 设计工程师填写征求意见(分发给模块负责人)
|
||||
case ConsultationTaskKey.DESIGN_ENGINEER_2: // 设计工程师填写征求意见(不分发给模块负责人)
|
||||
designEngineer_draft(processInfoVO);
|
||||
break;
|
||||
case ConsultationTaskKey.MODULE_OWNER_END_1: // 模块负责人汇总填写意见(可跳过)
|
||||
case ConsultationTaskKey.MODULE_OWNER_END_2: // 模块负责人汇总填写意见(主管级领导驳回后)
|
||||
case ConsultationTaskKey.MODULE_OWNER_END_3: // 法规工程师审批驳回后的子流程中的模块负责人汇总
|
||||
case ConsultationTaskKey.DEPART_LEADER_COLLECT_3: // 法规工程师审批驳回后的子流程中的各部所主管级领导汇总
|
||||
case ConsultationTaskKey.DEPART_LEADER_COLLECT_2: // 各部所主管级领导汇总(不分发给模块负责人)
|
||||
collect_draft(processInfoVO);
|
||||
break;
|
||||
case ConsultationTaskKey.MODULE_OWNER_START: // 模块负责人分发
|
||||
moduleOwnerStart_draft(processInfoVO);
|
||||
break;
|
||||
default:
|
||||
throw new JeroBootException("目前还未开发,请联系管理员");
|
||||
log.info("taskDefinitionKey:{},没有业务数据保存", taskDefinitionKey);
|
||||
}
|
||||
}
|
||||
processInfoVO.setBusinessId(processFbStandardConsultation.getId());
|
||||
@@ -479,6 +481,41 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
taskService.complete(taskId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author: liao
|
||||
* @Date: 2023/11/28 10:43
|
||||
* @Description: 模块负责人分发-草稿
|
||||
**/
|
||||
private void moduleOwnerStart_draft(ProcessInfoVO<ProcessFbStandardConsultationVO> processInfoVO) {
|
||||
ProcessFbStandardConsultationVO businessInfoDTO = processInfoVO.getBusinessInfoDTO(); // 全部业务信息
|
||||
String designEngineerId = businessInfoDTO.getProcessFbConsultationUserLink().getDesignEngineerId();
|
||||
|
||||
if (StringUtils.isBlank(designEngineerId)) return;
|
||||
|
||||
String taskId = processInfoVO.getBasicTaskInfoDTO().getTaskId();
|
||||
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
|
||||
|
||||
String userLinkId = task.getFormKey();
|
||||
ProcessFbConsultationUserLink processFbConsultationUserLink = processFbConsultationUserLinkService.getById(userLinkId);
|
||||
|
||||
List<String> designEngineerIdList = Arrays.asList(designEngineerId.split(","));
|
||||
List<ProcessFbConsultationUserLink> userLinkList = new ArrayList<>();
|
||||
|
||||
designEngineerIdList.forEach(designEngineer -> {
|
||||
ProcessFbConsultationUserLink userLink = new ProcessFbConsultationUserLink();
|
||||
userLink.setUserType("1");
|
||||
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()); // 后新增
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Author: liao
|
||||
* @Date: 2023/11/21 9:39
|
||||
@@ -500,6 +537,19 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
taskService.complete(taskId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author: liao
|
||||
* @Date: 2023/11/28 10:34
|
||||
* @Description: 汇总-草稿
|
||||
**/
|
||||
private void collect_draft(ProcessInfoVO<ProcessFbStandardConsultationVO> processInfoVO) {
|
||||
ProcessFbStandardConsultationVO businessInfoDTO = processInfoVO.getBusinessInfoDTO(); // 全部业务信息
|
||||
List<ProcessFbConsultationList> processFbConsultationLists = businessInfoDTO.getProcessFbConsultationLists();
|
||||
if (CollectionUtils.isNotEmpty(processFbConsultationLists)) {
|
||||
processFbConsultationListService.updateBatchById(processFbConsultationLists); // 更新业务信息
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author: liao
|
||||
* @Date: 2023/11/16 15:46
|
||||
@@ -536,6 +586,38 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
taskService.complete(taskId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author: liao
|
||||
* @Date: 2023/11/28 10:30
|
||||
* @Description: 设计工程师填写征求意见-草稿
|
||||
**/
|
||||
private void designEngineer_draft(ProcessInfoVO<ProcessFbStandardConsultationVO> processInfoVO) {
|
||||
ProcessFbStandardConsultationVO businessInfoDTO = processInfoVO.getBusinessInfoDTO(); // 全部业务信息
|
||||
List<ProcessFbConsultationList> processFbConsultationLists = businessInfoDTO.getProcessFbConsultationLists();
|
||||
String businessId = processInfoVO.getBusinessId();
|
||||
|
||||
String taskId = processInfoVO.getBasicTaskInfoDTO().getTaskId();
|
||||
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
|
||||
|
||||
String userLinkId = task.getFormKey();
|
||||
|
||||
// 先删除存储的数据
|
||||
LambdaQueryWrapper<ProcessFbConsultationList> removeWrapper = new LambdaQueryWrapper<>();
|
||||
removeWrapper.eq(ProcessFbConsultationList::getUserLinkId, userLinkId);
|
||||
processFbConsultationListService.remove(removeWrapper);
|
||||
|
||||
String designEngineerName = CurrentUserUtil.getRealName() + "(" + CurrentUserUtil.getUsername() + ")";
|
||||
// 保存业务信息
|
||||
if (CollectionUtils.isNotEmpty(processFbConsultationLists)) {
|
||||
processFbConsultationLists.forEach(consultation -> {
|
||||
consultation.setUserLinkId(userLinkId);
|
||||
consultation.setBusinessId(businessId);
|
||||
consultation.setDesignEngineerName(designEngineerName);
|
||||
});
|
||||
processFbConsultationListService.saveBatch(processFbConsultationLists, processFbConsultationLists.size());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author: liao
|
||||
* @Date: 2023/11/14 9:35
|
||||
@@ -597,6 +679,48 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
taskService.complete(taskId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author: liao
|
||||
* @Date: 2023/11/28 10:25
|
||||
* @Description: 各部所主管级领导分发-保存草稿
|
||||
**/
|
||||
private void processDepartLeaderStart_1_draft(ProcessInfoVO<ProcessFbStandardConsultationVO> processInfoVO) {
|
||||
ProcessFbStandardConsultationVO businessInfoDTO = processInfoVO.getBusinessInfoDTO(); // 全部业务信息
|
||||
ProcessFbConsultationUserLink userLink = businessInfoDTO.getProcessFbConsultationUserLink(); // 业务分派信息
|
||||
|
||||
LambdaQueryWrapper<ProcessFbConsultationUserLink> removeWrapper = new LambdaQueryWrapper<>();
|
||||
removeWrapper.eq(ProcessFbConsultationUserLink::getBusinessId, processInfoVO.getBusinessId());
|
||||
removeWrapper.eq(ProcessFbConsultationUserLink::getDepartLeaderId, CurrentUserUtil.getId());
|
||||
processFbConsultationUserLinkService.remove(removeWrapper); // 删除原先存储的关联
|
||||
|
||||
List<ProcessFbConsultationUserLink> linkList = new ArrayList<>();
|
||||
if ("1".equals(userLink.getUserType())) { // 模块负责人
|
||||
if (StringUtils.isBlank(userLink.getModuleOwnerId())) return;
|
||||
List<String> moduleOwnerIds = Arrays.asList(userLink.getModuleOwnerId().split(","));
|
||||
moduleOwnerIds.forEach(moduleOwnerId -> {
|
||||
ProcessFbConsultationUserLink link = new ProcessFbConsultationUserLink();
|
||||
link.setUserType("1");
|
||||
link.setBusinessId(processInfoVO.getBusinessId());
|
||||
link.setDepartLeaderId(CurrentUserUtil.getId());
|
||||
link.setModuleOwnerId(moduleOwnerId);
|
||||
linkList.add(link);
|
||||
});
|
||||
processFbConsultationUserLinkService.saveBatch(linkList, linkList.size());
|
||||
} else { // 设计工程师
|
||||
if (StringUtils.isBlank(userLink.getDesignEngineerId())) return;
|
||||
List<String> designEngineerIds = Arrays.asList(userLink.getDesignEngineerId().split(","));
|
||||
designEngineerIds.forEach(designEngineerId -> {
|
||||
ProcessFbConsultationUserLink link = new ProcessFbConsultationUserLink();
|
||||
link.setUserType("2");
|
||||
link.setBusinessId(processInfoVO.getBusinessId());
|
||||
link.setDepartLeaderId(CurrentUserUtil.getId());
|
||||
link.setDesignEngineerId(designEngineerId);
|
||||
linkList.add(link);
|
||||
});
|
||||
processFbConsultationUserLinkService.saveBatch(linkList, linkList.size());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author: liao
|
||||
* @Date: 2023/11/17 15:09
|
||||
|
||||
Reference in New Issue
Block a user