@@ -127,6 +127,7 @@ public class AnnualPlanLibManage { | |||||
throw new BizException("开启方案申报失败"); | throw new BizException("开启方案申报失败"); | ||||
} | } | ||||
}); | }); | ||||
projectService.updateBatchById(projects); | |||||
} | } | ||||
@Transactional(rollbackFor = Exception.class) | @Transactional(rollbackFor = Exception.class) | ||||
@@ -147,6 +148,7 @@ public class AnnualPlanLibManage { | |||||
public void suspendAnnualPlan(ProjectIdReq req) throws Exception { | public void suspendAnnualPlan(ProjectIdReq req) throws Exception { | ||||
Project project = projectService.getById(req.getProjectId()); | Project project = projectService.getById(req.getProjectId()); | ||||
stateMachine.execute(project, ProjectStatusChangeEvent.ANNUAL_PLAN_SUSPEND); | stateMachine.execute(project, ProjectStatusChangeEvent.ANNUAL_PLAN_SUSPEND); | ||||
projectService.updateById(project); | |||||
} | } | ||||
@Transactional(rollbackFor = Exception.class) | @Transactional(rollbackFor = Exception.class) | ||||
@@ -3,10 +3,9 @@ package com.ningdatech.pmapi.statemachine; | |||||
import com.alibaba.fastjson.JSON; | import com.alibaba.fastjson.JSON; | ||||
import com.ningdatech.pmapi.AppTests; | import com.ningdatech.pmapi.AppTests; | ||||
import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils; | 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.enumeration.ProjectStatusEnum; | ||||
import com.ningdatech.pmapi.projectlib.model.entity.Project; | 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 org.springframework.beans.factory.annotation.Autowired; | ||||
import java.math.BigDecimal; | import java.math.BigDecimal; | ||||