Procházet zdrojové kódy

优化金额 判断

tags/24080901
PoffyZhang před 1 rokem
rodič
revize
20f4a05ee5
2 změnil soubory, kde provedl 16 přidání a 13 odebrání
  1. +13
    -10
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java
  2. +3
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CheckProvincialReviewResultTask.java

+ 13
- 10
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java Zobrazit soubor

@@ -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){


+ 3
- 3
pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CheckProvincialReviewResultTask.java Zobrazit soubor

@@ -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<Project> 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());


Načítá se…
Zrušit
Uložit