Browse Source

延期项目

master
PoffyZhang 1 year ago
parent
commit
ea58549eae
2 changed files with 6 additions and 5 deletions
  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 View File

@@ -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 View File

@@ -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…
Cancel
Save