fix(标准征求意见流程): 81862
This commit is contained in:
+47
-45
@@ -343,49 +343,6 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
public void transfer(String taskId, String toUserId, String projectId) {
|
||||
isOverDue(taskId);
|
||||
processHandleService.transfer(taskId, toUserId);
|
||||
|
||||
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
|
||||
String taskDefinitionKey = task.getTaskDefinitionKey();
|
||||
String executionId = task.getExecutionId();
|
||||
// 设计工程师填写征求意见
|
||||
if (ConsultationTaskKey.DESIGN_ENGINEER_1.equals(taskDefinitionKey)
|
||||
|| ConsultationTaskKey.DESIGN_ENGINEER_2.equals(taskDefinitionKey)){
|
||||
processFbConsultationUserLinkService.update(
|
||||
new LambdaUpdateWrapper<ProcessFbConsultationUserLink>()
|
||||
.eq(ProcessFbConsultationUserLink::getBusinessId, projectId)
|
||||
.eq(ProcessFbConsultationUserLink::getDesignEngineerId, CurrentUserUtil.getId())
|
||||
.set(ProcessFbConsultationUserLink::getDesignEngineerId, toUserId)
|
||||
.set(ProcessFbConsultationUserLink::getOriginDesignEngineerId, CurrentUserUtil.getId()));
|
||||
}
|
||||
// 模块负责人分发/模块负责人汇总填写意见
|
||||
if (ConsultationTaskKey.MODULE_OWNER_START.equals(taskDefinitionKey)
|
||||
|| ConsultationTaskKey.MODULE_OWNER_END_1.equals(taskDefinitionKey)
|
||||
|| ConsultationTaskKey.MODULE_OWNER_END_2.equals(taskDefinitionKey)
|
||||
|| ConsultationTaskKey.MODULE_OWNER_END_3.equals(taskDefinitionKey)){
|
||||
processFbConsultationUserLinkService.update(
|
||||
new LambdaUpdateWrapper<ProcessFbConsultationUserLink>()
|
||||
.eq(ProcessFbConsultationUserLink::getBusinessId, projectId)
|
||||
.eq(ProcessFbConsultationUserLink::getModuleOwnerId, CurrentUserUtil.getId())
|
||||
.set(ProcessFbConsultationUserLink::getModuleOwnerId, toUserId)
|
||||
.set(ProcessFbConsultationUserLink::getOriginModuleOwnerId, CurrentUserUtil.getId()));
|
||||
|
||||
runtimeService.setVariable(executionId, "moduleOwner", toUserId);
|
||||
}
|
||||
// 各部所主管级领导分发/各部所主管级领导审批/各部所主管级领导汇总
|
||||
if (ConsultationTaskKey.DEPART_LEADER_START_1.equals(taskDefinitionKey)
|
||||
|| ConsultationTaskKey.DEPART_LEADER_END_1.equals(taskDefinitionKey)
|
||||
|| ConsultationTaskKey.DEPART_LEADER_END_4.equals(taskDefinitionKey)
|
||||
|| ConsultationTaskKey.DEPART_LEADER_COLLECT_2.equals(taskDefinitionKey)
|
||||
|| ConsultationTaskKey.DEPART_LEADER_COLLECT_3.equals(taskDefinitionKey)){
|
||||
processFbConsultationUserLinkService.update(
|
||||
new LambdaUpdateWrapper<ProcessFbConsultationUserLink>()
|
||||
.eq(ProcessFbConsultationUserLink::getBusinessId, projectId)
|
||||
.eq(ProcessFbConsultationUserLink::getDepartLeaderId, CurrentUserUtil.getId())
|
||||
.set(ProcessFbConsultationUserLink::getDepartLeaderId, toUserId)
|
||||
.set(ProcessFbConsultationUserLink::getOriginDepartLeaderId, CurrentUserUtil.getId()));
|
||||
|
||||
runtimeService.setVariable(executionId, "departLeader", toUserId);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1262,7 +1219,52 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
|
||||
@Override
|
||||
public void handleTransfer(ProcessAll processAll, ProcessApprovalRecord processApprovalRecord, String toUserId) {
|
||||
ProcessAllService processAllService = SpringContextUtil.getBean(ProcessAllService.class);
|
||||
processAllService.specialTransfer(processAll, processApprovalRecord, toUserId);
|
||||
String taskId = processApprovalRecord.getTaskId();
|
||||
String projectId = processAll.getProjectId();
|
||||
TaskService taskService = SpringContextUtil.getBean(TaskService.class);
|
||||
IProcessFbConsultationUserLinkService processFbConsultationUserLinkService =
|
||||
SpringContextUtil.getBean(IProcessFbConsultationUserLinkService.class);
|
||||
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
|
||||
String taskDefinitionKey = task.getTaskDefinitionKey();
|
||||
String executionId = task.getExecutionId();
|
||||
// 设计工程师填写征求意见
|
||||
if (ConsultationTaskKey.DESIGN_ENGINEER_1.equals(taskDefinitionKey)
|
||||
|| ConsultationTaskKey.DESIGN_ENGINEER_2.equals(taskDefinitionKey)){
|
||||
processFbConsultationUserLinkService.update(
|
||||
new LambdaUpdateWrapper<ProcessFbConsultationUserLink>()
|
||||
.eq(ProcessFbConsultationUserLink::getBusinessId, projectId)
|
||||
.eq(ProcessFbConsultationUserLink::getDesignEngineerId, CurrentUserUtil.getId())
|
||||
.set(ProcessFbConsultationUserLink::getDesignEngineerId, toUserId)
|
||||
.set(ProcessFbConsultationUserLink::getOriginDesignEngineerId, CurrentUserUtil.getId()));
|
||||
}
|
||||
// 模块负责人分发/模块负责人汇总填写意见
|
||||
if (ConsultationTaskKey.MODULE_OWNER_START.equals(taskDefinitionKey)
|
||||
|| ConsultationTaskKey.MODULE_OWNER_END_1.equals(taskDefinitionKey)
|
||||
|| ConsultationTaskKey.MODULE_OWNER_END_2.equals(taskDefinitionKey)
|
||||
|| ConsultationTaskKey.MODULE_OWNER_END_3.equals(taskDefinitionKey)){
|
||||
processFbConsultationUserLinkService.update(
|
||||
new LambdaUpdateWrapper<ProcessFbConsultationUserLink>()
|
||||
.eq(ProcessFbConsultationUserLink::getBusinessId, projectId)
|
||||
.eq(ProcessFbConsultationUserLink::getModuleOwnerId, CurrentUserUtil.getId())
|
||||
.set(ProcessFbConsultationUserLink::getModuleOwnerId, toUserId)
|
||||
.set(ProcessFbConsultationUserLink::getOriginModuleOwnerId, CurrentUserUtil.getId()));
|
||||
|
||||
runtimeService.setVariable(executionId, "moduleOwner", toUserId);
|
||||
}
|
||||
// 各部所主管级领导分发/各部所主管级领导审批/各部所主管级领导汇总
|
||||
if (ConsultationTaskKey.DEPART_LEADER_START_1.equals(taskDefinitionKey)
|
||||
|| ConsultationTaskKey.DEPART_LEADER_END_1.equals(taskDefinitionKey)
|
||||
|| ConsultationTaskKey.DEPART_LEADER_END_4.equals(taskDefinitionKey)
|
||||
|| ConsultationTaskKey.DEPART_LEADER_COLLECT_2.equals(taskDefinitionKey)
|
||||
|| ConsultationTaskKey.DEPART_LEADER_COLLECT_3.equals(taskDefinitionKey)){
|
||||
processFbConsultationUserLinkService.update(
|
||||
new LambdaUpdateWrapper<ProcessFbConsultationUserLink>()
|
||||
.eq(ProcessFbConsultationUserLink::getBusinessId, projectId)
|
||||
.eq(ProcessFbConsultationUserLink::getDepartLeaderId, CurrentUserUtil.getId())
|
||||
.set(ProcessFbConsultationUserLink::getDepartLeaderId, toUserId)
|
||||
.set(ProcessFbConsultationUserLink::getOriginDepartLeaderId, CurrentUserUtil.getId()));
|
||||
|
||||
runtimeService.setVariable(executionId, "departLeader", toUserId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+60
-1
@@ -12,10 +12,15 @@ import com.jero.common.util.MessageUtils;
|
||||
import com.jero.modules.activiti.enums.FinishFlagEnum;
|
||||
import com.jero.modules.activiti.enums.ProcessStatusEnum;
|
||||
import com.jero.modules.activiti.enums.ProcessTypeEnum;
|
||||
import com.jero.modules.activiti.process.fb.common.ConsultationTaskKey;
|
||||
import com.jero.modules.activiti.process.fb.entity.ProcessFbConsultationUserLink;
|
||||
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.IProcessHandleService;
|
||||
import com.jero.modules.activiti.util.SpringContextUtil;
|
||||
import com.jero.modules.compare.entity.SarFileCompareInfo;
|
||||
import com.jero.modules.compare.service.ISarFileCompareInfoService;
|
||||
import com.jero.modules.laws.common.util.CurrentUserUtil;
|
||||
import com.jero.modules.laws.customcompare.entity.LawsCustomCompareInfo;
|
||||
import com.jero.modules.laws.customcompare.service.ILawsCustomCompareInfoService;
|
||||
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardPlan;
|
||||
@@ -29,12 +34,16 @@ import com.jero.modules.split.entity.SarFileSplitInfoEO;
|
||||
import com.jero.modules.split.service.ISarFileSplitInfoService;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import org.activiti.engine.RuntimeService;
|
||||
import org.activiti.engine.TaskService;
|
||||
import org.activiti.engine.task.Task;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -61,6 +70,9 @@ public class LawsTaskTransferServiceImpl implements ILawsTaskTransferService {
|
||||
private final IProcessHandleService processHandleService;
|
||||
private final IProcessFbStandardConsultationService processFbStandardConsultationService;
|
||||
|
||||
@Resource
|
||||
private RuntimeService runtimeService;
|
||||
|
||||
public LawsTaskTransferServiceImpl(LawsTaskTransferMapper lawsTaskTransferMapper,
|
||||
EnterpriseStandardPlanService enterpriseStandardPlanService,
|
||||
ISarFileSplitInfoService sarFileSplitInfoService,
|
||||
@@ -158,10 +170,57 @@ public class LawsTaskTransferServiceImpl implements ILawsTaskTransferService {
|
||||
|
||||
for (LawsProcessDB lawsProcessDb : lawsProcessDBList) {
|
||||
String taskId = lawsProcessDb.getTaskId();
|
||||
String user = lawsProcessDb.getUser();
|
||||
String toUserId = lawsProcessDb.getTransferUser();
|
||||
String projectId = lawsProcessDb.getProjectId();
|
||||
// 征求意见流程特殊处理
|
||||
if (ProcessTypeEnum.FB_STANDARD_CONSULTATION.getValue().equals(lawsProcessDb.getPrcType())) {
|
||||
processFbStandardConsultationService.transfer(taskId, toUserId, lawsProcessDb.getProjectId());
|
||||
processHandleService.transfer(taskId, toUserId);
|
||||
TaskService taskService = SpringContextUtil.getBean(TaskService.class);
|
||||
IProcessFbConsultationUserLinkService processFbConsultationUserLinkService =
|
||||
SpringContextUtil.getBean(IProcessFbConsultationUserLinkService.class);
|
||||
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
|
||||
String taskDefinitionKey = task.getTaskDefinitionKey();
|
||||
String executionId = task.getExecutionId();
|
||||
// 设计工程师填写征求意见
|
||||
if (ConsultationTaskKey.DESIGN_ENGINEER_1.equals(taskDefinitionKey)
|
||||
|| ConsultationTaskKey.DESIGN_ENGINEER_2.equals(taskDefinitionKey)){
|
||||
processFbConsultationUserLinkService.update(
|
||||
new LambdaUpdateWrapper<ProcessFbConsultationUserLink>()
|
||||
.eq(ProcessFbConsultationUserLink::getBusinessId, projectId)
|
||||
.eq(ProcessFbConsultationUserLink::getDesignEngineerId, user)
|
||||
.set(ProcessFbConsultationUserLink::getDesignEngineerId, toUserId)
|
||||
.set(ProcessFbConsultationUserLink::getOriginDesignEngineerId, CurrentUserUtil.getId()));
|
||||
}
|
||||
// 模块负责人分发/模块负责人汇总填写意见
|
||||
if (ConsultationTaskKey.MODULE_OWNER_START.equals(taskDefinitionKey)
|
||||
|| ConsultationTaskKey.MODULE_OWNER_END_1.equals(taskDefinitionKey)
|
||||
|| ConsultationTaskKey.MODULE_OWNER_END_2.equals(taskDefinitionKey)
|
||||
|| ConsultationTaskKey.MODULE_OWNER_END_3.equals(taskDefinitionKey)){
|
||||
processFbConsultationUserLinkService.update(
|
||||
new LambdaUpdateWrapper<ProcessFbConsultationUserLink>()
|
||||
.eq(ProcessFbConsultationUserLink::getBusinessId, projectId)
|
||||
.eq(ProcessFbConsultationUserLink::getModuleOwnerId, user)
|
||||
.set(ProcessFbConsultationUserLink::getModuleOwnerId, toUserId)
|
||||
.set(ProcessFbConsultationUserLink::getOriginModuleOwnerId, CurrentUserUtil.getId()));
|
||||
|
||||
runtimeService.setVariable(executionId, "moduleOwner", toUserId);
|
||||
}
|
||||
// 各部所主管级领导分发/各部所主管级领导审批/各部所主管级领导汇总
|
||||
if (ConsultationTaskKey.DEPART_LEADER_START_1.equals(taskDefinitionKey)
|
||||
|| ConsultationTaskKey.DEPART_LEADER_END_1.equals(taskDefinitionKey)
|
||||
|| ConsultationTaskKey.DEPART_LEADER_END_4.equals(taskDefinitionKey)
|
||||
|| ConsultationTaskKey.DEPART_LEADER_COLLECT_2.equals(taskDefinitionKey)
|
||||
|| ConsultationTaskKey.DEPART_LEADER_COLLECT_3.equals(taskDefinitionKey)){
|
||||
processFbConsultationUserLinkService.update(
|
||||
new LambdaUpdateWrapper<ProcessFbConsultationUserLink>()
|
||||
.eq(ProcessFbConsultationUserLink::getBusinessId, projectId)
|
||||
.eq(ProcessFbConsultationUserLink::getDepartLeaderId, user)
|
||||
.set(ProcessFbConsultationUserLink::getDepartLeaderId, toUserId)
|
||||
.set(ProcessFbConsultationUserLink::getOriginDepartLeaderId, CurrentUserUtil.getId()));
|
||||
|
||||
runtimeService.setVariable(executionId, "departLeader", toUserId);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
processHandleService.transfer(taskId, toUserId);
|
||||
|
||||
Reference in New Issue
Block a user