From fe496852a1f8f994a65def060a12e005d290d0e6 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Thu, 6 Jul 2023 17:18:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BB=B6=E6=9C=9F=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DelayedApplyController.java | 7 +++++ .../projectdeclared/manage/DelayedApplyManage.java | 21 +++++++++++++ .../projectdeclared/model/vo/DelayedApplyVO.java | 34 ++++++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/vo/DelayedApplyVO.java diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/DelayedApplyController.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/DelayedApplyController.java index dfb7944..be83cc0 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/DelayedApplyController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/DelayedApplyController.java @@ -5,6 +5,7 @@ import com.ningdatech.log.annotation.WebLog; import com.ningdatech.pmapi.common.util.ExcelDownUtil; import com.ningdatech.pmapi.projectdeclared.manage.DelayedApplyManage; import com.ningdatech.pmapi.projectdeclared.model.dto.DelayedApplyDTO; +import com.ningdatech.pmapi.projectdeclared.model.vo.DelayedApplyVO; import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; import io.swagger.annotations.Api; @@ -37,6 +38,12 @@ public class DelayedApplyController { return delayedApplyManage.projectLibList(req); } + @ApiOperation(value = "延期的内容详情", notes = "延期的内容详情") + @GetMapping("/detail/{projectId}") + public DelayedApplyVO detailByProjectId(@PathVariable Long projectId) { + return delayedApplyManage.detailByProjectId(projectId); + } + @GetMapping("/export") @ApiOperation("过期的项目列表导出") @WebLog("过期的项目列表导出") diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DelayedApplyManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DelayedApplyManage.java index 9c48d94..65f193c 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DelayedApplyManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DelayedApplyManage.java @@ -26,6 +26,7 @@ import com.ningdatech.pmapi.projectdeclared.model.dto.ProjectConditionDTO; import com.ningdatech.pmapi.projectdeclared.model.entity.Contract; import com.ningdatech.pmapi.projectdeclared.model.entity.PaymentPlan; import com.ningdatech.pmapi.projectdeclared.model.entity.Purchase; +import com.ningdatech.pmapi.projectdeclared.model.vo.DelayedApplyVO; import com.ningdatech.pmapi.projectlib.enumeration.InstTypeEnum; import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; import com.ningdatech.pmapi.projectlib.enumeration.ProjectTypeEnum; @@ -33,6 +34,7 @@ import com.ningdatech.pmapi.projectlib.helper.ProjectHelper; import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage; import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO; import com.ningdatech.pmapi.projectlib.model.entity.Project; +import com.ningdatech.pmapi.projectlib.model.entity.ProjectDelayApply; import com.ningdatech.pmapi.projectlib.model.entity.ProjectInst; import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; @@ -91,6 +93,8 @@ public class DelayedApplyManage { private final IProjectInstService projectInstService; private final HistoryService historyService; + private final INdProjectDelayApplyService projectDelayApplyService; + /** * 延期的-项目列表 * @param req @@ -280,4 +284,21 @@ public class DelayedApplyManage { return instanceId; } + + /** + * 查询延期 详情 + * @param projectId + * @return + */ + public DelayedApplyVO detailByProjectId(Long projectId) { + ProjectDelayApply delayApply = projectDelayApplyService.getOne(Wrappers.lambdaQuery(ProjectDelayApply.class) + .eq(ProjectDelayApply::getProjectId, projectId) + .orderByDesc(ProjectDelayApply::getCreateOn) + .last(BizConst.LIMIT_1)); + + if(Objects.isNull(delayApply)){ + return null; + } + return BeanUtil.copyProperties(delayApply,DelayedApplyVO.class); + } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/vo/DelayedApplyVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/vo/DelayedApplyVO.java new file mode 100644 index 0000000..7bf8fcd --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/vo/DelayedApplyVO.java @@ -0,0 +1,34 @@ +package com.ningdatech.pmapi.projectdeclared.model.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotNull; + +/** + * @Classname DelayedApplyVO + * @Description + * @Date 2023/5/30 15:35 + * @Author PoffyZhang + */ +@Data +@ApiModel(value = "DelayedApplyVO", description = "延期申请") +public class DelayedApplyVO { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("项目ID") + @NotNull(message = "项目ID不能为空") + private Long projectId; + + @ApiModelProperty("延期时长 月") + @NotNull(message = "请填写时长") + private Integer delayedMonth; + + @ApiModelProperty("延期理由") + private String delayedReason; + + @ApiModelProperty("佐证材料") + private String supportingMaterials; +}