update 标准征求意见流程
This commit is contained in:
-12
@@ -1,12 +0,0 @@
|
|||||||
package com.jero.modules.activiti.process.fb.common;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author: liao
|
|
||||||
* @Date: 2023/11/28 11:41
|
|
||||||
* @Description: 常量
|
|
||||||
*/
|
|
||||||
public class ConsultationCommon {
|
|
||||||
|
|
||||||
public static final String USER_TYPE_MODULE_OWNER = "1"; // 模块负责人
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.jero.modules.activiti.process.fb.common;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: liao
|
||||||
|
* @Date: 2023/11/28 11:41
|
||||||
|
* @Description: 常量
|
||||||
|
*/
|
||||||
|
public class FbCommon {
|
||||||
|
|
||||||
|
public static final String USER_TYPE_MODULE_OWNER = "1"; // 模块负责人
|
||||||
|
public static final String USER_TYPE_DESIGN_ENGINEER = "2"; // 设计工程师
|
||||||
|
|
||||||
|
public static final String VARIABLE_ENGINEER = "engineer"; // 法规工程师
|
||||||
|
public static final String VARIABLE_DEPART_LEADER_LIST = "departLeaderList"; // 各部所主管级领导
|
||||||
|
public static final String VARIABLE_MODULE_OWNER_LIST = "moduleOwnerList"; // 模块负责人
|
||||||
|
public static final String VARIABLE_MODULE_OWNER_ID = "moduleOwnerId"; // 模块负责人
|
||||||
|
public static final String VARIABLE_DESIGN_ENGINEER_LIST = "designEngineerList"; // 设计工程师
|
||||||
|
public static final String VARIABLE_DESIGN_ENGINEER_ID = "designEngineerId"; // 设计工程师
|
||||||
|
public static final String VARIABLE_PASS_FIRST = "passFirst"; // 主管级领导是否分发
|
||||||
|
public static final String VARIABLE_PASS_SECOND = "passSecond"; // 主管级领导审批是否通过
|
||||||
|
public static final String VARIABLE_PASS_THIRD = "passThird"; // 法规工程师审批是否通过
|
||||||
|
|
||||||
|
}
|
||||||
-22
@@ -1,22 +0,0 @@
|
|||||||
package com.jero.modules.activiti.process.fb.common;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author: liao
|
|
||||||
* @Date: 2023/11/13 10:06
|
|
||||||
* @Description: 流程用户类型
|
|
||||||
*/
|
|
||||||
public class ProcessUserType {
|
|
||||||
|
|
||||||
private ProcessUserType() {}
|
|
||||||
|
|
||||||
public static final String ENGINEER = "engineer"; // 法规工程师
|
|
||||||
|
|
||||||
public static final String DEPART_LEADER = "departLeader"; // 部所主管级领导
|
|
||||||
|
|
||||||
public static final String MODULE_OWNER = "moduleOwner"; // 模块负责人
|
|
||||||
|
|
||||||
public static final String DESIGN_ENGINEER = "designEngineer"; // 设计工程师
|
|
||||||
|
|
||||||
public static final String OTHER = "other"; // 其他
|
|
||||||
|
|
||||||
}
|
|
||||||
+4
-1
@@ -3,6 +3,7 @@ package com.jero.modules.activiti.process.fb.entity;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -67,10 +68,12 @@ public class ProcessFbConsultationList implements Serializable {
|
|||||||
@Excel(name = "修改理由", width = 15)
|
@Excel(name = "修改理由", width = 15)
|
||||||
@ApiModelProperty(value = "修改理由")
|
@ApiModelProperty(value = "修改理由")
|
||||||
private java.lang.String modificationReason;
|
private java.lang.String modificationReason;
|
||||||
/**模块负责人意见(0不采纳,1采纳)*/
|
/**模块负责人意见(1采纳,2部分采纳,3不采纳)*/
|
||||||
@Excel(name = "模块负责人意见(1采纳,2部分采纳,3不采纳)", width = 15)
|
@Excel(name = "模块负责人意见(1采纳,2部分采纳,3不采纳)", width = 15)
|
||||||
@ApiModelProperty(value = "模块负责人意见(1采纳,2部分采纳,3不采纳)")
|
@ApiModelProperty(value = "模块负责人意见(1采纳,2部分采纳,3不采纳)")
|
||||||
private java.lang.String isAdopt;
|
private java.lang.String isAdopt;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private java.lang.String isAdopt_dictText;
|
||||||
/**依据描述*/
|
/**依据描述*/
|
||||||
@Excel(name = "依据描述", width = 15)
|
@Excel(name = "依据描述", width = 15)
|
||||||
@ApiModelProperty(value = "依据描述")
|
@ApiModelProperty(value = "依据描述")
|
||||||
|
|||||||
+51
-33
@@ -7,7 +7,7 @@ import com.jero.modules.activiti.entity.ProcessNode;
|
|||||||
import com.jero.modules.activiti.entity.ProcessNodeLink;
|
import com.jero.modules.activiti.entity.ProcessNodeLink;
|
||||||
import com.jero.modules.activiti.enums.CommitFlagEnum;
|
import com.jero.modules.activiti.enums.CommitFlagEnum;
|
||||||
import com.jero.modules.activiti.enums.ProcessTypeEnum;
|
import com.jero.modules.activiti.enums.ProcessTypeEnum;
|
||||||
import com.jero.modules.activiti.process.fb.common.ConsultationCommon;
|
import com.jero.modules.activiti.process.fb.common.FbCommon;
|
||||||
import com.jero.modules.activiti.process.fb.common.ConsultationNodeSort;
|
import com.jero.modules.activiti.process.fb.common.ConsultationNodeSort;
|
||||||
import com.jero.modules.activiti.process.fb.common.ConsultationTaskKey;
|
import com.jero.modules.activiti.process.fb.common.ConsultationTaskKey;
|
||||||
import com.jero.modules.activiti.process.fb.common.ProcessDefinitionKey;
|
import com.jero.modules.activiti.process.fb.common.ProcessDefinitionKey;
|
||||||
@@ -30,7 +30,6 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.activiti.engine.RuntimeService;
|
import org.activiti.engine.RuntimeService;
|
||||||
import org.activiti.engine.TaskService;
|
import org.activiti.engine.TaskService;
|
||||||
import org.activiti.engine.runtime.Execution;
|
import org.activiti.engine.runtime.Execution;
|
||||||
import org.activiti.engine.runtime.ProcessInstance;
|
|
||||||
import org.activiti.engine.task.Task;
|
import org.activiti.engine.task.Task;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@@ -69,6 +68,8 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
|||||||
private ProcessNodeService processNodeService;
|
private ProcessNodeService processNodeService;
|
||||||
@Resource
|
@Resource
|
||||||
private ProcessNodeLinkService processNodeLinkService;
|
private ProcessNodeLinkService processNodeLinkService;
|
||||||
|
|
||||||
|
public static final String EXCEPTION = "目前还未开发,请联系管理员";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: liao
|
* @Author: liao
|
||||||
@@ -84,11 +85,11 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
|||||||
processInfoVO.setBusinessId(businessInfoDTO.getId());
|
processInfoVO.setBusinessId(businessInfoDTO.getId());
|
||||||
|
|
||||||
Map<String, Object> userInfoMap = processInfoVO.getUserInfoMap(); // 用户变量map
|
Map<String, Object> userInfoMap = processInfoVO.getUserInfoMap(); // 用户变量map
|
||||||
String departLeaders = (String) userInfoMap.get("departLeaderList");
|
String departLeaders = (String) userInfoMap.get(FbCommon.VARIABLE_DEPART_LEADER_LIST);
|
||||||
if (StringUtils.isBlank(departLeaders)) {
|
if (StringUtils.isBlank(departLeaders)) {
|
||||||
throw new JeroBootException(ResultCommon.EMPTY_COMMON, "departLeaderList");
|
throw new JeroBootException(ResultCommon.EMPTY_COMMON, FbCommon.VARIABLE_DEPART_LEADER_LIST);
|
||||||
}
|
}
|
||||||
userInfoMap.put("engineer", CurrentUserUtil.getId()); // 第一个任务节点设置成自己
|
userInfoMap.put(FbCommon.VARIABLE_ENGINEER, CurrentUserUtil.getId()); // 第一个任务节点设置成自己
|
||||||
BasicProcessInfoDTO basicProcessInfoDTO = processInfoVO.getBasicProcessInfoDTO();
|
BasicProcessInfoDTO basicProcessInfoDTO = processInfoVO.getBasicProcessInfoDTO();
|
||||||
basicProcessInfoDTO.setProcessDefinitionId(processHandleService.getDefinitionIdByKey(ProcessDefinitionKey.FB_STANDARD_CONSULTATION)); // 流程定义id
|
basicProcessInfoDTO.setProcessDefinitionId(processHandleService.getDefinitionIdByKey(ProcessDefinitionKey.FB_STANDARD_CONSULTATION)); // 流程定义id
|
||||||
basicProcessInfoDTO.setProcessName(businessInfoDTO.getStandardNumber() + "-" + businessInfoDTO.getStandardName() + "-" + "征求意见"); // 流程名称
|
basicProcessInfoDTO.setProcessName(businessInfoDTO.getStandardNumber() + "-" + businessInfoDTO.getStandardName() + "-" + "征求意见"); // 流程名称
|
||||||
@@ -145,13 +146,13 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
|||||||
switch (taskDefinitionKey) {
|
switch (taskDefinitionKey) {
|
||||||
case ConsultationTaskKey.DEPART_LEADER_END_1: // 主管级领导审批
|
case ConsultationTaskKey.DEPART_LEADER_END_1: // 主管级领导审批
|
||||||
case ConsultationTaskKey.DEPART_LEADER_END_4: // 驳回流程中的主管级领导审批
|
case ConsultationTaskKey.DEPART_LEADER_END_4: // 驳回流程中的主管级领导审批
|
||||||
runtimeService.setVariableLocal(processInstanceId, "passSecond", true);
|
runtimeService.setVariableLocal(processInstanceId, FbCommon.VARIABLE_PASS_SECOND, true);
|
||||||
break;
|
break;
|
||||||
case ConsultationTaskKey.ENGINEER_START_END: // 法规工程师审批
|
case ConsultationTaskKey.ENGINEER_START_END: // 法规工程师审批
|
||||||
runtimeService.setVariableLocal(processInstanceId, "passThird", true);
|
runtimeService.setVariableLocal(processInstanceId, FbCommon.VARIABLE_PASS_THIRD, true);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new JeroBootException("目前还未开发,请联系管理员");
|
throw new JeroBootException(EXCEPTION);
|
||||||
}
|
}
|
||||||
} else { // 驳回
|
} else { // 驳回
|
||||||
taskInfo.setCommitFlag(CommitFlagEnum.REJECT.getValue());
|
taskInfo.setCommitFlag(CommitFlagEnum.REJECT.getValue());
|
||||||
@@ -161,7 +162,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
|||||||
List<ProcessFbConsultationUserLink> userLinkList;
|
List<ProcessFbConsultationUserLink> userLinkList;
|
||||||
switch (taskDefinitionKey) {
|
switch (taskDefinitionKey) {
|
||||||
case ConsultationTaskKey.DEPART_LEADER_END_1: // 主管级领导审批
|
case ConsultationTaskKey.DEPART_LEADER_END_1: // 主管级领导审批
|
||||||
runtimeService.setVariableLocal(processInstanceId, "passSecond", false);
|
runtimeService.setVariableLocal(processInstanceId, FbCommon.VARIABLE_PASS_SECOND, false);
|
||||||
// 分发给退回的模块负责人
|
// 分发给退回的模块负责人
|
||||||
queryWrapper.eq(ProcessFbConsultationUserLink::getDepartLeaderId, userId);
|
queryWrapper.eq(ProcessFbConsultationUserLink::getDepartLeaderId, userId);
|
||||||
userLinkList = processFbConsultationUserLinkService.list(queryWrapper);
|
userLinkList = processFbConsultationUserLinkService.list(queryWrapper);
|
||||||
@@ -169,17 +170,17 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
|||||||
.map(ProcessFbConsultationUserLink::getModuleOwnerId)
|
.map(ProcessFbConsultationUserLink::getModuleOwnerId)
|
||||||
.distinct()
|
.distinct()
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
runtimeService.setVariableLocal(processInstanceId, "moduleOwnerList", moduleOwnerIdList);
|
runtimeService.setVariableLocal(processInstanceId, FbCommon.VARIABLE_MODULE_OWNER_LIST, moduleOwnerIdList);
|
||||||
break;
|
break;
|
||||||
case ConsultationTaskKey.ENGINEER_START_END: // 法规工程师审批
|
case ConsultationTaskKey.ENGINEER_START_END: // 法规工程师审批
|
||||||
runtimeService.setVariableLocal(processInstanceId, "passThird", false);
|
runtimeService.setVariableLocal(processInstanceId, FbCommon.VARIABLE_PASS_THIRD, false);
|
||||||
// 退回到子流程
|
// 退回到子流程
|
||||||
userLinkList = processFbConsultationUserLinkService.list(queryWrapper);
|
userLinkList = processFbConsultationUserLinkService.list(queryWrapper);
|
||||||
List<String> departLeaderIdList = userLinkList.stream()
|
List<String> departLeaderIdList = userLinkList.stream()
|
||||||
.map(ProcessFbConsultationUserLink::getDepartLeaderId)
|
.map(ProcessFbConsultationUserLink::getDepartLeaderId)
|
||||||
.distinct()
|
.distinct()
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
runtimeService.setVariableLocal(processInstanceId, "departLeaderList", departLeaderIdList);
|
runtimeService.setVariableLocal(processInstanceId, FbCommon.VARIABLE_DEPART_LEADER_LIST, departLeaderIdList);
|
||||||
processHandleService.updateApprovalRecord(processInfoVO);
|
processHandleService.updateApprovalRecord(processInfoVO);
|
||||||
// 完成当前任务任务
|
// 完成当前任务任务
|
||||||
taskService.complete(taskId);
|
taskService.complete(taskId);
|
||||||
@@ -203,7 +204,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
|||||||
.map(ProcessFbConsultationUserLink::getModuleOwnerId)
|
.map(ProcessFbConsultationUserLink::getModuleOwnerId)
|
||||||
.distinct()
|
.distinct()
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
runtimeService.setVariableLocal(processInstanceId, "moduleOwnerList", moduleOwnerList);
|
runtimeService.setVariableLocal(processInstanceId, FbCommon.VARIABLE_MODULE_OWNER_LIST, moduleOwnerList);
|
||||||
} else { // 驳回给各部所主管级领导
|
} else { // 驳回给各部所主管级领导
|
||||||
runtimeService.setVariableLocal(processInstanceId, "passFourth", false);
|
runtimeService.setVariableLocal(processInstanceId, "passFourth", false);
|
||||||
}
|
}
|
||||||
@@ -212,10 +213,10 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case ConsultationTaskKey.DEPART_LEADER_END_4:
|
case ConsultationTaskKey.DEPART_LEADER_END_4:
|
||||||
runtimeService.setVariableLocal(processInstanceId, "passSecond", false);
|
runtimeService.setVariableLocal(processInstanceId, FbCommon.VARIABLE_PASS_SECOND, false);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new JeroBootException("目前还未开发,请联系管理员");
|
throw new JeroBootException(EXCEPTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
processHandleService.updateApprovalRecord(processInfoVO);
|
processHandleService.updateApprovalRecord(processInfoVO);
|
||||||
@@ -320,7 +321,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
|||||||
List<ProcessFbConsultationUserLink> userLinks;
|
List<ProcessFbConsultationUserLink> userLinks;
|
||||||
ProcessFbConsultationUserLink userLink;
|
ProcessFbConsultationUserLink userLink;
|
||||||
List<String> linkIds;
|
List<String> linkIds;
|
||||||
List<ProcessFbConsultationList> consultationLists;
|
List<ProcessFbConsultationList> consultationLists = new ArrayList<>();
|
||||||
switch (taskDefinitionKey) {
|
switch (taskDefinitionKey) {
|
||||||
case ConsultationTaskKey.DEPART_LEADER_START_1: // 各部所主管级领导分发
|
case ConsultationTaskKey.DEPART_LEADER_START_1: // 各部所主管级领导分发
|
||||||
linkQueryWrapper.eq(ProcessFbConsultationUserLink::getDepartLeaderId, userId);
|
linkQueryWrapper.eq(ProcessFbConsultationUserLink::getDepartLeaderId, userId);
|
||||||
@@ -328,7 +329,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
|||||||
if (CollectionUtils.isNotEmpty(userLinks)) {
|
if (CollectionUtils.isNotEmpty(userLinks)) {
|
||||||
userLink = userLinks.get(0);
|
userLink = userLinks.get(0);
|
||||||
String userType = userLink.getUserType();
|
String userType = userLink.getUserType();
|
||||||
if (ConsultationCommon.USER_TYPE_MODULE_OWNER.equals(userType)) { // 模块负责人
|
if (FbCommon.USER_TYPE_MODULE_OWNER.equals(userType)) { // 模块负责人
|
||||||
List<String> collect = userLinks.stream()
|
List<String> collect = userLinks.stream()
|
||||||
.map(ProcessFbConsultationUserLink::getModuleOwnerId)
|
.map(ProcessFbConsultationUserLink::getModuleOwnerId)
|
||||||
.distinct().collect(Collectors.toList());
|
.distinct().collect(Collectors.toList());
|
||||||
@@ -361,6 +362,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
|||||||
consultationLists = processFbConsultationListService.list(listQueryWrapper);
|
consultationLists = processFbConsultationListService.list(listQueryWrapper);
|
||||||
processFbStandardConsultationVO.setProcessFbConsultationLists(consultationLists);
|
processFbStandardConsultationVO.setProcessFbConsultationLists(consultationLists);
|
||||||
break;
|
break;
|
||||||
|
case ConsultationTaskKey.DEPART_LEADER_END_1: // 各部所主管级领导审批
|
||||||
case ConsultationTaskKey.DEPART_LEADER_COLLECT_3: // 法规工程师审批驳回后的子流程中的各部所主管级领导汇总
|
case ConsultationTaskKey.DEPART_LEADER_COLLECT_3: // 法规工程师审批驳回后的子流程中的各部所主管级领导汇总
|
||||||
case ConsultationTaskKey.DEPART_LEADER_COLLECT_2: // 各部所主管级领导汇总(不分发给模块负责人)
|
case ConsultationTaskKey.DEPART_LEADER_COLLECT_2: // 各部所主管级领导汇总(不分发给模块负责人)
|
||||||
linkQueryWrapper.eq(ProcessFbConsultationUserLink::getDepartLeaderId, userId);
|
linkQueryWrapper.eq(ProcessFbConsultationUserLink::getDepartLeaderId, userId);
|
||||||
@@ -402,6 +404,22 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
|||||||
log.info("taskDefinitionKey:{},没有业务数据保存", taskDefinitionKey);
|
log.info("taskDefinitionKey:{},没有业务数据保存", taskDefinitionKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
consultationLists.forEach(consultation -> {
|
||||||
|
switch (consultation.getIsAdopt()) {
|
||||||
|
case "1":
|
||||||
|
consultation.setIsAdopt_dictText("采纳");
|
||||||
|
break;
|
||||||
|
case "2":
|
||||||
|
consultation.setIsAdopt_dictText("部分采纳");
|
||||||
|
break;
|
||||||
|
case "3":
|
||||||
|
consultation.setIsAdopt_dictText("不采纳");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
consultation.setIsAdopt_dictText("");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return processInfoVO;
|
return processInfoVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -494,7 +512,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
|||||||
moduleOwnerStart(processInfoVO);
|
moduleOwnerStart(processInfoVO);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new JeroBootException("目前还未开发,请联系管理员");
|
throw new JeroBootException(EXCEPTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果流程已经结束
|
// 如果流程已经结束
|
||||||
@@ -542,7 +560,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
|||||||
String designEngineerId = businessInfoDTO.getProcessFbConsultationUserLink().getDesignEngineerId();
|
String designEngineerId = businessInfoDTO.getProcessFbConsultationUserLink().getDesignEngineerId();
|
||||||
|
|
||||||
if (StringUtils.isBlank(designEngineerId)) {
|
if (StringUtils.isBlank(designEngineerId)) {
|
||||||
throw new JeroBootException(ResultCommon.EMPTY_COMMON, "designEngineerId");
|
throw new JeroBootException(ResultCommon.EMPTY_COMMON, FbCommon.VARIABLE_DESIGN_ENGINEER_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
String taskId = processInfoVO.getBasicTaskInfoDTO().getTaskId();
|
String taskId = processInfoVO.getBasicTaskInfoDTO().getTaskId();
|
||||||
@@ -557,7 +575,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
|||||||
|
|
||||||
designEngineerIdList.forEach(designEngineer -> {
|
designEngineerIdList.forEach(designEngineer -> {
|
||||||
ProcessFbConsultationUserLink userLink = new ProcessFbConsultationUserLink();
|
ProcessFbConsultationUserLink userLink = new ProcessFbConsultationUserLink();
|
||||||
userLink.setUserType("1");
|
userLink.setUserType(FbCommon.USER_TYPE_MODULE_OWNER);
|
||||||
userLink.setBusinessId(processFbConsultationUserLink.getBusinessId());
|
userLink.setBusinessId(processFbConsultationUserLink.getBusinessId());
|
||||||
userLink.setDepartLeaderId(processFbConsultationUserLink.getDepartLeaderId());
|
userLink.setDepartLeaderId(processFbConsultationUserLink.getDepartLeaderId());
|
||||||
userLink.setModuleOwnerId(processFbConsultationUserLink.getModuleOwnerId());
|
userLink.setModuleOwnerId(processFbConsultationUserLink.getModuleOwnerId());
|
||||||
@@ -570,7 +588,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
|||||||
|
|
||||||
List<String> idList = userLinkList.stream().map(ProcessFbConsultationUserLink::getId).collect(Collectors.toList());
|
List<String> idList = userLinkList.stream().map(ProcessFbConsultationUserLink::getId).collect(Collectors.toList());
|
||||||
String processInstanceId = task.getProcessInstanceId();
|
String processInstanceId = task.getProcessInstanceId();
|
||||||
runtimeService.setVariableLocal(processInstanceId, "designEngineerList", idList);
|
runtimeService.setVariableLocal(processInstanceId, FbCommon.VARIABLE_DESIGN_ENGINEER_LIST, idList);
|
||||||
saveNodeUserLink(processInstanceId, ConsultationNodeSort.DESIGN_ENGINEER_LIST, designEngineerIdList);
|
saveNodeUserLink(processInstanceId, ConsultationNodeSort.DESIGN_ENGINEER_LIST, designEngineerIdList);
|
||||||
|
|
||||||
// 完成任务
|
// 完成任务
|
||||||
@@ -599,7 +617,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
|||||||
|
|
||||||
designEngineerIdList.forEach(designEngineer -> {
|
designEngineerIdList.forEach(designEngineer -> {
|
||||||
ProcessFbConsultationUserLink userLink = new ProcessFbConsultationUserLink();
|
ProcessFbConsultationUserLink userLink = new ProcessFbConsultationUserLink();
|
||||||
userLink.setUserType("1");
|
userLink.setUserType(FbCommon.USER_TYPE_MODULE_OWNER);
|
||||||
userLink.setBusinessId(processFbConsultationUserLink.getBusinessId());
|
userLink.setBusinessId(processFbConsultationUserLink.getBusinessId());
|
||||||
userLink.setDepartLeaderId(processFbConsultationUserLink.getDepartLeaderId());
|
userLink.setDepartLeaderId(processFbConsultationUserLink.getDepartLeaderId());
|
||||||
userLink.setModuleOwnerId(processFbConsultationUserLink.getModuleOwnerId());
|
userLink.setModuleOwnerId(processFbConsultationUserLink.getModuleOwnerId());
|
||||||
@@ -628,7 +646,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
|||||||
processFbConsultationListService.updateBatchById(processFbConsultationLists); // 更新业务信息
|
processFbConsultationListService.updateBatchById(processFbConsultationLists); // 更新业务信息
|
||||||
}
|
}
|
||||||
|
|
||||||
runtimeService.setVariableLocal(task.getProcessInstanceId(), "passSecond", true);
|
runtimeService.setVariableLocal(task.getProcessInstanceId(), FbCommon.VARIABLE_PASS_SECOND, true);
|
||||||
// 完成任务
|
// 完成任务
|
||||||
taskService.complete(taskId);
|
taskService.complete(taskId);
|
||||||
}
|
}
|
||||||
@@ -738,37 +756,37 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
|||||||
List<ProcessFbConsultationUserLink> linkList = new ArrayList<>();
|
List<ProcessFbConsultationUserLink> linkList = new ArrayList<>();
|
||||||
if ("1".equals(userLink.getUserType())) { // 模块负责人
|
if ("1".equals(userLink.getUserType())) { // 模块负责人
|
||||||
if (StringUtils.isBlank(userLink.getModuleOwnerId())) {
|
if (StringUtils.isBlank(userLink.getModuleOwnerId())) {
|
||||||
throw new JeroBootException(ResultCommon.EMPTY_COMMON, "moduleOwnerId");
|
throw new JeroBootException(ResultCommon.EMPTY_COMMON, FbCommon.VARIABLE_MODULE_OWNER_ID);
|
||||||
}
|
}
|
||||||
List<String> moduleOwnerIds = Arrays.asList(userLink.getModuleOwnerId().split(","));
|
List<String> moduleOwnerIds = Arrays.asList(userLink.getModuleOwnerId().split(","));
|
||||||
moduleOwnerIds.forEach(moduleOwnerId -> {
|
moduleOwnerIds.forEach(moduleOwnerId -> {
|
||||||
ProcessFbConsultationUserLink link = new ProcessFbConsultationUserLink();
|
ProcessFbConsultationUserLink link = new ProcessFbConsultationUserLink();
|
||||||
link.setUserType("1");
|
link.setUserType(FbCommon.USER_TYPE_MODULE_OWNER);
|
||||||
link.setBusinessId(processInfoVO.getBusinessId());
|
link.setBusinessId(processInfoVO.getBusinessId());
|
||||||
link.setDepartLeaderId(CurrentUserUtil.getId());
|
link.setDepartLeaderId(CurrentUserUtil.getId());
|
||||||
link.setModuleOwnerId(moduleOwnerId);
|
link.setModuleOwnerId(moduleOwnerId);
|
||||||
linkList.add(link);
|
linkList.add(link);
|
||||||
});
|
});
|
||||||
processFbConsultationUserLinkService.saveBatch(linkList, linkList.size());
|
processFbConsultationUserLinkService.saveBatch(linkList, linkList.size());
|
||||||
variables.put("passFirst", true);
|
variables.put(FbCommon.VARIABLE_PASS_FIRST, true);
|
||||||
variables.put("moduleOwnerList", moduleOwnerIds);
|
variables.put(FbCommon.VARIABLE_MODULE_OWNER_LIST, moduleOwnerIds);
|
||||||
saveNodeUserLink(processInstanceId, ConsultationNodeSort.MODULE_OWNER_LIST, moduleOwnerIds);
|
saveNodeUserLink(processInstanceId, ConsultationNodeSort.MODULE_OWNER_LIST, moduleOwnerIds);
|
||||||
} else { // 设计工程师
|
} else { // 设计工程师
|
||||||
if (StringUtils.isBlank(userLink.getDesignEngineerId())) {
|
if (StringUtils.isBlank(userLink.getDesignEngineerId())) {
|
||||||
throw new JeroBootException(ResultCommon.EMPTY_COMMON, "designEngineerId");
|
throw new JeroBootException(ResultCommon.EMPTY_COMMON, FbCommon.VARIABLE_DESIGN_ENGINEER_ID);
|
||||||
}
|
}
|
||||||
List<String> designEngineerIds = Arrays.asList(userLink.getDesignEngineerId().split(","));
|
List<String> designEngineerIds = Arrays.asList(userLink.getDesignEngineerId().split(","));
|
||||||
designEngineerIds.forEach(designEngineerId -> {
|
designEngineerIds.forEach(designEngineerId -> {
|
||||||
ProcessFbConsultationUserLink link = new ProcessFbConsultationUserLink();
|
ProcessFbConsultationUserLink link = new ProcessFbConsultationUserLink();
|
||||||
link.setUserType("2");
|
link.setUserType(FbCommon.USER_TYPE_DESIGN_ENGINEER);
|
||||||
link.setBusinessId(processInfoVO.getBusinessId());
|
link.setBusinessId(processInfoVO.getBusinessId());
|
||||||
link.setDepartLeaderId(CurrentUserUtil.getId());
|
link.setDepartLeaderId(CurrentUserUtil.getId());
|
||||||
link.setDesignEngineerId(designEngineerId);
|
link.setDesignEngineerId(designEngineerId);
|
||||||
linkList.add(link);
|
linkList.add(link);
|
||||||
});
|
});
|
||||||
processFbConsultationUserLinkService.saveBatch(linkList, linkList.size());
|
processFbConsultationUserLinkService.saveBatch(linkList, linkList.size());
|
||||||
variables.put("passFirst", false);
|
variables.put(FbCommon.VARIABLE_PASS_FIRST, false);
|
||||||
variables.put("designEngineerList", designEngineerIds);
|
variables.put(FbCommon.VARIABLE_DESIGN_ENGINEER_LIST, designEngineerIds);
|
||||||
saveNodeUserLink(processInstanceId, ConsultationNodeSort.DESIGN_ENGINEER_LIST, designEngineerIds);
|
saveNodeUserLink(processInstanceId, ConsultationNodeSort.DESIGN_ENGINEER_LIST, designEngineerIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -797,7 +815,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
|||||||
List<String> moduleOwnerIds = Arrays.asList(userLink.getModuleOwnerId().split(","));
|
List<String> moduleOwnerIds = Arrays.asList(userLink.getModuleOwnerId().split(","));
|
||||||
moduleOwnerIds.forEach(moduleOwnerId -> {
|
moduleOwnerIds.forEach(moduleOwnerId -> {
|
||||||
ProcessFbConsultationUserLink link = new ProcessFbConsultationUserLink();
|
ProcessFbConsultationUserLink link = new ProcessFbConsultationUserLink();
|
||||||
link.setUserType("1");
|
link.setUserType(FbCommon.USER_TYPE_DESIGN_ENGINEER);
|
||||||
link.setBusinessId(processInfoVO.getBusinessId());
|
link.setBusinessId(processInfoVO.getBusinessId());
|
||||||
link.setDepartLeaderId(CurrentUserUtil.getId());
|
link.setDepartLeaderId(CurrentUserUtil.getId());
|
||||||
link.setModuleOwnerId(moduleOwnerId);
|
link.setModuleOwnerId(moduleOwnerId);
|
||||||
@@ -809,7 +827,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
|||||||
List<String> designEngineerIds = Arrays.asList(userLink.getDesignEngineerId().split(","));
|
List<String> designEngineerIds = Arrays.asList(userLink.getDesignEngineerId().split(","));
|
||||||
designEngineerIds.forEach(designEngineerId -> {
|
designEngineerIds.forEach(designEngineerId -> {
|
||||||
ProcessFbConsultationUserLink link = new ProcessFbConsultationUserLink();
|
ProcessFbConsultationUserLink link = new ProcessFbConsultationUserLink();
|
||||||
link.setUserType("2");
|
link.setUserType(FbCommon.USER_TYPE_DESIGN_ENGINEER);
|
||||||
link.setBusinessId(processInfoVO.getBusinessId());
|
link.setBusinessId(processInfoVO.getBusinessId());
|
||||||
link.setDepartLeaderId(CurrentUserUtil.getId());
|
link.setDepartLeaderId(CurrentUserUtil.getId());
|
||||||
link.setDesignEngineerId(designEngineerId);
|
link.setDesignEngineerId(designEngineerId);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
|
<definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
|
||||||
<bpmn:process id="fb-standard-consultation" name="标准征求意见流程" isExecutable="true">
|
<bpmn:process id="fb-standard-consultation" name="标准征求意见流程" isExecutable="true">
|
||||||
<bpmn:startEvent id="StartEvent_1">
|
<bpmn:startEvent id="StartEvent_1">
|
||||||
<bpmn:outgoing>Flow_1d5objw</bpmn:outgoing>
|
<bpmn:outgoing>Flow_1d5objw</bpmn:outgoing>
|
||||||
</bpmn:startEvent>
|
</bpmn:startEvent>
|
||||||
@@ -169,7 +169,7 @@
|
|||||||
<bpmn:startEvent id="Event_0eapre1">
|
<bpmn:startEvent id="Event_0eapre1">
|
||||||
<bpmn:outgoing>Flow_07p5ivp</bpmn:outgoing>
|
<bpmn:outgoing>Flow_07p5ivp</bpmn:outgoing>
|
||||||
</bpmn:startEvent>
|
</bpmn:startEvent>
|
||||||
<bpmn:userTask id="module_owner_end_3" name="模块负责人汇总填写意见(可跳过)">
|
<bpmn:userTask id="module_owner_end_3" name="模块负责人汇总填写意见(可跳过)" activiti:assignee="${moduleOwner}">
|
||||||
<bpmn:extensionElements>
|
<bpmn:extensionElements>
|
||||||
<activiti:taskListener class="com.jero.modules.activiti.process.fb.listener.BusinessKeyListener" event="create" />
|
<activiti:taskListener class="com.jero.modules.activiti.process.fb.listener.BusinessKeyListener" event="create" />
|
||||||
</bpmn:extensionElements>
|
</bpmn:extensionElements>
|
||||||
|
|||||||
Reference in New Issue
Block a user