Browse Source

成本报表 保存报错问题

liuchaohui 2 năm trước cách đây
mục cha
commit
ebd86fede0

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

@@ -24,7 +24,7 @@ public interface ISyCostAllocationService extends IService<SyCostAllocation> {
      * 添加一对多
      *
      */
-    public void saveMain(SyCostAllocation syCostAllocation, List<SyCostAllocationAccident> syCostAllocationAccidentList, List<SyCostAllocationCostpay> syCostAllocationCostpayList, List<SyCostAllocationFabric> syCostAllocationFabricList, List<SyCostAllocationIngredient> syCostAllocationIngredientList, List<SyCostAllocationShipdetail> syCostAllocationShipdetailList) ;
+    //public void saveMain(SyCostAllocation syCostAllocation, List<SyCostAllocationAccident> syCostAllocationAccidentList, List<SyCostAllocationCostpay> syCostAllocationCostpayList, List<SyCostAllocationFabric> syCostAllocationFabricList, List<SyCostAllocationIngredient> syCostAllocationIngredientList, List<SyCostAllocationShipdetail> syCostAllocationShipdetailList) ;
     public void saveMain(String plannum, JSONObject json);
     /**
      * 修改一对多

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

@@ -67,36 +67,36 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
     private static ISenYuDataSourceOne senYuDataSourceOne;
     @Autowired
     private static ISenYuDataSourceThree senYuDataSourceThree;
-    @Override
-    @Transactional
-    public void saveMain(SyCostAllocation syCostAllocation, List<SyCostAllocationAccident> syCostAllocationAccidentList,List<SyCostAllocationCostpay> syCostAllocationCostpayList,List<SyCostAllocationFabric> syCostAllocationFabricList,List<SyCostAllocationIngredient> syCostAllocationIngredientList,List<SyCostAllocationShipdetail> syCostAllocationShipdetailList) {
-        syCostAllocationMapper.insert(syCostAllocation);
-        for(SyCostAllocationAccident entity:syCostAllocationAccidentList) {
-            //外键设置
-            entity.setSyCostAllocationId(syCostAllocation.getId());
-            syCostAllocationAccidentMapper.insert(entity);
-        }
-        for(SyCostAllocationCostpay entity:syCostAllocationCostpayList) {
-            //外键设置
-            entity.setSyCostAllocationId(syCostAllocation.getId());
-            syCostAllocationCostpayMapper.insert(entity);
-        }
-        for(SyCostAllocationFabric entity:syCostAllocationFabricList) {
-            //外键设置
-            entity.setSyCostAllocationId(syCostAllocation.getId());
-            syCostAllocationFabricMapper.insert(entity);
-        }
-        for(SyCostAllocationIngredient entity:syCostAllocationIngredientList) {
-            //外键设置
-            entity.setSyCostAllocationId(syCostAllocation.getId());
-            syCostAllocationIngredientMapper.insert(entity);
-        }
-        for(SyCostAllocationShipdetail entity:syCostAllocationShipdetailList) {
-            //外键设置
-            entity.setSyCostAllocationId(syCostAllocation.getId());
-            syCostAllocationShipdetailMapper.insert(entity);
-        }
-    }
+//    @Override
+//    @Transactional
+//    public void saveMain(SyCostAllocation syCostAllocation, List<SyCostAllocationAccident> syCostAllocationAccidentList,List<SyCostAllocationCostpay> syCostAllocationCostpayList,List<SyCostAllocationFabric> syCostAllocationFabricList,List<SyCostAllocationIngredient> syCostAllocationIngredientList,List<SyCostAllocationShipdetail> syCostAllocationShipdetailList) {
+//        syCostAllocationMapper.insert(syCostAllocation);
+//        for(SyCostAllocationAccident entity:syCostAllocationAccidentList) {
+//            //外键设置
+//            entity.setSyCostAllocationId(syCostAllocation.getId());
+//            syCostAllocationAccidentMapper.insert(entity);
+//        }
+//        for(SyCostAllocationCostpay entity:syCostAllocationCostpayList) {
+//            //外键设置
+//            entity.setSyCostAllocationId(syCostAllocation.getId());
+//            syCostAllocationCostpayMapper.insert(entity);
+//        }
+//        for(SyCostAllocationFabric entity:syCostAllocationFabricList) {
+//            //外键设置
+//            entity.setSyCostAllocationId(syCostAllocation.getId());
+//            syCostAllocationFabricMapper.insert(entity);
+//        }
+//        for(SyCostAllocationIngredient entity:syCostAllocationIngredientList) {
+//            //外键设置
+//            entity.setSyCostAllocationId(syCostAllocation.getId());
+//            syCostAllocationIngredientMapper.insert(entity);
+//        }
+//        for(SyCostAllocationShipdetail entity:syCostAllocationShipdetailList) {
+//            //外键设置
+//            entity.setSyCostAllocationId(syCostAllocation.getId());
+//            syCostAllocationShipdetailMapper.insert(entity);
+//        }
+//    }
     //@Scheduled(cron = "0 43 16 * * ?")
     public void saveMain(String plannum, JSONObject json) {
         //方法1:后台使用string接受数据,数据库用json接受数据,但是这个添加字符串也会添加成功