Browse Source

2-11分页

yangyj 2 months ago
parent
commit
f945abd8fb

+ 2 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/MaterialsArrival.java

@@ -20,6 +20,8 @@ public class MaterialsArrival implements  DataModel{
     private String periodNumber;
     @JSONField(name = "key_2",label="材料名称",ordinal = 1)
     private String name;
+    /**合同材料*/
+    private String contractMaterialName;
     @JSONField(name = "key_3",label="单位",ordinal = 1)
     private String unit;
     @JSONField(name = "key_4",label="数量",ordinal = 1)

+ 2 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/formula/impl/ExecutorMeter.java

@@ -851,6 +851,7 @@ public class ExecutorMeter extends FormulaExecutor {
                             ma.setPeriodNumber(tec.periodInfo.getPeriodNumber());
                             ma.setName(e.getFormMaterialName());
                             /*ma.setName(e.getMaterialName());*/
+                            ma.setContractMaterialName(e.getMaterialName());
                             ma.setUnit(e.getUnit());
                             ma.setQuantity(e.getMeterAmount());
                             ma.setPrice(e.getPrice());
@@ -872,7 +873,7 @@ public class ExecutorMeter extends FormulaExecutor {
                    v1.setQuantity(addFc.apply(v1.getQuantity(),v2.getQuantity()));
                    return v1;
                },LinkedHashMap::new)).values());*/
-                LinkedHashMap<String,List<MaterialsArrival>> group= list.stream().collect(Collectors.groupingBy(MaterialsArrival::getName, LinkedHashMap::new,Collectors.toList()));
+                LinkedHashMap<String,List<MaterialsArrival>> group= list.stream().collect(Collectors.groupingBy(MaterialsArrival::getContractMaterialName, LinkedHashMap::new,Collectors.toList()));
                int rowSize= capacity;
                 AtomicInteger sn= new AtomicInteger(1);
                 AtomicBoolean isLast= new AtomicBoolean(false);