From 20f4a05ee53db8ec4a401d749e8a5e78300cbd0c Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Fri, 17 Mar 2023 09:58:12 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=87=91=E9=A2=9D=20?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/DefaultDeclaredProjectManage.java | 23 ++++++++++++---------- .../task/CheckProvincialReviewResultTask.java | 6 +++--- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java index 34ad67b..b225a2b 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java @@ -86,16 +86,19 @@ public class DefaultDeclaredProjectManage { VUtils.isTrue(declareAmount.compareTo(totalAmount) != 0) .throwMessage(String.format("申报失败! 申报总金额【{}】 不等于其它申报金额 【{}】",declareAmount,totalAmount)); - BigDecimal annualPlanAmount = projectInfo.getAnnualPlanAmount(); - BigDecimal annualGovSuperAmount = projectInfo.getAnnualPlanGovSuperiorFinanceAmount(); - BigDecimal annualOwnSuperAmount = projectInfo.getAnnualPlanGovOwnFinanceAmount(); - BigDecimal annualBankLendingAmount = projectInfo.getAnnualPlanBankLendingAmount(); - BigDecimal annualHaveAmount = projectInfo.getAnnualPlanHaveAmount(); - BigDecimal anualOtherAmount = projectInfo.getAnnualPlanOtherAmount(); - BigDecimal totalAnnual = annualGovSuperAmount - .add(annualOwnSuperAmount).add(annualBankLendingAmount).add(annualHaveAmount).add(anualOtherAmount); - VUtils.isTrue(annualPlanAmount.compareTo(totalAnnual) != 0) - .throwMessage(String.format("申报失败! 年度支付总金额【{}】 不等于其它年度支付金额 【{}】",annualPlanAmount,totalAnnual)); + //判断 年度计划金额 如果开着的话 + if(projectInfo.getIsAnnualPlanAmount()){ + BigDecimal annualPlanAmount = projectInfo.getAnnualPlanAmount(); + BigDecimal annualGovSuperAmount = projectInfo.getAnnualPlanGovSuperiorFinanceAmount(); + BigDecimal annualOwnSuperAmount = projectInfo.getAnnualPlanGovOwnFinanceAmount(); + BigDecimal annualBankLendingAmount = projectInfo.getAnnualPlanBankLendingAmount(); + BigDecimal annualHaveAmount = projectInfo.getAnnualPlanHaveAmount(); + BigDecimal anualOtherAmount = projectInfo.getAnnualPlanOtherAmount(); + BigDecimal totalAnnual = annualGovSuperAmount + .add(annualOwnSuperAmount).add(annualBankLendingAmount).add(annualHaveAmount).add(anualOtherAmount); + VUtils.isTrue(annualPlanAmount.compareTo(totalAnnual) != 0) + .throwMessage(String.format("申报失败! 年度支付总金额【{}】 不等于其它年度支付金额 【{}】",annualPlanAmount,totalAnnual)); + } } public ProcessInstanceUserDto buildUser(Long userId){ diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CheckProvincialReviewResultTask.java b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CheckProvincialReviewResultTask.java index 3542bbe..b10e960 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CheckProvincialReviewResultTask.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CheckProvincialReviewResultTask.java @@ -39,14 +39,14 @@ public class CheckProvincialReviewResultTask { private final IProjectService projectService; private final StateMachineUtils stateMachineUtils; - @Scheduled(cron = "0 */5 * * * ?") + @Scheduled(cron = "0 */1 * * * ?") public void statusFlow() throws UnknownHostException { //测试暂时用自己电脑HOST if (TaskContant.Host.HOST_ZPF.equals(InetAddress.getLocalHost().getHostName())) { //1. 定时取 省级部门联审中的项目 去取项目 List projectList = projectService.list(Wrappers.lambdaQuery(Project.class) - .eq(Project::getStage, ProjectStatusEnum.NOT_APPROVED) - .eq(Project::getStatus, ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS) + .eq(Project::getStage, ProjectStatusEnum.NOT_APPROVED.getCode()) + .eq(Project::getStatus, ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS.getCode()) .orderByAsc(Project::getCreateOn)); log.info("需要去查询省级联审结果的项目 size:{}",projectList.size()); From 75f9aa8f348586a4250f7375d1941560c27b2018 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Fri, 17 Mar 2023 10:41:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=87=91=E9=A2=9D=20?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ningdatech/pmapi/provincial/model/res/ProcessCommentRes.java | 4 ++++ .../pmapi/provincial/model/res/ProvincialApplicationRes.java | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/provincial/model/res/ProcessCommentRes.java b/pmapi/src/main/java/com/ningdatech/pmapi/provincial/model/res/ProcessCommentRes.java index 44bd830..a7486f6 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/provincial/model/res/ProcessCommentRes.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/provincial/model/res/ProcessCommentRes.java @@ -2,8 +2,10 @@ package com.ningdatech.pmapi.provincial.model.res; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; +import lombok.NoArgsConstructor; /** * @Classname ProcessCommentDTO @@ -14,6 +16,8 @@ import lombok.Data; @Data @Builder @ApiModel(value = "ProcessCommentRes", description = "省局返回流程审核详情") +@AllArgsConstructor +@NoArgsConstructor public class ProcessCommentRes { @ApiModelProperty("任务id") diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/provincial/model/res/ProvincialApplicationRes.java b/pmapi/src/main/java/com/ningdatech/pmapi/provincial/model/res/ProvincialApplicationRes.java index ae67383..a505ec8 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/provincial/model/res/ProvincialApplicationRes.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/provincial/model/res/ProvincialApplicationRes.java @@ -2,8 +2,10 @@ package com.ningdatech.pmapi.provincial.model.res; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import io.swagger.annotations.ApiModel; +import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; +import lombok.NoArgsConstructor; import java.io.Serializable; import java.util.List; @@ -17,6 +19,8 @@ import java.util.List; @Data @Builder @ApiModel(value = "ProvincialApplicationRes", description = "") +@NoArgsConstructor +@AllArgsConstructor public class ProvincialApplicationRes implements Serializable { @@ -89,6 +93,8 @@ public class ProvincialApplicationRes implements Serializable { @Builder @JsonIgnoreProperties(value = { "handler"}) + @NoArgsConstructor + @AllArgsConstructor public static class Cloud implements Serializable { //云资源台数 11 private Integer cloudNums;