update 法规征求意见流程

This commit is contained in:
liao
2023-11-29 10:43:04 +08:00
parent 21f2331f62
commit 6977fb6380
3 changed files with 17 additions and 7 deletions
@@ -33,7 +33,7 @@ public class ConsultationTaskKey {
public static final String MODULE_OWNER_END_2 = "module_owner_end_2"; // 模块负责人汇总
public static final String MODULE_OWNER_END_3 = "module_owner_end_3"; // 模块负责人汇总
public static final String MODULE_OWNER_END_3 = "module_owner_end_3"; // 模块负责人汇总(法规工程师驳回后)
public static final String DESIGN_ENGINEER_1 = "design_engineer_1"; // 设计工程师填写征求意见
@@ -8,8 +8,10 @@ import com.jero.modules.activiti.process.fb.service.IProcessFbConsultationUserLi
import com.jero.modules.activiti.service.ProcessAllService;
import com.jero.modules.laws.common.util.CurrentUserUtil;
import lombok.extern.slf4j.Slf4j;
import org.activiti.engine.HistoryService;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.history.HistoricTaskInstance;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -27,6 +29,8 @@ public class TaskListenerService {
private IProcessFbConsultationUserLinkService processFbConsultationUserLinkService;
@Resource
private ProcessAllService processAllService;
@Resource
private HistoryService historyService;
public void setBusinessKey(DelegateTask delegateTask) {
// 在任务创建时,设置业务key
@@ -38,6 +42,8 @@ public class TaskListenerService {
DelegateExecution execution = delegateTask.getExecution();
String executionId = execution.getId();
String parentExecutionId = execution.getParentId();
HistoricTaskInstance historicTask = historyService.createHistoricTaskInstanceQuery().executionId(parentExecutionId).singleResult();
String historicTaskAssignee = historicTask.getAssignee();
LambdaQueryWrapper<ProcessFbConsultationUserLink> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ProcessFbConsultationUserLink::getBusinessId, processAll.getProjectId());
@@ -72,9 +78,11 @@ public class TaskListenerService {
processFbConsultationUserLinkService.updateById(userLink);
break;
case ConsultationTaskKey.MODULE_OWNER_END_2: // 模块负责人汇总填写意见(主管级领导驳回后)
case ConsultationTaskKey.MODULE_OWNER_END_3: // 法规工程师审批驳回后的子流程中的模块负责人汇总
delegateTask.setFormKey(userId); // 绑定主管级领导的id
break;
case ConsultationTaskKey.MODULE_OWNER_END_3: // 法规工程师审批驳回后的子流程中的模块负责人汇总
delegateTask.setFormKey(historicTaskAssignee);
break;
default:
log.info("{}没有监听任务", taskDefinitionKey);
}
@@ -94,11 +94,9 @@ public class ProcessFbStandardPurchaseServiceImpl extends ServiceImpl<ProcessFbS
String businessId = UUIDUtils.randomUUID20();
if (CollectionUtils.isNotEmpty(businessInfoList)) {
businessId = businessInfoList.get(0).getBusinessId();
processInfoVO.setBusinessId(businessId);
} else {
processInfoVO.setBusinessId(businessId);
return businessId;
}
processInfoVO.setBusinessId(businessId);
for (int i = 0; i < businessInfoList.size(); i++) {
if (StringUtils.isBlank(businessInfoList.get(i).getStandardNumber())) {
throw new JeroBootException(ResultCommon.EMPTY_COMMON, "standardNumber");
@@ -116,7 +114,11 @@ public class ProcessFbStandardPurchaseServiceImpl extends ServiceImpl<ProcessFbS
saveBatch(businessInfoList, businessInfoList.size()); // 保存到数据库
return businessInfoList.get(0).getStandardNumber() + "-" + businessInfoList.get(0).getStandardName() + "-" + "采购";
if (CollectionUtils.isNotEmpty(businessInfoList)) {
return businessInfoList.get(0).getStandardNumber() + "-" + businessInfoList.get(0).getStandardName() + "-" + "采购";
} else {
return "";
}
}
/**