소스 검색

中期支付证书

yangyj 1 년 전
부모
커밋
40642cd703

+ 3 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/MeterInfo.java

@@ -33,4 +33,7 @@ public class MeterInfo {
     List<StartPayForm> startPayFormAll;
     /*变更令,按照计量清单*/
     List<ChangeToken> changeTokenList;
+    /**合同段所有支付项信息*/
+    List<MidPayItem> midPayItemList;
+
 }

+ 2 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/formula/impl/ExecutorFormat.java

@@ -75,4 +75,6 @@ public class ExecutorFormat extends FormulaExecutor {
 
 
 
+
+
 }

+ 3 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/formula/impl/ExecutorInit.java

@@ -34,6 +34,7 @@ public class ExecutorInit extends FormulaExecutor {
     private Function<Long, List<StartPayForm>> stayPayFormFc;
     private Function<Long, List<Material>> materialFormFc;
     private Function<Long,List<MeterPeriodInfo>> interimMeterPeriodAllFc;
+    private Function<Long, List<MidPayItem>> midPayItemListFc;
 
     private Function<Long,List<ChangeToken>> changeTokenFc;
     public static final String SZ="[ 一二三四五六七八九十]+";
@@ -57,6 +58,8 @@ public class ExecutorInit extends FormulaExecutor {
         }else if(MeterType.INTERIM.equals(tec.getMeterType())||MeterType.INTERIM_JL.equals(tec.getMeterType())){
             /*计量期*/
             List<MeterPeriodInfo> meterPeriodInfoList = interimMeterPeriodAllFc.apply(tec.getContractId());
+            /*支付项信息*/
+            tec.meterInfo.setMidPayItemList(midPayItemListFc.apply(tec.getContractId()));
             for(MeterPeriodInfo mpi:meterPeriodInfoList){
                 tec.meterInfo.getMeterPeriodInfoLinkedHashMap().put(mpi.getId(),mpi);
             }

+ 30 - 4
blade-service/blade-manager/src/main/java/org/springblade/manager/formula/impl/ExecutorMeter.java

@@ -37,7 +37,7 @@ import java.util.stream.IntStream;
 public class ExecutorMeter extends FormulaExecutor {
   /*  private Function<Long, List<Material>> materialFormFc;*/
     private Function<Long, List<Payment>> paymentListFc;
-    private Function<Long, List<MidPayItem>> midPayItemListFc;
+   /* private Function<Long, List<MidPayItem>> midPayItemListFc;*/
     private Function<Long, List<InventoryForm>> inventoryFormFc;
     private Function<Long, List<MeterApply>> meterApplyFc;
     private Function<Long, List<StartPayForm>> stayPayFormFc;
@@ -493,15 +493,41 @@ public class ExecutorMeter extends FormulaExecutor {
             /*本期实际支付合计计算*/
             interimPaymentCertificates= new ArrayList<>(paymentCertificateMap.values());
             /*合同段支付项*/
-            List<MidPayItem> midPayItemList=midPayItemListFc.apply(tec.getContractId());
+            List<MidPayItem> midPayItemList=tec.meterInfo.getMidPayItemList();
              if(Func.isNotEmpty(midPayItemList)){
+                 List<InterimPaymentCertificate> payItemZj=new ArrayList<>();
+                 if(MeterInfo.MB_ZJ.equals(tec.meterInfo.getConfig())){
+                     payItemZj.add(new InterimPaymentCertificate("小计"));
+                     payItemZj.add(new InterimPaymentCertificate("价格调整"));
+                     payItemZj.add(new InterimPaymentCertificate("合计"));
+                     payItemZj.add(new InterimPaymentCertificate("索赔金额"));
+                     payItemZj.add(new InterimPaymentCertificate("违约罚金"));
+                     payItemZj.add(new InterimPaymentCertificate("迟付款利息"));
+                     payItemZj.add(new InterimPaymentCertificate("动员预付款"));
+                     payItemZj.add(new InterimPaymentCertificate("扣回动员预付款"));
+                     payItemZj.add(new InterimPaymentCertificate("材料设备垫付款"));
+                     payItemZj.add(new InterimPaymentCertificate("扣回材料设备垫付款"));
+                     payItemZj.add(new InterimPaymentCertificate("保留金"));
+                     payItemZj.add(new InterimPaymentCertificate("实际支付"));
+                 }
                  midPayItemList.forEach(e->{
                      InterimPaymentCertificate ipc = paymentCertificateMap.get(e.getPayNumber());
                      if(ipc==null){
-                         ipc= new InterimPaymentCertificate(e.getPayName());
+                         if(MeterInfo.MB_ZJ.equals(tec.meterInfo.getConfig())){
+                             if((e.getPayName().contains("章")||e.getPayName().contains("暂定"))){
+                                 ipc = new InterimPaymentCertificate(e.getPayName());
+                             }
+                         }else {
+                             ipc = new InterimPaymentCertificate(e.getPayName());
+                         }
+                     }
+                     if(ipc!=null) {
+                         dataList.add(ipc);
                      }
-                      dataList.add(ipc);
                  });
+                 if(payItemZj.size()>0){
+                     dataList.addAll(payItemZj);
+                 }
              }
             /*数据获取end*/
              double total=dataList.stream().map(InterimPaymentCertificate::getCurrentPeriodPay).mapToDouble(BaseUtils::obj2DoubleZero).sum();