update 标准征求意见流程
This commit is contained in:
+2
-2
@@ -23,9 +23,9 @@ public class ConsultationTaskKey {
|
||||
|
||||
public static final String DEPART_LEADER_COLLECT_2 = "depart_leader_collect_2"; // 各部所主管级领导汇总
|
||||
|
||||
public static final String DEPART_LEADER_COLLECT_3 = "depart_leader_collect_3"; // 各部所主管级领导汇总
|
||||
public static final String DEPART_LEADER_COLLECT_3 = "depart_leader_collect_3"; // 各部所主管级领导汇总(驳回流程)
|
||||
|
||||
public static final String DEPART_LEADER_END_4 = "depart_leader_end_4"; // 各部所主管级领导审批
|
||||
public static final String DEPART_LEADER_END_4 = "depart_leader_end_4"; // 各部所主管级领导审批(驳回流程)
|
||||
|
||||
public static final String MODULE_OWNER_START = "module_owner_start"; // 模块负责人分发
|
||||
|
||||
|
||||
+4
@@ -57,4 +57,8 @@ public class ProcessFbConsultationUserLink implements Serializable {
|
||||
@Excel(name = "下发人员类型(1模块负责人、2设计工程师)", width = 15)
|
||||
@ApiModelProperty(value = "下发人员类型(1模块负责人、2设计工程师)")
|
||||
private java.lang.String userType;
|
||||
/**父执行实例流id*/
|
||||
@Excel(name = "父执行实例流id", width = 15)
|
||||
@ApiModelProperty(value = "父执行实例流id")
|
||||
private java.lang.String parentExecutionId;
|
||||
}
|
||||
|
||||
+13
-2
@@ -36,6 +36,8 @@ public class TaskListenerService {
|
||||
ProcessAll processAll = processAllService.getByProcessInstanceId(processInstanceId);
|
||||
|
||||
DelegateExecution execution = delegateTask.getExecution();
|
||||
String executionId = execution.getId();
|
||||
String parentExecutionId = execution.getParentId();
|
||||
|
||||
LambdaQueryWrapper<ProcessFbConsultationUserLink> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ProcessFbConsultationUserLink::getBusinessId, processAll.getProjectId());
|
||||
@@ -47,18 +49,27 @@ public class TaskListenerService {
|
||||
queryWrapper.eq(ProcessFbConsultationUserLink::getModuleOwnerId, assignee);
|
||||
userLink = processFbConsultationUserLinkService.getOne(queryWrapper);
|
||||
delegateTask.setFormKey(userLink.getId());
|
||||
// 给人员关系表绑定执行流父id
|
||||
userLink.setParentExecutionId(executionId);
|
||||
processFbConsultationUserLinkService.updateById(userLink);
|
||||
break;
|
||||
case ConsultationTaskKey.DESIGN_ENGINEER_2: // 设计工程师填写征求意见(不分发给模块负责人)
|
||||
queryWrapper.eq(ProcessFbConsultationUserLink::getDepartLeaderId, userId);
|
||||
queryWrapper.eq(ProcessFbConsultationUserLink::getDesignEngineerId, assignee);
|
||||
userLink = processFbConsultationUserLinkService.getOne(queryWrapper);
|
||||
delegateTask.setFormKey(userLink.getId());
|
||||
// 给人员关系表绑定执行流父id
|
||||
userLink.setParentExecutionId(parentExecutionId);
|
||||
processFbConsultationUserLinkService.updateById(userLink);
|
||||
break;
|
||||
case ConsultationTaskKey.DESIGN_ENGINEER_1: // 设计工程师填写征求意见(分发给模块负责人)
|
||||
userLink = processFbConsultationUserLinkService.getById(assignee);
|
||||
assignee = userLink.getDesignEngineerId();
|
||||
delegateTask.setAssignee(userLink.getDesignEngineerId());
|
||||
delegateTask.setFormKey(userLink.getId());
|
||||
// 给人员关系表绑定执行流父id
|
||||
userLink.setParentExecutionId(parentExecutionId);
|
||||
processFbConsultationUserLinkService.updateById(userLink);
|
||||
break;
|
||||
default:
|
||||
log.info("{}没有监听任务", taskDefinitionKey);
|
||||
@@ -71,8 +82,8 @@ public class TaskListenerService {
|
||||
log.info("taskDefinitionKey: {}", taskDefinitionKey);
|
||||
log.info("assignee: {}", assignee);
|
||||
log.info("FormKey: {}", delegateTask.getFormKey());
|
||||
log.info("任务ExecutionId: {}", execution.getId());
|
||||
log.info("任务父ExecutionId: {}", execution.getParentId());
|
||||
log.info("任务ExecutionId: {}", executionId);
|
||||
log.info("任务父ExecutionId: {}", parentExecutionId);
|
||||
log.info("=======================================================================");
|
||||
}
|
||||
|
||||
|
||||
+10
@@ -1,10 +1,13 @@
|
||||
package com.jero.modules.activiti.process.fb.service;
|
||||
|
||||
import com.jero.modules.activiti.process.fb.entity.ProcessFbConsultationUserLink;
|
||||
import com.jero.modules.activiti.process.fb.entity.ProcessFbStandardConsultation;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.activiti.process.fb.vo.ProcessFbStandardConsultationVO;
|
||||
import com.jero.modules.activiti.process.fb.vo.ProcessInfoVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 标准征求意见流程表
|
||||
* @Author: jero-boot
|
||||
@@ -54,4 +57,11 @@ public interface IProcessFbStandardConsultationService extends IService<ProcessF
|
||||
* @Description: 查询流程信息
|
||||
**/
|
||||
ProcessInfoVO<ProcessFbStandardConsultationVO> queryProcessInfoVO(String draftId, String processInstanceId, String taskId);
|
||||
|
||||
/**
|
||||
* @Author: liao
|
||||
* @Date: 2023/11/27 16:50
|
||||
* @Description: 根据任务id和业务id查询关联表集合
|
||||
**/
|
||||
List<ProcessFbConsultationUserLink> listByTaskIdAndBusinessId(String taskId, String businessId);
|
||||
}
|
||||
|
||||
+49
-1
@@ -234,10 +234,28 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
public void saveToDraft(ProcessInfoVO<ProcessFbStandardConsultationVO> processInfoVO) {
|
||||
// 保存业务信息
|
||||
ProcessFbStandardConsultationVO businessInfoDTO = processInfoVO.getBusinessInfoDTO();
|
||||
|
||||
BasicTaskInfoDTO taskInfoDTO = processInfoVO.getBasicTaskInfoDTO();
|
||||
String taskId = taskInfoDTO.getTaskId();
|
||||
|
||||
ProcessFbStandardConsultation processFbStandardConsultation = businessInfoDTO.getProcessFbStandardConsultation();
|
||||
ProcessFbConsultationUserLink processFbConsultationUserLink = businessInfoDTO.getProcessFbConsultationUserLink();
|
||||
List<ProcessFbConsultationList> processFbConsultationLists = businessInfoDTO.getProcessFbConsultationLists();
|
||||
|
||||
if (StringUtils.isBlank(taskId)) { // 流程没有发起时保存
|
||||
saveOrUpdate(processFbStandardConsultation);
|
||||
processInfoVO.setBusinessId(processFbStandardConsultation.getId());
|
||||
} else { // 流程发起后保存
|
||||
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
|
||||
String taskDefinitionKey = task.getTaskDefinitionKey();
|
||||
switch (taskDefinitionKey) {
|
||||
case ConsultationTaskKey.DEPART_LEADER_START_1: // 各部所主管级领导分发
|
||||
break;
|
||||
default:
|
||||
log.info("保存为草稿,节点 {} 无操作", taskDefinitionKey);
|
||||
}
|
||||
}
|
||||
|
||||
// 流程信息
|
||||
BasicProcessInfoDTO basicProcessInfoDTO = processInfoVO.getBasicProcessInfoDTO();
|
||||
basicProcessInfoDTO.setProcessType(ProcessTypeEnum.FB_STANDARD_CONSULTATION.getValue()); // 流程类型
|
||||
@@ -278,6 +296,36 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
return processInfoVO;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author: liao
|
||||
* @Date: 2023/11/27 16:50
|
||||
* @Description: 根据任务id和业务id查询关联表集合
|
||||
**/
|
||||
@Override
|
||||
public List<ProcessFbConsultationUserLink> listByTaskIdAndBusinessId(String taskId, String businessId) {
|
||||
LambdaQueryWrapper<ProcessFbConsultationUserLink> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ProcessFbConsultationUserLink::getBusinessId, businessId);
|
||||
|
||||
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
|
||||
String taskDefinitionKey = task.getTaskDefinitionKey();
|
||||
String executionId = task.getExecutionId();
|
||||
switch (taskDefinitionKey) {
|
||||
case ConsultationTaskKey.DEPART_LEADER_START_1: // 各部所主管级领导分发
|
||||
case ConsultationTaskKey.DEPART_LEADER_END_1: // 各部所主管级领导审批
|
||||
case ConsultationTaskKey.DEPART_LEADER_COLLECT_2: // 各部所主管级领导汇总
|
||||
case ConsultationTaskKey.DEPART_LEADER_END_4: // 各部所主管级领导审批(驳回流程)
|
||||
case ConsultationTaskKey.DEPART_LEADER_COLLECT_3: // 各部所主管级领导汇总(驳回流程)
|
||||
queryWrapper.eq(ProcessFbConsultationUserLink::getDepartLeaderId, task.getAssignee());
|
||||
break;
|
||||
case ConsultationTaskKey.MODULE_OWNER_START: // 模块负责人分发
|
||||
case ConsultationTaskKey.MODULE_OWNER_END_1: // 模块负责人汇总
|
||||
queryWrapper.eq(ProcessFbConsultationUserLink::getParentExecutionId, executionId);
|
||||
default:
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return processFbConsultationUserLinkService.list(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author: liao
|
||||
* @Date: 2023/11/13 16:00
|
||||
@@ -400,7 +448,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
|
||||
designEngineerIdList.forEach(designEngineer -> {
|
||||
ProcessFbConsultationUserLink userLink = new ProcessFbConsultationUserLink();
|
||||
userLink.setUserType(processFbConsultationUserLink.getUserType());
|
||||
userLink.setUserType("1");
|
||||
userLink.setBusinessId(processFbConsultationUserLink.getBusinessId());
|
||||
userLink.setDepartLeaderId(processFbConsultationUserLink.getDepartLeaderId());
|
||||
userLink.setModuleOwnerId(processFbConsultationUserLink.getModuleOwnerId());
|
||||
|
||||
Reference in New Issue
Block a user