|
|
@@ -1,6 +1,8 @@ |
|
|
|
package com.ningdatech.pmapi.projectlib.manage; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.ningdatech.basic.exception.BizException; |
|
|
|
import com.ningdatech.basic.model.PageVo; |
|
|
@@ -10,6 +12,7 @@ import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils; |
|
|
|
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; |
|
|
|
import com.ningdatech.pmapi.projectlib.helper.ProjectHelper; |
|
|
|
import com.ningdatech.pmapi.projectlib.model.entity.Project; |
|
|
|
import com.ningdatech.pmapi.projectlib.model.req.ProjectApprovedReq; |
|
|
|
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; |
|
|
|
import com.ningdatech.pmapi.projectlib.model.req.StartProjectDeclareReq; |
|
|
|
import com.ningdatech.pmapi.projectlib.model.vo.AnnualPlanListItemVO; |
|
|
@@ -106,4 +109,18 @@ public class AnnualPlanLibManage { |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void projectApproved(ProjectApprovedReq req) throws Exception { |
|
|
|
Project project = projectService.getById(req.getProjectId()); |
|
|
|
stateMachine.execute(project, ProjectStatusChangeEvent.PROJECT_APPROVAL); |
|
|
|
LambdaUpdateWrapper<Project> update = Wrappers.lambdaUpdate(Project.class) |
|
|
|
.set(Project::getApprovalAmount, req.getApprovedAmount()) |
|
|
|
.set(Project::getApprovedFile, req.getApprovedFileId()) |
|
|
|
.set(Project::getBuildCycle, req.getBuildCycle()) |
|
|
|
.set(Project::getConstructionPlanFile, req.getBuildPlanFileId()) |
|
|
|
.set(Project::getApprovalDate, req.getApprovedDate()) |
|
|
|
.eq(Project::getId, req.getProjectId()); |
|
|
|
projectService.update(update); |
|
|
|
} |
|
|
|
|
|
|
|
} |