update 标准征求意见流程表-发起流程
This commit is contained in:
+4
-4
@@ -37,10 +37,10 @@ public class ProcessFbConsultationUserLink implements Serializable {
|
|||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
@ApiModelProperty(value = "主键ID")
|
@ApiModelProperty(value = "主键ID")
|
||||||
private java.lang.String id;
|
private java.lang.String id;
|
||||||
/**标准征求意见流程表id*/
|
/**业务id*/
|
||||||
@Excel(name = "标准征求意见流程表id", width = 15)
|
@Excel(name = "业务id", width = 15)
|
||||||
@ApiModelProperty(value = "标准征求意见流程表id")
|
@ApiModelProperty(value = "业务id")
|
||||||
private java.lang.String standardConsultationId;
|
private java.lang.String businessId;
|
||||||
/**部门主管级领导*/
|
/**部门主管级领导*/
|
||||||
@Excel(name = "部门主管级领导", width = 15)
|
@Excel(name = "部门主管级领导", width = 15)
|
||||||
@ApiModelProperty(value = "部门主管级领导")
|
@ApiModelProperty(value = "部门主管级领导")
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
<mapper namespace="com.jero.modules.activiti.process.fb.mapper.ProcessFbConsultationUserLinkMapper">
|
<mapper namespace="com.jero.modules.activiti.process.fb.mapper.ProcessFbConsultationUserLinkMapper">
|
||||||
<resultMap id="ProcessFbConsultationUserLinkResultMap" type="com.jero.modules.activiti.process.fb.entity.ProcessFbConsultationUserLink">
|
<resultMap id="ProcessFbConsultationUserLinkResultMap" type="com.jero.modules.activiti.process.fb.entity.ProcessFbConsultationUserLink">
|
||||||
<id column="id" property="id" />
|
<id column="id" property="id" />
|
||||||
<result column="standard_consultation_id" property="standardConsultationId" />
|
<result column="business_id" property="businessId" />
|
||||||
<result column="depart_leader_id" property="departLeaderId" />
|
<result column="depart_leader_id" property="departLeaderId" />
|
||||||
<result column="module_owner_id" property="moduleOwnerId" />
|
<result column="module_owner_id" property="moduleOwnerId" />
|
||||||
<result column="design_engineer_id" property="designEngineerId" />
|
<result column="design_engineer_id" property="designEngineerId" />
|
||||||
|
|||||||
+24
@@ -1,22 +1,29 @@
|
|||||||
package com.jero.modules.activiti.process.fb.service.impl;
|
package com.jero.modules.activiti.process.fb.service.impl;
|
||||||
|
|
||||||
|
import com.jero.common.api.vo.ResultCommon;
|
||||||
import com.jero.common.util.UUIDUtils;
|
import com.jero.common.util.UUIDUtils;
|
||||||
import com.jero.modules.activiti.enums.ProcessTypeEnum;
|
import com.jero.modules.activiti.enums.ProcessTypeEnum;
|
||||||
import com.jero.modules.activiti.process.fb.common.ProcessDefinitionKey;
|
import com.jero.modules.activiti.process.fb.common.ProcessDefinitionKey;
|
||||||
import com.jero.modules.activiti.process.fb.dto.BasicProcessInfoDTO;
|
import com.jero.modules.activiti.process.fb.dto.BasicProcessInfoDTO;
|
||||||
|
import com.jero.modules.activiti.process.fb.entity.ProcessFbConsultationUserLink;
|
||||||
import com.jero.modules.activiti.process.fb.entity.ProcessFbStandardConsultation;
|
import com.jero.modules.activiti.process.fb.entity.ProcessFbStandardConsultation;
|
||||||
import com.jero.modules.activiti.process.fb.mapper.ProcessFbStandardConsultationMapper;
|
import com.jero.modules.activiti.process.fb.mapper.ProcessFbStandardConsultationMapper;
|
||||||
|
import com.jero.modules.activiti.process.fb.service.IProcessFbConsultationUserLinkService;
|
||||||
import com.jero.modules.activiti.process.fb.service.IProcessFbStandardConsultationService;
|
import com.jero.modules.activiti.process.fb.service.IProcessFbStandardConsultationService;
|
||||||
import com.jero.modules.activiti.process.fb.service.IProcessHandleService;
|
import com.jero.modules.activiti.process.fb.service.IProcessHandleService;
|
||||||
import com.jero.modules.activiti.process.fb.vo.ProcessFbStandardConsultationVO;
|
import com.jero.modules.activiti.process.fb.vo.ProcessFbStandardConsultationVO;
|
||||||
import com.jero.modules.activiti.process.fb.vo.ProcessInfoVO;
|
import com.jero.modules.activiti.process.fb.vo.ProcessInfoVO;
|
||||||
import com.jero.modules.laws.common.util.CurrentUserUtil;
|
import com.jero.modules.laws.common.util.CurrentUserUtil;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import com.jero.common.exception.JeroBootException;
|
import com.jero.common.exception.JeroBootException;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
@@ -32,6 +39,8 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IProcessHandleService processHandleService;
|
private IProcessHandleService processHandleService;
|
||||||
|
@Resource
|
||||||
|
private IProcessFbConsultationUserLinkService processFbConsultationUserLinkService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: liao
|
* @Author: liao
|
||||||
@@ -46,11 +55,26 @@ 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");
|
||||||
|
if (StringUtils.isBlank(departLeaders)) {
|
||||||
|
throw new JeroBootException(ResultCommon.EMPTY_COMMON, "departLeaderList");
|
||||||
|
}
|
||||||
userInfoMap.put("engineer", CurrentUserUtil.getId()); // 第一个任务节点设置成自己
|
userInfoMap.put("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() + "-" + "征求意见"); // 流程名称
|
||||||
basicProcessInfoDTO.setProcessType(ProcessTypeEnum.FB_STANDARD_CONSULTATION.getValue()); // 流程类型
|
basicProcessInfoDTO.setProcessType(ProcessTypeEnum.FB_STANDARD_CONSULTATION.getValue()); // 流程类型
|
||||||
processHandleService.startProcess(processInfoVO);
|
processHandleService.startProcess(processInfoVO);
|
||||||
|
|
||||||
|
// 把各部所主管级领导数据存入关联人员表
|
||||||
|
List<String> departLeaderList = Arrays.asList(departLeaders.split(","));
|
||||||
|
List<ProcessFbConsultationUserLink> linkList = new ArrayList<>();
|
||||||
|
departLeaderList.forEach(departLeader -> {
|
||||||
|
ProcessFbConsultationUserLink link = new ProcessFbConsultationUserLink();
|
||||||
|
link.setBusinessId(processInfoVO.getBusinessId());
|
||||||
|
link.setDepartLeaderId(departLeader);
|
||||||
|
linkList.add(link);
|
||||||
|
});
|
||||||
|
processFbConsultationUserLinkService.saveBatch(linkList, linkList.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user