Explorar o código

成本报表 表头

liuchaohui %!s(int64=2) %!d(string=hai) anos
pai
achega
52011b0f73

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

@@ -499,19 +499,28 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
             Shipdetails.add(ship);
             //实际出货数量
             if(ship.getShipQuantity()!=null){
+                if(syCostAllocation.getActualShipquantity()==null){
+                    syCostAllocation.setActualShipquantity(BigDecimal.ZERO);
+                }
                 syCostAllocation.setActualShipquantity(ship.getShipQuantity().add(syCostAllocation.getActualShipquantity()));
             }else {
                 syCostAllocation.setActualShipquantity(BigDecimal.ZERO);
             }
             //人民币金额
             if(ship.getRmbAmount()!=null){
+                if(syCostAllocation.getRmbExportamount()==null){
+                    syCostAllocation.setRmbExportamount(BigDecimal.ZERO);
+                }
                 syCostAllocation.setRmbExportamount(ship.getRmbAmount().add(syCostAllocation.getRmbExportamount()));
             }else {
                 syCostAllocation.setRmbExportamount(BigDecimal.ZERO);
             }
             //美元外销金额
             if(ship.getExportPrice()!=null){
-                syCostAllocation.setUsdTotalexportprice(ship.getExportPrice().add(syCostAllocation.getRmbExportamount()));
+                if(syCostAllocation.getUsdTotalexportprice()==null){
+                    syCostAllocation.setUsdTotalexportprice(BigDecimal.ZERO);
+                }
+                syCostAllocation.setUsdTotalexportprice(ship.getExportPrice().add(syCostAllocation.getUsdTotalexportprice()));
             }else {
                 syCostAllocation.setUsdTotalexportprice(BigDecimal.ZERO);
             }
@@ -549,12 +558,18 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
             if(syCostAllocation.getUsdExpense()==null){
                 syCostAllocation.setUsdExpense(syCostAllocationCostpay.getDisbursedOriginalmoney());
             }else {
+                if(syCostAllocation.getUsdExpense()==null){
+                    syCostAllocation.setUsdExpense(BigDecimal.ZERO);
+                }
                 syCostAllocation.setUsdExpense(syCostAllocation.getUsdExpense().add(syCostAllocationCostpay.getDisbursedOriginalmoney()));
             }
 
             if(syCostAllocation.getRmbExpense()==null){
                 syCostAllocation.setRmbExpense(syCostAllocationCostpay.getDisbursedLocalmoney());
             }else {
+                if(syCostAllocation.getRmbExpense()==null){
+                    syCostAllocation.setRmbExpense(BigDecimal.ZERO);
+                }
                 syCostAllocation.setRmbExpense(syCostAllocation.getRmbExpense().add(syCostAllocationCostpay.getDisbursedLocalmoney()));
             }
         }