소스 검색

年度计划暂缓

master
WendyYang 1 년 전
부모
커밋
99b3994968
4개의 변경된 파일39개의 추가작업 그리고 2개의 파일을 삭제
  1. +8
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/AnnualPlanController.java
  2. +7
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java
  3. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectApprovedReq.java
  4. +23
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectIdReq.java

+ 8
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/AnnualPlanController.java 파일 보기

@@ -4,6 +4,7 @@ import com.ningdatech.basic.model.PageVo;
import com.ningdatech.log.annotation.WebLog;
import com.ningdatech.pmapi.projectlib.manage.AnnualPlanLibManage;
import com.ningdatech.pmapi.projectlib.model.req.ProjectApprovedReq;
import com.ningdatech.pmapi.projectlib.model.req.ProjectIdReq;
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq;
import com.ningdatech.pmapi.projectlib.model.req.StartProjectDeclareReq;
import com.ningdatech.pmapi.projectlib.model.vo.AnnualPlanListItemVO;
@@ -50,4 +51,11 @@ public class AnnualPlanController {
annualPlanLibManage.projectApproved(req);
}

@PostMapping("/suspendAnnualPlan")
@ApiOperation("暂缓年度计划")
@WebLog("暂缓年度计划")
public void suspendAnnualPlan(@RequestBody @Valid ProjectIdReq req) throws Exception {
annualPlanLibManage.suspendAnnualPlan(req);
}

}

+ 7
- 1
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java 파일 보기

@@ -13,6 +13,7 @@ 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.ProjectIdReq;
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq;
import com.ningdatech.pmapi.projectlib.model.req.StartProjectDeclareReq;
import com.ningdatech.pmapi.projectlib.model.vo.AnnualPlanListItemVO;
@@ -47,7 +48,6 @@ public class AnnualPlanLibManage {
*/
private static final List<ProjectStatusEnum> ANNUAL_PLAN_LIST_STATUS = Arrays.asList(
IN_THE_ANNUAL_PLAN,
BE_SUSPENDED,
SCHEME_UNDER_REVIEW,
SCHEME_REVIEW_FAILED,
TO_BE_APPROVED,
@@ -123,4 +123,10 @@ public class AnnualPlanLibManage {
projectService.update(update);
}

@Transactional(rollbackFor = Exception.class)
public void suspendAnnualPlan(ProjectIdReq req) throws Exception {
Project project = projectService.getById(req.getProjectId());
stateMachine.execute(project, ProjectStatusChangeEvent.ANNUAL_PLAN_SUSPEND);
}

}

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectApprovedReq.java 파일 보기

@@ -40,7 +40,7 @@ public class ProjectApprovedReq {
@ApiModelProperty("建设周期")
@NotNull(message = "建设周期不能为空")
@Range(min = 1, max = 99999, message = "建设周期无效")
private LocalDate buildCycle;
private Integer buildCycle;

@ApiModelProperty("批复文件ID")
@NotNull(message = "批复文件不能为空")


+ 23
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectIdReq.java 파일 보기

@@ -0,0 +1,23 @@
package com.ningdatech.pmapi.projectlib.model.req;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
* <p>
* ProjectIdReq
* </p>
*
* @author WendyYang
* @since 09:32 2023/2/13
*/
@Data
public class ProjectIdReq {

@ApiModelProperty("项目ID")
@NotNull(message = "项目ID不能为空")
private Long projectId;

}

불러오는 중...
취소
저장