From 1d81fe9c1b18ffb7bb1255ec33641d72a702bd64 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Thu, 9 Mar 2023 17:08:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=80=E5=90=AF=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=94=B3=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java | 2 ++ .../test/java/com/ningdatech/pmapi/statemachine/StateMachineTest.java | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java index e2db4ad..868599b 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java @@ -127,6 +127,7 @@ public class AnnualPlanLibManage { throw new BizException("开启方案申报失败"); } }); + projectService.updateBatchById(projects); } @Transactional(rollbackFor = Exception.class) @@ -147,6 +148,7 @@ public class AnnualPlanLibManage { public void suspendAnnualPlan(ProjectIdReq req) throws Exception { Project project = projectService.getById(req.getProjectId()); stateMachine.execute(project, ProjectStatusChangeEvent.ANNUAL_PLAN_SUSPEND); + projectService.updateById(project); } @Transactional(rollbackFor = Exception.class) diff --git a/pmapi/src/test/java/com/ningdatech/pmapi/statemachine/StateMachineTest.java b/pmapi/src/test/java/com/ningdatech/pmapi/statemachine/StateMachineTest.java index 63b8810..4e6b197 100644 --- a/pmapi/src/test/java/com/ningdatech/pmapi/statemachine/StateMachineTest.java +++ b/pmapi/src/test/java/com/ningdatech/pmapi/statemachine/StateMachineTest.java @@ -3,10 +3,9 @@ package com.ningdatech.pmapi.statemachine; import com.alibaba.fastjson.JSON; import com.ningdatech.pmapi.AppTests; import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils; -import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; import com.ningdatech.pmapi.projectlib.model.entity.Project; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import java.math.BigDecimal;