guoqiang 3 өдөр өмнө
parent
commit
204c897508

+ 5 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/rollHeight/dto/RollHeightQueryDTO.java

@@ -56,6 +56,11 @@ public class RollHeightQueryDTO {
      */
     private String shift;
 
+    /**
+     * 热冷(高线)
+     */
+    private String hotCold;
+
     /**
      * 交班记录id
      */

+ 19 - 7
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/rollHeight/service/impl/RollHeightServiceImpl.java

@@ -282,9 +282,9 @@ public class RollHeightServiceImpl extends ServiceImpl<RollHeightMapper, RollHei
         }
 
         // 只在未拼接过时间范围时才判断 queryDate
-        if(search){
+        if(search) {
             // 如果时间给了空
-            if(oConvertUtils.isEmpty(queryDTO.getQueryDate())){ // 查询最后一个班次
+            if (oConvertUtils.isEmpty(queryDTO.getQueryDate())) { // 查询最后一个班次
                 String nowDate = DateUtils.getDate("yyyy-MM-dd");
                 Date startOneTime = DateUtils.getStartOfDayByDate(DateUtils.getStartOfDay(nowDate));
                 // 查询最后一次交班记录时间
@@ -295,13 +295,14 @@ public class RollHeightServiceImpl extends ServiceImpl<RollHeightMapper, RollHei
                 oneQueryWrapper.ge(BilletOriginalProductRecord::getCreateTime, oConvertUtils.isNotEmpty(billetHotsendChangeShift.getCreateTime()) ? billetHotsendChangeShift.getCreateTime() : startOneTime);
             } else {
                 // 获取当前年月日
-                Date queryDate = oConvertUtils.isNotEmpty(queryDTO.getQueryDate()) ? queryDTO.getQueryDate() : DateUtils.getDate() ;
+                Date queryDate = oConvertUtils.isNotEmpty(queryDTO.getQueryDate()) ? queryDTO.getQueryDate() : DateUtils.getDate();
                 Date startTime = DateUtils.getStartOfDayByDate(DateUtils.getStartOfDay(queryDate));
                 // 结束时间
                 Date endTime = DateUtils.getEndOfDayByDate(startTime);
                 oneQueryWrapper.between(BilletOriginalProductRecord::getCreateTime, startTime, endTime);
             }
         }
+
         // 炉号查询
         if (oConvertUtils.isNotEmpty(queryDTO.getHeatNo())) {
             oneQueryWrapper.eq(BilletOriginalProductRecord::getHeatNo, queryDTO.getHeatNo());
@@ -320,11 +321,22 @@ public class RollHeightServiceImpl extends ServiceImpl<RollHeightMapper, RollHei
 
         List<BilletOriginalProductRecord> list = billetOriginalProductRecordService.list(oneQueryWrapper);
 
-
+        //定义  rollHeightMap coldRollHeightMap
+        Map<String, RollHeightHeatVO.RollHeightHeatNo> rollHeightMap = new HashMap<>();
+        Map<String, RollHeightHeatVO.RollHeightHeatNo> coldRollHeightMap = new HashMap<>();
         //构造数据
-        Map<String, RollHeightHeatVO.RollHeightHeatNo> rollHeightMap = buildRollHeightHeatNoMap(list); // 根据高线明细构建
-
-        Map<String, RollHeightHeatVO.RollHeightHeatNo> coldRollHeightMap = buildColdRollHeightHeatNoMap(list); // 根据步进冷床,高线明细构建
+        if(oConvertUtils.isNotEmpty(queryDTO.getHotCold()) && queryDTO.getHotCold().equals("hot")){ // 热
+            // 热
+            rollHeightMap = buildRollHeightHeatNoMap(list); // 根据高线明细构建
+        } else if (oConvertUtils.isNotEmpty(queryDTO.getHotCold()) && queryDTO.getHotCold().equals("cold")) { // 冷
+            // 冷
+            coldRollHeightMap = buildColdRollHeightHeatNoMap(list); // 根据步进冷床,高线明细构建
+        } else{
+            // 热
+            rollHeightMap = buildRollHeightHeatNoMap(list); // 根据高线明细构建
+            // 冷
+            coldRollHeightMap = buildColdRollHeightHeatNoMap(list); // 根据步进冷床,高线明细构建
+        }
 
         List<RollHeightVO> resultList1 = handleRollHeightMap(rollHeightMap);