From 220f7b818bb9399391830fbbb9fb2028a21b938f Mon Sep 17 00:00:00 2001
From: yyt <306727702@qq.com>
Date: 星期三, 21 二月 2024 00:23:34 +0800
Subject: [PATCH] 批量数据采集方法更新

---
 jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java |   49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 49 insertions(+), 0 deletions(-)

diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java b/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java
index 5965407..5f19de3 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java
@@ -5,13 +5,21 @@
 import com.jcdm.common.utils.DateUtils;
 import com.jcdm.common.utils.StringUtils;
 import com.jcdm.main.bs.orderScheduling.Query.PrepareOnlineQuery;
+import com.jcdm.main.bs.orderScheduling.common.Constants;
 import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling;
 import com.jcdm.main.bs.orderScheduling.mapper.BsOrderSchedulingMapper;
 import com.jcdm.main.bs.orderScheduling.service.IBsOrderSchedulingService;
+import com.jcdm.main.bs.orderScheduling.vo.FollowReportVO;
 import com.jcdm.main.bs.orderScheduling.vo.LineChartVO;
+import com.jcdm.main.da.paramCollection.domain.DaParamCollection;
+import com.jcdm.main.da.paramCollection.mapper.DaParamCollectionMapper;
+import com.jcdm.main.da.paramCollection.service.impl.DaParamCollectionServiceImpl;
+import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection;
+import com.jcdm.main.da.passingStationCollection.mapper.DaPassingStationCollectionMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
 import java.text.SimpleDateFormat;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
@@ -33,6 +41,12 @@
 {
     @Autowired
     private BsOrderSchedulingMapper bsOrderSchedulingMapper;
+
+    @Resource
+    private DaParamCollectionMapper daParamCollectionMapper;
+
+    @Resource
+    private DaPassingStationCollectionMapper daPassingStationCollectionMapper;
 
     /**
      * 鏌ヨ璁㈠崟鎺掍骇
@@ -64,6 +78,41 @@
     }
 
     @Override
+    public FollowReportVO getFollowReportList(BsOrderScheduling bsOrderScheduling)
+    {
+        FollowReportVO vo = new FollowReportVO();
+        if(bsOrderScheduling.getDateConditions()!=null){
+            String[] conditions = bsOrderScheduling.getDateConditions();
+            bsOrderScheduling.setStartTime(conditions[0]);
+            bsOrderScheduling.setEndTime(conditions[1]);
+        }
+        //涓昏〃鏁版嵁
+        List<BsOrderScheduling> mainList = bsOrderSchedulingMapper.selectBsOrderSchedulingList(bsOrderScheduling);
+        vo.setMainList(mainList);
+        List<String> engineNoList = mainList.stream().map(BsOrderScheduling::getEngineNo).distinct().collect(Collectors.toList());
+        List<DaParamCollection> allChildList = new ArrayList<>();
+        List<DaPassingStationCollection> collect5 = new ArrayList<>();
+        if (CollUtil.isNotEmpty(engineNoList)){
+            allChildList = daParamCollectionMapper.getListBySfcCode(engineNoList);
+            collect5 = daPassingStationCollectionMapper.getListBySfcCode(engineNoList);
+        }
+        if (CollUtil.isNotEmpty(allChildList)){
+            //鎷垮埌鎵�鏈夊瓙鏁版嵁
+            List<DaParamCollection> collect1 = allChildList.stream().filter(x -> Constants.DATA1.equals(x.getType())).collect(Collectors.toList());
+            List<DaParamCollection> collect2 = allChildList.stream().filter(x -> Constants.DATA2.equals(x.getType())).collect(Collectors.toList());
+            List<DaParamCollection> collect3 = allChildList.stream().filter(x -> Constants.DATA3.equals(x.getType())).collect(Collectors.toList());
+            List<DaParamCollection> collect4 = allChildList.stream().filter(x -> Constants.DATA4.equals(x.getType())).collect(Collectors.toList());
+            vo.setList1(collect1);
+            vo.setList2(collect2);
+            vo.setList3(collect3);
+            vo.setList4(collect4);
+        }
+        vo.setList5(collect5);
+        return vo;
+
+    }
+
+    @Override
     public List<LineChartVO> getOffLineNum()
     {
         List<LineChartVO> result = new ArrayList<>();

--
Gitblit v1.9.3