瀏覽代碼

成本报表 面料不含税成本

liuchaohui 2 年之前
父節點
當前提交
21583c2701

+ 3 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/impl/SyCostAllocationServiceImpl.java

@@ -169,7 +169,7 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
         }
         syCostAllocation = list.get(0);
 
-        //查询单证面损数据
+        //查询单证面损数据   面料(不)含税成本
         SyFabricLossReport syLossReport1 = null;
         QueryWrapper<SyFabricLossReport> queryLossWrapper = new QueryWrapper<>();
         queryLossWrapper.eq("plan_code", plannum);
@@ -182,6 +182,8 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
         if (syLossReport1 != null){
             fabricLoss1 = JSON.parseObject(JSON.toJSONString(syLossReport1.getContent()), FabricLoss.class);
             syCostAllocation.setFabriccostIncludestax(new BigDecimal(fabricLoss1.getActualMoney()));
+            syCostAllocation.setFabriccostNotincludestax(new BigDecimal(fabricLoss1.getFabricCostInvoiceList().stream().
+                    filter(item->item.getINoTaxMoney()!=null).mapToDouble(FabricCostInvoice::getINoTaxMoney).sum()));
         }
 
         /*如果出现多供应商的情况拼接 供应商*/