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;