fix(企标稽查计划流程): 80804
This commit is contained in:
+27
-22
@@ -373,6 +373,8 @@ public class EsInspectPlanFlowServiceImpl implements IEsInspectPlanFlowService {
|
|||||||
saveCountersign(esInspectPlanFlowVO, map);
|
saveCountersign(esInspectPlanFlowVO, map);
|
||||||
// 处理业务表数据
|
// 处理业务表数据
|
||||||
handleBusinessData(esInspectPlanFlowVO);
|
handleBusinessData(esInspectPlanFlowVO);
|
||||||
|
// 获取稽查联络人
|
||||||
|
String liaisons = taskService.getVariable(task.getId(), "liaisons", String.class);
|
||||||
// 完成任务
|
// 完成任务
|
||||||
taskService.complete(task.getId(), map);
|
taskService.complete(task.getId(), map);
|
||||||
// 再次更新流程审批信息
|
// 再次更新流程审批信息
|
||||||
@@ -400,28 +402,36 @@ public class EsInspectPlanFlowServiceImpl implements IEsInspectPlanFlowService {
|
|||||||
// 判断是否是最后一个节点
|
// 判断是否是最后一个节点
|
||||||
if (isLastNode(processAll.getProcessInstanceId())
|
if (isLastNode(processAll.getProcessInstanceId())
|
||||||
&& map.containsKey("pass") && (boolean) map.get("pass")){
|
&& map.containsKey("pass") && (boolean) map.get("pass")){
|
||||||
|
|
||||||
|
// 企标稽查计划业务表数据
|
||||||
|
List<ProcessEsInspectPlan> processEsInspectPlanList = processEsInspectPlanService.list(
|
||||||
|
new LambdaQueryWrapper<ProcessEsInspectPlan>()
|
||||||
|
.eq(ProcessEsInspectPlan::getProjectId, processAll.getProjectId()));
|
||||||
|
|
||||||
// 企标稽查计划 生成数据 保存企标库
|
// 企标稽查计划 生成数据 保存企标库
|
||||||
saveDataToInspect(processAll.getProjectId());
|
saveDataToInspect(processEsInspectPlanList);
|
||||||
// 抄送消息 通过hiwork 给稽查联络人抄送消息
|
try {
|
||||||
List<ProcessNode> processNodeList = queryPersonInfo(EsInspectPlanCommon.NAME, processAll.getProcessInstanceId());
|
// 抄送消息 通过hiwork 给稽查联络人抄送消息
|
||||||
if (!processNodeList.isEmpty()){
|
sendMessage(processAll, liaisons);
|
||||||
Optional<ProcessNode> first = processNodeList.stream().findFirst();
|
}catch (Exception e){
|
||||||
first.ifPresent(v -> {
|
log.error("邮件发送失败:{}", e.getMessage());
|
||||||
SendMessageDTO sendMessageDTO = new SendMessageDTO();
|
|
||||||
sendMessageDTO.setTemplateCode(MessageTemplateCodeCommon.ES_INSPECT_PLAN);
|
|
||||||
sendMessageDTO.setToUserId(v.getLinkUserIds());
|
|
||||||
Map<String, String> sendMap = new HashMap<>();
|
|
||||||
ProcessAll process = processAllService.getByProcessInstanceId(processAll.getProcessInstanceId());
|
|
||||||
sendMap.put("prcNum", process.getPrcNum());
|
|
||||||
sendMap.put("prcName", process.getPrcName());
|
|
||||||
sendMessageDTO.setMap(sendMap);
|
|
||||||
sendMessageAPI.sendMessage(sendMessageDTO);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void sendMessage(ProcessAll processAll, String liaisons) {
|
||||||
|
SendMessageDTO sendMessageDTO = new SendMessageDTO();
|
||||||
|
sendMessageDTO.setTemplateCode(MessageTemplateCodeCommon.ES_INSPECT_PLAN);
|
||||||
|
sendMessageDTO.setToUserId(liaisons);
|
||||||
|
Map<String, String> sendMap = new HashMap<>();
|
||||||
|
ProcessAll process = processAllService.getByProcessInstanceId(processAll.getProcessInstanceId());
|
||||||
|
sendMap.put("prcNum", process.getPrcNum());
|
||||||
|
sendMap.put("prcName", process.getPrcName());
|
||||||
|
sendMessageDTO.setMap(sendMap);
|
||||||
|
sendMessageAPI.sendMessage(sendMessageDTO);
|
||||||
|
}
|
||||||
|
|
||||||
private static void saveCountersign(EsInspectPlanFlowVO esInspectPlanFlowVO, Map<String, Object> map) {
|
private static void saveCountersign(EsInspectPlanFlowVO esInspectPlanFlowVO, Map<String, Object> map) {
|
||||||
if (map.containsKey("pass") && (boolean) map.get("pass")){
|
if (map.containsKey("pass") && (boolean) map.get("pass")){
|
||||||
if (StringUtils.isNotBlank(esInspectPlanFlowVO.getCountersign())){
|
if (StringUtils.isNotBlank(esInspectPlanFlowVO.getCountersign())){
|
||||||
@@ -433,12 +443,7 @@ public class EsInspectPlanFlowServiceImpl implements IEsInspectPlanFlowService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveDataToInspect(String projectId) {
|
private void saveDataToInspect(List<ProcessEsInspectPlan> processEsInspectPlanList) {
|
||||||
// 企标稽查计划业务表数据
|
|
||||||
List<ProcessEsInspectPlan> processEsInspectPlanList = processEsInspectPlanService.list(
|
|
||||||
new LambdaQueryWrapper<ProcessEsInspectPlan>()
|
|
||||||
.eq(ProcessEsInspectPlan::getProjectId, projectId));
|
|
||||||
|
|
||||||
List<EnterpriseStandardInspect> list = new ArrayList<>();
|
List<EnterpriseStandardInspect> list = new ArrayList<>();
|
||||||
List<EnterpriseStandardInspectObject> objectList = new ArrayList<>();
|
List<EnterpriseStandardInspectObject> objectList = new ArrayList<>();
|
||||||
for (ProcessEsInspectPlan processEsInspectPlan : processEsInspectPlanList) {
|
for (ProcessEsInspectPlan processEsInspectPlan : processEsInspectPlanList) {
|
||||||
|
|||||||
Reference in New Issue
Block a user