fix: 企标立项变更流程后的处理缺失字段BUG

This commit is contained in:
2023-10-31 15:39:34 +08:00
parent 20e720e02a
commit 83809a9866
2 changed files with 17 additions and 5 deletions
@@ -6,11 +6,11 @@ package com.jero.modules.activiti.process.esInitChange.entity.enums;
*/
public enum ESPChangeType {
ADD("新增", "add", "新增计划入库时"),
ADD("新增", "1", "新增计划入库时"),
CHANGE("变更", "change", "变更类型为完成时间变更、责任部门变更、"),
CHANGE("变更", "2", "变更类型为完成时间变更、责任部门变更、"),
CANCEL("取消", "cancel", "项目类型为工作终止为取消"),
CANCEL("取消", "3", "项目类型为工作终止为取消"),
;
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jero.modules.activiti.process.esInitChange.entity.ProcessEsInitChange;
import com.jero.modules.activiti.process.esInitChange.entity.enums.ESPApplicationCategoryEnum;
import com.jero.modules.activiti.process.esInitChange.entity.enums.ESPChangeType;
import com.jero.modules.activiti.process.esInitChange.entity.enums.ESPProjectStatus;
import com.jero.modules.activiti.process.esInitChange.entity.enums.ESPProjectType;
import com.jero.modules.activiti.process.esInitChange.service.ProcessEsInitChangeService;
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardPlan;
@@ -51,6 +52,8 @@ public class ProcessESInitChangeEndListener implements ExecutionListener {
// 立项新增-Id置空
for (ProcessEsInitChange processEsInitChange : processEsInitChanges) {
processEsInitChange.setId(null);
processEsInitChange.setProjectStatus(ESPProjectStatus.IN_PROGRESS.getValue());
processEsInitChange.setChangeStatus(ESPChangeType.ADD.getValue());
}
// 转换为企标计划数据并入库
enterpriseStandardPlans = BeanCopyUtils.copyBeanList(processEsInitChanges, EnterpriseStandardPlan.class);
@@ -63,6 +66,11 @@ public class ProcessESInitChangeEndListener implements ExecutionListener {
// 完成时间变更
if (ESPProjectType.COMPLETE_TIME_CHANGE.getValue().equals(projectType)) {
// 将企标计划变更状态设为取消
for (ProcessEsInitChange processEsInitChange : processEsInitChanges) {
processEsInitChange.setProjectStatus(ESPProjectStatus.IN_PROGRESS.getValue());
processEsInitChange.setChangeStatus(ESPChangeType.CHANGE.getValue());
}
enterpriseStandardPlans = BeanCopyUtils.copyBeanList(processEsInitChanges, EnterpriseStandardPlan.class);
espService.saveOrUpdateBatch(enterpriseStandardPlans);
}
@@ -71,7 +79,8 @@ public class ProcessESInitChangeEndListener implements ExecutionListener {
if (ESPProjectType.WORK_TERMINATE.getValue().equals(projectType)) {
// 将企标计划变更状态设为取消
for (ProcessEsInitChange processEsInitChange : processEsInitChanges) {
processEsInitChange.setProjectStatus(ESPChangeType.CANCEL.getValue());
processEsInitChange.setProjectStatus(ESPProjectStatus.NOT_STARTED.getValue());
processEsInitChange.setChangeStatus(ESPChangeType.CANCEL.getValue());
}
enterpriseStandardPlans = BeanCopyUtils.copyBeanList(processEsInitChanges, EnterpriseStandardPlan.class);
espService.saveOrUpdateBatch(enterpriseStandardPlans);
@@ -81,7 +90,8 @@ public class ProcessESInitChangeEndListener implements ExecutionListener {
if (ESPProjectType.RESPONSIBLE_DEPT_CHANGE.getValue().equals(projectType)) {
// 将企标计划变更状态设为变更
for (ProcessEsInitChange processEsInitChange : processEsInitChanges) {
processEsInitChange.setProjectStatus(ESPChangeType.CHANGE.getValue());
processEsInitChange.setProjectStatus(ESPProjectStatus.IN_PROGRESS.getValue());
processEsInitChange.setProjectStatus(ESPChangeType.CANCEL.getValue());
}
enterpriseStandardPlans = BeanCopyUtils.copyBeanList(processEsInitChanges, EnterpriseStandardPlan.class);
espService.saveOrUpdateBatch(enterpriseStandardPlans);
@@ -91,6 +101,8 @@ public class ProcessESInitChangeEndListener implements ExecutionListener {
if (ESPProjectType.MERGE.getValue().equals(projectType)) {
for (ProcessEsInitChange processEsInitChange : processEsInitChanges) {
processEsInitChange.setId(null);
processEsInitChange.setProjectStatus(ESPProjectStatus.IN_PROGRESS.getValue());
processEsInitChange.setChangeStatus(ESPChangeType.CHANGE.getValue());
}
// 删除两个老企标计划
espService.deleteById(processEsInitChanges.get(0).getStandardIdOne());