feat: 企标计划变更状态和类型同步
This commit is contained in:
+4
-3
@@ -7,11 +7,12 @@ package com.jero.modules.activiti.process.esInitChange.entity.enums;
|
||||
public enum ESPChangeType {
|
||||
|
||||
ADD("新增", "1", "新增计划入库时"),
|
||||
|
||||
CHANGE("变更", "2", "变更类型为完成时间变更、责任部门变更、"),
|
||||
|
||||
CANCEL("取消", "3", "项目类型为工作终止为取消"),
|
||||
;
|
||||
COMPLETE_TIME_CHANGE("完成时间变更", "4", "变更类型为完成时间变更"),
|
||||
WORK_TERMINATE("工作中止", "5", "变更类型为工作中止"),
|
||||
RESPONSIBLE_DEPT_CHANGE("责任部门变更", "6", "变更类型为责任部门变更"),
|
||||
MERGE("合并", "7", "变更类型为合并");
|
||||
|
||||
|
||||
private final String name;
|
||||
|
||||
+4
-5
@@ -22,7 +22,6 @@ import com.jero.modules.laws.enterprise.service.EnterpriseStandardPlanService;
|
||||
import com.jero.modules.laws.enterprise.util.BeanCopyUtils;
|
||||
import com.jero.modules.laws.enterprise.util.EnterpriseStandardUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.activiti.engine.ActivitiObjectNotFoundException;
|
||||
import org.activiti.engine.delegate.DelegateExecution;
|
||||
import org.activiti.engine.delegate.ExecutionListener;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -112,7 +111,7 @@ public class ProcessESInitChangeEndListener implements ExecutionListener {
|
||||
if (ESPProjectType.COMPLETE_TIME_CHANGE.getValue().equals(projectType)) {
|
||||
// 将企标计划变更状态设为取消
|
||||
for (ProcessEsInitChange processEsInitChange : processEsInitChanges) {
|
||||
processEsInitChange.setChangeStatus(ESPChangeType.CHANGE.getValue());
|
||||
processEsInitChange.setChangeStatus(ESPChangeType.COMPLETE_TIME_CHANGE.getValue());
|
||||
}
|
||||
enterpriseStandardPlans = BeanCopyUtils.copyBeanList(processEsInitChanges, EnterpriseStandardPlan.class);
|
||||
espService.updateBatchById(enterpriseStandardPlans);
|
||||
@@ -125,7 +124,7 @@ public class ProcessESInitChangeEndListener implements ExecutionListener {
|
||||
for (ProcessEsInitChange processEsInitChange : processEsInitChanges) {
|
||||
espWrapper.eq(EnterpriseStandardPlan::getId, processEsInitChange.getEspId());
|
||||
espWrapper.set(EnterpriseStandardPlan::getProjectStatus, ESPProjectStatus.NOT_STARTED.getValue());
|
||||
espWrapper.set(EnterpriseStandardPlan::getChangeStatus, ESPChangeType.CANCEL.getValue());
|
||||
espWrapper.set(EnterpriseStandardPlan::getChangeStatus, ESPChangeType.WORK_TERMINATE.getValue());
|
||||
espService.update(espWrapper);
|
||||
espWrapper.clear();
|
||||
}
|
||||
@@ -135,7 +134,7 @@ public class ProcessESInitChangeEndListener implements ExecutionListener {
|
||||
if (ESPProjectType.RESPONSIBLE_DEPT_CHANGE.getValue().equals(projectType)) {
|
||||
// 将企标计划变更状态设为变更
|
||||
for (ProcessEsInitChange processEsInitChange : processEsInitChanges) {
|
||||
processEsInitChange.setChangeStatus(ESPChangeType.CHANGE.getValue());
|
||||
processEsInitChange.setChangeStatus(ESPChangeType.RESPONSIBLE_DEPT_CHANGE.getValue());
|
||||
processEsInitChange.setMainDraftingUser(processEsInitChange.getNewMainDraftingUser());
|
||||
processEsInitChange.setMainDraftingUnitResponsiblePerson(processEsInitChange.getNewMainDraftingUnitResponsiblePerson());
|
||||
processEsInitChange.setMainDraftingUnit(processEsInitChange.getNewMainDraftingUnit());
|
||||
@@ -149,7 +148,7 @@ public class ProcessESInitChangeEndListener implements ExecutionListener {
|
||||
for (ProcessEsInitChange processEsInitChange : processEsInitChanges) {
|
||||
processEsInitChange.setId(null);
|
||||
processEsInitChange.setProjectStatus(ESPProjectStatus.IN_PROGRESS.getValue());
|
||||
processEsInitChange.setChangeStatus(ESPChangeType.CHANGE.getValue());
|
||||
processEsInitChange.setChangeStatus(ESPChangeType.MERGE.getValue());
|
||||
}
|
||||
ProcessEsInitChange processEsInitChange = processEsInitChanges.get(0);
|
||||
// 删除两个老企标计划
|
||||
|
||||
Reference in New Issue
Block a user