From 1599020489eaaf627a95dfab83f0dd0f3ef83b7c Mon Sep 17 00:00:00 2001 From: WendyYang Date: Mon, 4 Mar 2024 20:32:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E5=8A=9E=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=9F=A5=E8=AF=A2=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../projectdeclared/model/entity/ProjectDraft.java | 23 ++++++++++++++---- .../projectdeclared/model/vo/ProjectDraftVO.java | 15 ++++++++++++ .../pm/api/projectlib/manage/ProjectLibManage.java | 1 + .../hz/pm/api/projectlib/mapper/ProjectMapper.xml | 3 +++ .../hz/pm/api/projectlib/model/dto/ProjectDTO.java | 4 +++- .../pm/api/todocenter/manage/TodoCenterManage.java | 28 ++++++++++++++-------- 6 files changed, 59 insertions(+), 15 deletions(-) diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/ProjectDraft.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/ProjectDraft.java index f42f16a..11a0247 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/ProjectDraft.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/ProjectDraft.java @@ -24,7 +24,7 @@ import java.time.LocalDateTime; * @since 2023-02-06 */ @TableName("nd_project_draft") -@ApiModel(value = "NdProjectDraft对象", description = "") +@ApiModel(value = "NdProjectDraft对象") @Data @Builder @NoArgsConstructor @@ -184,9 +184,6 @@ public class ProjectDraft implements Serializable { @ApiModelProperty("年度支付计划") private String paymentPlans; - @ApiModelProperty("立项批复资金(万元)") - private BigDecimal approvalAmount; - private LocalDateTime annualPlanAddTime; @ApiModelProperty("核心业务-核心业务模块") @@ -367,4 +364,22 @@ public class ProjectDraft implements Serializable { @ApiModelProperty("申报单位领域") private Integer unitStrip; + @ApiModelProperty("评审金额") + private BigDecimal reviewAmount; + + @ApiModelProperty("批复-自有金额(万元)") + @Compare("批复-自有金额") + private BigDecimal approvalHaveAmount; + + @ApiModelProperty("批复-政府投资-本级财政资金(万元)") + @Compare("批复-政府投资-本级财政资金") + private BigDecimal approvalGovOwnFinanceAmount; + + @ApiModelProperty("批复-政府投资-上级补助资金(万元)") + @Compare("批复-政府投资-上级补助资金") + private BigDecimal approvalGovSuperiorFinanceAmount; + + @ApiModelProperty("立项批复资金(万元)") + private BigDecimal approvalAmount; + } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/ProjectDraftVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/ProjectDraftVO.java index 871982c..68bb9f8 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/ProjectDraftVO.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/ProjectDraftVO.java @@ -390,4 +390,19 @@ public class ProjectDraftVO { @ApiModelProperty("申报单位领域") private Integer unitStrip; + @ApiModelProperty("评审金额") + private BigDecimal reviewAmount; + + @ApiModelProperty("批复-自有金额(万元)") + @Compare("批复-自有金额") + private BigDecimal approvalHaveAmount; + + @ApiModelProperty("批复-政府投资-本级财政资金(万元)") + @Compare("批复-政府投资-本级财政资金") + private BigDecimal approvalGovOwnFinanceAmount; + + @ApiModelProperty("批复-政府投资-上级补助资金(万元)") + @Compare("批复-政府投资-上级补助资金") + private BigDecimal approvalGovSuperiorFinanceAmount; + } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java index 017adb0..ef89a5e 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java @@ -468,6 +468,7 @@ public class ProjectLibManage { item.setAreaCode(w.getAreaCode()); item.setCreateOn(w.getCreateOn()); item.setDeclaredAmount(w.getDeclareAmount()); + item.setReviewAmount(w.getReviewAmount()); item.setStage(w.getStage()); item.setStatus(w.getStatus()); item.setProjectType(w.getProjectType()); diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectMapper.xml b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectMapper.xml index 80fda28..403ccab 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectMapper.xml +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectMapper.xml @@ -294,6 +294,7 @@ build_org_name, project_code, project_type, + review_amount, area, area_code, declare_amount, @@ -322,6 +323,7 @@ area_code, declare_amount, approval_amount, + review_amount, stage, status, biz_domain, @@ -394,6 +396,7 @@ (CASE WHEN b.base_area_code IS NOT NULL then substring(b.base_area_code,0,6) end) area_code, apply.base_proj_decl_amount declare_amount, approve.base_initial_review_total_money approval_amount, + null review_amount, NULL stage, CAST(b.base_proj_set_prog AS INTEGER) status, apply.base_proj_decl_amount annual_plan_amount, diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/ProjectDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/ProjectDTO.java index 7c30e5d..88d6b30 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/ProjectDTO.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/ProjectDTO.java @@ -6,7 +6,6 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; -import java.io.Serializable; import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.List; @@ -383,4 +382,7 @@ public class ProjectDTO { @ApiModelProperty("申报单位领域") private Integer unitStrip; + @ApiModelProperty("评审金额") + private BigDecimal reviewAmount; + } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java index 2e0e783..fc982b0 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java @@ -665,6 +665,9 @@ public class TodoCenterManage { List projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class) .in(ProjectInst::getProjectId, projectIdList) .orderByDesc(ProjectInst::getProjectId)); + if (projectInstList.isEmpty()) { + return PageVo.empty(); + } Map projectInfoMap = projectInstList.stream() .filter(p -> StringUtils.isNotBlank(p.getInstCode()) && !TodoCenterConst.Declared.NULL_INST_CODE.equals(p.getInstCode())) @@ -809,6 +812,9 @@ public class TodoCenterManage { List projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class) .in(ProjectInst::getProjectId, projectIdList) .orderByDesc(ProjectInst::getProjectId)); + if (projectInstList.isEmpty()) { + return PageVo.empty(); + } Map projectInfoMap = projectInstList.stream() .filter(p -> StringUtils.isNotBlank(p.getInstCode()) && !TodoCenterConst.Declared.NULL_INST_CODE.equals(p.getInstCode())) @@ -1514,22 +1520,24 @@ public class TodoCenterManage { String userIdStr = String.valueOf(userId); // 获取登录用户全量信息 // 获取员工浙政钉code - TodoNumVO todoNumVo = new TodoNumVO(); + TodoNumVO retTodoNum = new TodoNumVO(); // 查出项目库项目 ProjectListReq projectListReq = new ProjectListReq(); BeanUtils.copyProperties(param, projectListReq); List projects = projectLibManage.projectList(projectListReq); if (CollUtil.isEmpty(projects)) { - return todoNumVo; + return retTodoNum; } // 再查出项目关联的流程实例ID - List projectIdList = projects.stream().map(Project::getId).collect(Collectors.toList()); - + List projectIdList = CollUtils.fieldList(projects, Project::getId); List projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class) .in(ProjectInst::getProjectId, projectIdList) .orderByDesc(ProjectInst::getProjectId)); - List instCodes = projectInstList.stream().map(ProjectInst::getInstCode).collect(Collectors.toList()); + if (projectInstList.isEmpty()) { + return retTodoNum; + } + List instCodes = CollUtils.fieldList(projectInstList, ProjectInst::getInstCode); // 查出用户工作流 TodoCenterListReqDTO req = new TodoCenterListReqDTO(); req.setInstCodes(instCodes); @@ -1547,7 +1555,7 @@ public class TodoCenterManage { .reversed()) .collect(Collectors.toList()); if (CollUtil.isEmpty(list)) { - return todoNumVo; + return retTodoNum; } Map projectsMap = projects.stream().collect(Collectors.toMap(Project::getId, v -> v)); @@ -1560,22 +1568,22 @@ public class TodoCenterManage { .map(d -> projectInfoMap.get(d.getInstanceId())) .collect(Collectors.toList()); if (CollUtil.isNotEmpty(projectList)) { - todoNumVo.setTotalNum(projectList.size()); + retTodoNum.setTotalNum(projectList.size()); } // 筛选出增补项目和非增补项目 List appendProjects = projectList.stream() .filter(p -> IsAppendProjectEnum.APPEND_PROJECT.getCode().equals(p.getIsTemporaryAugment())) .collect(Collectors.toList()); if (CollUtil.isNotEmpty(appendProjects)) { - todoNumVo.setAppendNum(appendProjects.size()); + retTodoNum.setAppendNum(appendProjects.size()); } List notAppendProjects = projectList.stream() .filter(p -> IsAppendProjectEnum.NOT_APPEND_PROJECT.getCode().equals(p.getIsTemporaryAugment())) .collect(Collectors.toList()); if (CollUtil.isNotEmpty(notAppendProjects)) { - todoNumVo.setNotAppendNum(notAppendProjects.size()); + retTodoNum.setNotAppendNum(notAppendProjects.size()); } - return todoNumVo; + return retTodoNum; } /**