From a88066a66e55d928e6a1fe3bbaa5c6b79791cdb2 Mon Sep 17 00:00:00 2001 From: caihaohan Date: Mon, 11 Dec 2023 19:28:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=AB=8B=E9=A1=B9=E5=8F=98=E6=9B=B4?= =?UTF-8?q?=E6=B5=81=E7=A8=8B-=E5=B7=A5=E4=BD=9C=E7=BB=88=E6=AD=A2=20?= =?UTF-8?q?=E8=A6=86=E7=9B=96=E6=95=B0=E6=8D=AEBUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../listener/ProcessESInitChangeEndListener.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/process/esInitChange/listener/ProcessESInitChangeEndListener.java b/laws-modules/src/main/java/com/jero/modules/activiti/process/esInitChange/listener/ProcessESInitChangeEndListener.java index eb279df1..69838019 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/process/esInitChange/listener/ProcessESInitChangeEndListener.java +++ b/laws-modules/src/main/java/com/jero/modules/activiti/process/esInitChange/listener/ProcessESInitChangeEndListener.java @@ -1,6 +1,7 @@ package com.jero.modules.activiti.process.esInitChange.listener; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; 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; @@ -79,13 +80,15 @@ public class ProcessESInitChangeEndListener implements ExecutionListener { // 工作中止 if (ESPProjectType.WORK_TERMINATE.getValue().equals(projectType)) { + LambdaUpdateWrapper espWrapper = new LambdaUpdateWrapper<>(); // 将企标计划变更状态设为取消 for (ProcessEsInitChange processEsInitChange : processEsInitChanges) { - processEsInitChange.setProjectStatus(ESPProjectStatus.NOT_STARTED.getValue()); - processEsInitChange.setChangeStatus(ESPChangeType.CANCEL.getValue()); + espWrapper.eq(EnterpriseStandardPlan::getId, processEsInitChange.getEspId()); + espWrapper.set(EnterpriseStandardPlan::getProjectStatus, ESPProjectStatus.NOT_STARTED.getValue()); + espWrapper.set(EnterpriseStandardPlan::getChangeStatus, ESPChangeType.CANCEL.getValue()); + espService.update(espWrapper); + espWrapper.clear(); } - enterpriseStandardPlans = BeanCopyUtils.copyBeanList(processEsInitChanges, EnterpriseStandardPlan.class); - espService.saveOrUpdateBatch(enterpriseStandardPlans); } // 责任部门变更