Sfoglia il codice sorgente

添加面损判断

liuchaohui 1 anno fa
parent
commit
5a3e4fbb0e

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

@@ -16,6 +16,7 @@ import org.jeecg.modules.cost.service.*;
 import org.jeecg.modules.openApi.service.ISenYuDataSourceOne;
 import org.jeecg.modules.openApi.service.ISenYuDataSourceThree;
 import org.jeecg.modules.report.entity.*;
+import org.jeecg.modules.report.mapper.FabricLossMapper;
 import org.jeecg.modules.report.service.ISyFabricLossReportService;
 import org.springframework.beans.BeansException;
 import org.springframework.context.ApplicationContext;
@@ -68,6 +69,8 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
     @Autowired
     private ISyFabricLossReportService syFabricLossReportService;
     @Autowired
+    private FabricLossMapper fabricLossMapper;
+    @Autowired
     private static ISenYuDataSourceOne senYuDataSourceOne;
     @Autowired
     private static ISenYuDataSourceThree senYuDataSourceThree;
@@ -164,6 +167,14 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
     public SyCostAllocation queryByPlanNum(String plannum, String type) {
         //返回数据
         SyCostAllocation syCostAllocation=new SyCostAllocation();
+
+        //查询面损表头 判断是否有面损数据
+        Boolean havefloss = true;
+        List<FabricLoss> fabricLossList = fabricLossMapper.getFabricLossData(plannum);
+        if(fabricLossList!=null || fabricLossList.size()==0){
+            havefloss = false;
+        }
+
         //查询U8数据 表头
         List<SyCostAllocation>  list =  syCostAllocationMapper.queryByCostHead(plannum);
         if(list.size()<=0){