Эх сурвалжийг харах

Merge branch 'master' of http://39.108.216.210:3000/zhuwei/bladex

huangtf 7 сар өмнө
parent
commit
629ba1188b

+ 4 - 2
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/InterimPaymentCertificate.java

@@ -17,6 +17,9 @@ public class InterimPaymentCertificate implements  DataModel{
     public static final String ID="20210000000";
     public static final String TBN="IPayCert";
     public static final String TBN_CH="中期支付证书";
+    /**清单名称*/
+    @JSONField(name = "key_0",label="清单名称",ordinal = 1)
+    private String formName;
     /**项目名称*/
     @JSONField(name = "key_1",label="项目名称",ordinal = 1)
     private String chapterSeq;
@@ -52,8 +55,7 @@ public class InterimPaymentCertificate implements  DataModel{
     private String constructionTotal;
     /**是否是汇总小结数据,输出的时候显示,计算的时候不参与*/
     private Boolean isSummary=false;
-    /**清单名称*/
-    private String formName;
+
 
     public InterimPaymentCertificate(String chapterSeq) {
         this.chapterSeq = chapterSeq;

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

@@ -25,9 +25,11 @@ public class MeterInfo {
     private Integer config=MB_GX;
     /**合同信息*/
     BaseInfo baseInfo;
-    /**计量期信息*/
+    /**本合同段所有中期计量期信息(如果需要也可以是材料预、开工的计量期)*/
     LinkedHashMap<Long,MeterPeriodInfo> meterPeriodInfoLinkedHashMap= new LinkedHashMap<>();
     /**加载合同材料、材料清单*/
     List<Material> materialsAll;
+    /**合同段所有开工预付款信息*/
+    List<StartPayForm> startPayFormAll;
 
 }

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

@@ -59,9 +59,9 @@ public class ExecutorFormat extends FormulaExecutor {
                Set<String> mergeSet= IntStream.range(0, Math.min(la.size(),lb.size())).boxed().map(i->{
                     ElementData ea=la.get(i);
                     ElementData eb=lb.get(i);
-                    String b= eb.stringValue();
-                    if(b.contains("合计")){
-                        return  ea.getIndex()+"@"+ea.getX()+"@"+ea.getY()+"@"+eb.getX()+"@"+eb.getY();
+                    String a= ea.stringValue();
+                    if(a!=null&&!a.matches("^\\d+.+")){
+                        return  ea.getIndex()+"@"+ea.getX()+"@"+ea.getY()+"@"+(eb.getX()+1)+"@"+eb.getY();
                     }
                     return StringPool.EMPTY;
                 }).filter(s->!StringPool.EMPTY.equals(s)).collect(Collectors.toSet());

+ 6 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/formula/impl/ExecutorInit.java

@@ -31,7 +31,7 @@ public class ExecutorInit extends FormulaExecutor {
     private Function<Long, BaseInfo> baseInfoFc;
     private Function<Long, MeterPeriodInfo>  meterPeriodFc;
     private Function<Long, List<MeterTree>> meterTreeFc;
-    /*private Function<Long, MeterPeriodInfo> interimMeterPeriodFc;*/
+    private Function<Long, List<StartPayForm>> stayPayFormFc;
     private Function<Long, List<Material>> materialFormFc;
     private Function<Long,List<MeterPeriodInfo>> interimMeterPeriodAllFc;
 
@@ -69,6 +69,11 @@ public class ExecutorInit extends FormulaExecutor {
             tec.periodInfo.setPeriodName(tec.periodInfo.getPeriodNumber());
             /*计量单元树*/
             tec.meterInfo.setMeterTreeMap(getMeterTreeMapAsync(tec.getContractId()));
+            List<StartPayForm> startPayFormAll=stayPayFormFc.apply(tec.getContractId());
+            if(startPayFormAll!=null&&startPayFormAll.size()>0){
+                /*获取合同段所有的开工报告信息*/
+                tec.meterInfo.setStartPayFormAll(startPayFormAll);
+            }
         }
         tec.setPeriodId(tec.periodInfo.getId());
         String periodNumber = tec.periodInfo.getPeriodNumber();

+ 3 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/FormulaServiceImpl.java

@@ -1244,6 +1244,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
                 sta.flush();
                 /*把主表的表头表尾信息拷贝*/
                 headerFooterSub(subTableFds,tec);
+                /*如果识别到手填内容需要在附表写入数据后,更新评定关联数据*/
             }
         } catch (Exception e) {
             e.printStackTrace();
@@ -1454,7 +1455,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
                     ElementBlock eb = elementBlockMap.get(c.getCode());
                     ItemBlock targetItem = itemBlockMap.get(c.getCode() + ":" + tec.getCurrentNode().getPkId());
                     List<Object> list = c.getValues().stream().map(ElementData::getValue).filter(StringUtils::isNotEmpty).collect(Collectors.toList());
-                    /*1.无任何记录,当前页无数据,则不需要处理 2.存在记录当前无数据,则要消除 3.没有记录当前有数据,则需要增加 4.有记录有当前记录,则需更新*/
+                    /*1.无任何记录,当前页无数据,则不需要处理 2.存在记录当前无数据,则要消除 3.没有记录当前有数据,则需要增加 4.有记录有当前数据,则需更新*/
                     if (Func.isNotEmpty(list) || targetItem != null) {
                         FormData designList = itemMatch(c, 0,tec);
                         FormData pass = itemMatch(c, 1,tec);
@@ -1483,7 +1484,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
                                 int len = targetItem.getDesigns().size();
                                 targetItem.setData(new ArrayList<>(list.stream().collect(Collectors.groupingBy(k -> index.getAndIncrement() / len, LinkedHashMap::new, Collectors.toList())).values()));
                             } else {
-                                /*targetItem.setData(Collections.singletonList(list.stream().map(StringUtils::obj2Double).collect(Collectors.toList())));*/
+                                /*targetItem.setData(Collections.singletonList(list.stream().map(StringUtils::obj2Double).collect(Collectors.toList())));不一定是标准数字格式*/
                                 targetItem.setData(Collections.singletonList(list));
                             }
                             if (pass != null && !pass.empty()) {