瀏覽代碼

延期项目

master
PoffyZhang 1 年之前
父節點
當前提交
ea58549eae
共有 2 個文件被更改,包括 6 次插入5 次删除
  1. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/DelayedApplyController.java
  2. +5
    -4
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DelayedApplyManage.java

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/DelayedApplyController.java 查看文件

@@ -43,7 +43,7 @@ public class DelayedApplyController {
}

@ApiOperation(value = "延期申报", notes = "延期申报")
@PostMapping("/delayed-apply")
@PostMapping("/apply")
public String delayedApply(@Validated @RequestBody DelayedApplyDTO dto) {
return delayedApplyManage.delayedApply(dto);
}


+ 5
- 4
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DelayedApplyManage.java 查看文件

@@ -168,11 +168,12 @@ public class DelayedApplyManage {
VUtils.isTrue(Objects.isNull(project)).throwMessage("提交失败 此项目不存在!");

//首先要判断 项目当前状态 是不是 以终验
VUtils.isTrue(!ProjectStatusEnum.ACCEPTED.getCode().equals(project.getStatus()) ||
!ProjectStatusEnum.ARCHIVED.getCode().equals(project.getStage()))
.throwMessage("提交失败 该项目不是 已归档");
VUtils.isTrue(!ProjectStatusEnum.TO_BE_FINALLY_INSPECTED.getCode().equals(project.getStatus()) ||
!ProjectStatusEnum.PROJECT_APPROVED.getCode().equals(project.getStage()))
.throwMessage("提交失败 该项目不是 已立项|待终验");

VUtils.isTrue(project.getPlanAcceptanceTime().compareTo(LocalDateTime.now()) <= 0)
VUtils.isTrue(Objects.isNull(project.getPlanAcceptanceTime())
|| project.getPlanAcceptanceTime().compareTo(LocalDateTime.now()) <= 0)
.throwMessage("当前项目还未过期验收");

return "申请发起成功";


Loading…
取消
儲存