Browse Source

成本报表

liuchaohui 2 years ago
parent
commit
e01d760928

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

@@ -18,6 +18,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.io.Serializable;
+import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
@@ -288,6 +289,8 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
                     syRemainingList.add(syRemaining);
                 }
                 Fabric.setSyRemaining(syRemainingList);
+            }else{
+                Fabric.setFabricremainingQuantity(BigDecimal.ZERO);
             }
             List<Map<String, Object>> transferlist  = senYuDataSourceOne.queryForList(sqlTransfer);
             if(transferlist.size()>0){
@@ -298,6 +301,8 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
                     syTransferList.add(transfer);
                 }
                 Fabric.setSyTransfers(syTransferList);
+            }else{
+                Fabric.setFabrictransferQuantity(BigDecimal.ZERO);
             }
             list3.add(Fabric);
         }
@@ -393,6 +398,8 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
                     syRemainingList.add(syRemaining);
                 }
                 Ingredient.setSyRemaining(syRemainingList);
+            }else{
+                Ingredient.setIngredientsRemainingQuantity(BigDecimal.ZERO);
             }
             List<Map<String, Object>> transferlist  = senYuDataSourceOne.queryForList(sqlTransfer);
             if(transferlist.size()>0){
@@ -403,6 +410,8 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
                     syTransferList.add(transfer);
                 }
                 Ingredient.setSyTransfers(syTransferList);
+            }else{
+                Ingredient.setIngredientsTransferQuantity(BigDecimal.ZERO);
             }
             list4.add(Ingredient);
         }