|
@@ -35,7 +35,7 @@ import java.util.stream.IntStream;
|
|
|
@EqualsAndHashCode(callSuper = true)
|
|
|
@Data
|
|
|
public class ExecutorMeter extends FormulaExecutor {
|
|
|
- private Function<Long, List<Material>> materialFormFc;
|
|
|
+ /* private Function<Long, List<Material>> materialFormFc;*/
|
|
|
private Function<Long, List<Payment>> paymentListFc;
|
|
|
private Function<Long, List<MidPayItem>> midPayItemListFc;
|
|
|
private Function<Long, List<InventoryForm>> inventoryFormFc;
|
|
@@ -53,6 +53,9 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
/**累计到本期末支付信息*/
|
|
|
private List<Payment> paymentsPeriodEnd =new ArrayList<>();
|
|
|
|
|
|
+ /*本期材料支付信息*/
|
|
|
+ List<Material>materials;
|
|
|
+
|
|
|
private List<InterimPaymentCertificate> interimPaymentCertificates =new ArrayList<>();
|
|
|
/*分项中期汇总*/
|
|
|
private List<SubprojectInterimPaymentSummary> subprojectInterimPaymentSummary =new ArrayList<>();
|
|
@@ -110,6 +113,7 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
if(MeterType.MATERIAL.equals(tec.getMeterType())){
|
|
|
/*材料预付款支付申请表处理*/
|
|
|
this.specialList.add(new MaterialCalc());
|
|
|
+ this.specialList.add(new MaterialSp());
|
|
|
}else if(MeterType.INTERIM.equals(tec.getMeterType())){
|
|
|
this.specialList.add(new InterimPayCert());
|
|
|
this.specialList.add(new InterimSum());
|
|
@@ -219,7 +223,7 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
|
|
|
public void parse(){
|
|
|
/*加载合同材料、材料清单*/
|
|
|
- List<Material> materialsAll = materialFormFc.apply(tec.getContractId());
|
|
|
+ List<Material> materialsAll =tec.getMeterInfo().getMaterialsAll();
|
|
|
/*本期*/
|
|
|
List<Material>materials=materialsAll.stream().filter(m->tec.getPeriodId().equals(m.getPeriodId())).collect(Collectors.toList());
|
|
|
/*本期,往期累计,本期累计*/
|
|
@@ -283,7 +287,68 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ @Data
|
|
|
+ @EqualsAndHashCode(callSuper = true)
|
|
|
+ public class MaterialSp extends BaseSpecial<MaterialPriceDifferential> implements Special{
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean ready() {
|
|
|
+ return MeterInfo.MB_ZJ.equals(tec.getMeterInfo().getConfig());
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void parse() {
|
|
|
+ /*本期材料*/
|
|
|
+ materials=tec.meterInfo.getMaterialsAll().stream().filter(e->tec.getPeriodId().equals(e.getPeriodId())).collect(Collectors.toList());
|
|
|
+ if(materials.size()>0){
|
|
|
+ dataList.addAll(materials.stream().map(e->{
|
|
|
+ MaterialPriceDifferential mpd = new MaterialPriceDifferential();
|
|
|
+ mpd.setPeriodNumber(tec.periodInfo.getPeriodNumber());
|
|
|
+ mpd.setName(e.getMaterialName());
|
|
|
+ mpd.setUnit(e.getUnit());
|
|
|
+ mpd.setQuantity(e.getMeterAmount());
|
|
|
+ mpd.setPriceBase(e.getPrice());
|
|
|
+ mpd.setAmountBase(e.getSum());
|
|
|
+ mpd.setPrice(e.getPrice());
|
|
|
+ mpd.setAmountBase(e.getSum());
|
|
|
+ return mpd;
|
|
|
+ }
|
|
|
+ ).collect(Collectors.toList()));
|
|
|
+ }
|
|
|
+ putOut();
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
+ @Data
|
|
|
+ @EqualsAndHashCode(callSuper = true)
|
|
|
+ public class MaterialsArrivalSp extends BaseSpecial<MaterialsArrival> implements Special{
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean ready() {
|
|
|
+ return MeterInfo.MB_ZJ.equals(tec.getMeterInfo().getConfig());
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void parse() {
|
|
|
+ builderFormDatas(MaterialsArrival.class);
|
|
|
+ if(materials.size()>0){
|
|
|
+ dataList.addAll(materials.stream().map(e->{
|
|
|
+ MaterialsArrival ma = new MaterialsArrival();
|
|
|
+ ma.setPeriodNumber(tec.periodInfo.getPeriodNumber());
|
|
|
+ ma.setName(e.getMaterialName());
|
|
|
+ ma.setUnit(e.getUnit());
|
|
|
+ ma.setQuantity(e.getMeterAmount());
|
|
|
+ ma.setPrice(e.getPrice());
|
|
|
+ ma.setAmount(e.getMeterAmount());
|
|
|
+ ma.setTotal(e.getAdvancePayment());
|
|
|
+ ma.setSource(e.getSource());
|
|
|
+ return ma;
|
|
|
+ }
|
|
|
+ ).collect(Collectors.toList()));
|
|
|
+ }
|
|
|
+ putOut();
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
@Data
|
|
|
@EqualsAndHashCode(callSuper = true)
|