yangyj 2 ヶ月 前
コミット
c0e0d17769

+ 6 - 1
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/SubprojectInterimPaymentSummary.java

@@ -107,11 +107,16 @@ public class SubprojectInterimPaymentSummary  implements  DataModel{
 
     public void calculate(List<SubprojectInterimPaymentSummary> data,Integer scale){
         if(data!=null&&data.size()>0){
-
+            /*合同金额*/
+            count(this::setContractMoney,data,SubprojectInterimPaymentSummary::getContractMoney,scale);
             /*本次支付*/
             count(this::setCurrentPeriodPay,data,SubprojectInterimPaymentSummary::getCurrentPeriodPay,scale);
             /*本次累计支付*/
             count(this::setCurrentPeriodEndPay,data,SubprojectInterimPaymentSummary::getCurrentPeriodEndPay,scale);
+            BigDecimal ra=BaseUtils.str2BigDecimal(this.currentPeriodPay).multiply(new BigDecimal(100)).divide(BaseUtils.str2BigDecimal(this.contractMoney),2,RoundingMode.HALF_UP);
+            if(BigDecimal.ZERO.compareTo(ra)<0) {
+                setPayRatio(ra.stripTrailingZeros().toPlainString()+"%");
+            }
         }
     }