2 İşlemeler 89d6bff933 ... f98b9b61e0

Yazar SHA1 Mesaj Tarih
  zhaomn f98b9b61e0 Merge remote-tracking branch 'origin/20221201' into 20221201 1 yıl önce
  zhaomn 500441001b 【CHG】修改图表查询条件 1 yıl önce

+ 3 - 0
railway-business/src/main/java/com/railway/business/bi/controller/ShowBdycController.java

@@ -73,6 +73,9 @@ public class ShowBdycController extends BaseController {
     startPage();
     showBdyc.setFoundMode(YcxxFoundModeEnum.PUSH.getCode());
     showBdyc.setRectifyResult(YcxxRectifyResultEnum.NOT_FINISHED.getCode());
+    if (showBdyc.getSsgq().equals("变配电修试队")) {
+      showBdyc.setSsgq(null);
+    }
     List<ShowBdyc> list = showBdycService.getList(showBdyc);
     return getDataTable(list);
   }

+ 3 - 0
railway-business/src/main/java/com/railway/business/bi/controller/ShowDlycController.java

@@ -73,6 +73,9 @@ public class ShowDlycController extends BaseController {
     startPage();
     showDlyc.setFoundMode(YcxxFoundModeEnum.PUSH.getCode());
     showDlyc.setRectifyResult(YcxxRectifyResultEnum.NOT_FINISHED.getCode());
+    if (showDlyc.getSsgq().equals("电力维修队")) {
+      showDlyc.setSsgq(null);
+    }
     List<ShowDlyc> list = showDlycService.getList(showDlyc);
     return getDataTable(list);
   }

+ 2 - 0
railway-business/src/main/java/com/railway/business/bi/mapper/ShowBdycMapper.java

@@ -23,6 +23,8 @@ public interface ShowBdycMapper {
 
   List<DlycDTO> totalByDay();
 
+  DlycDTO totalBpdxsdByDay();
+
   /**
    * 新增
    */

+ 2 - 0
railway-business/src/main/java/com/railway/business/bi/mapper/ShowDlycMapper.java

@@ -22,6 +22,8 @@ public interface ShowDlycMapper {
 
   List<DlycDTO> totalByDay();
 
+  DlycDTO totalDlwxdByDay();
+
   /**
    * 新增
    */

+ 12 - 0
railway-business/src/main/java/com/railway/business/bi/service/impl/ChartServiceImpl.java

@@ -112,6 +112,8 @@ public class ChartServiceImpl implements IChartService {
 
     List<DlycDTO> bdycList = bdycMapper.totalByDay();
     List<DlycDTO> dlycList = dlycMapper.totalByDay();
+    DlycDTO bdyc = bdycMapper.totalBpdxsdByDay();
+    DlycDTO dlyc = dlycMapper.totalDlwxdByDay();
     Map<String, DlycDTO> bdycMap = bdycList.stream()
         .collect(Collectors.toMap(DlycDTO::getGq, v -> v, (p1, p2) -> p1));
     Map<String, DlycDTO> dlycMap = dlycList.stream()
@@ -121,6 +123,11 @@ public class ChartServiceImpl implements IChartService {
       if (gqFlag.contains(bdDto.getGq())) {
         continue;
       }
+      if (bdDto.getGq().equals("变配电修试队")){
+        bdDto.setDj1(bdyc.getDj1());
+        bdDto.setDj2(bdyc.getDj2());
+        bdDto.setDj3(bdyc.getDj3());
+      }
       gqFlag.add(bdDto.getGq());
       DlycDTO dlDto = dlycMap.get(bdDto.getGq());
       List<SeriesDTO> series = listSeries(xAxis, bdDto, dlDto);
@@ -131,6 +138,11 @@ public class ChartServiceImpl implements IChartService {
       if (gqFlag.contains(dlDto.getGq())) {
         continue;
       }
+      if (dlDto.getGq().equals("电力维修队")){
+        dlDto.setDj1(dlyc.getDj1());
+        dlDto.setDj2(dlyc.getDj2());
+        dlDto.setDj3(dlyc.getDj3());
+      }
       gqFlag.add(dlDto.getGq());
       DlycDTO bdDto = bdycMap.get(dlDto.getGq());
       List<SeriesDTO> series = listSeries(xAxis, bdDto, dlDto);

+ 16 - 0
railway-business/src/main/resources/mapper/bi/ShowBdycMapper.xml

@@ -292,6 +292,22 @@
     group by t1.dict_label
   </select>
 
+  <select id="totalBpdxsdByDay" resultType="com.railway.business.bi.domain.dto.DlycDTO">
+    select sum(yj)       as dj1,
+           sum(ej)       as dj2,
+           sum(sj)       as dj3
+    from (select sjgq,
+                 case when qxdj = '一级' then 1 else 0 end as yj,
+                 case when qxdj = '二级' then 1 else 0 end as ej,
+                 case when qxdj = '三级' then 1 else 0 end as sj
+          from show_bdyc
+          where del_flag = '0'
+            and rectify_result='未处理'
+            and file_id =
+                (select max(id) from show_file where data_type = 'yctj' and imp_result = '1')
+            and sjgq is not null) x
+  </select>
+
   <resultMap id="TotalResultMap" type="com.railway.business.bi.domain.vo.YcxxTotalVO">
     <result column="gravity" property="gravity"/>
     <result column="data" property="data"/>

+ 16 - 0
railway-business/src/main/resources/mapper/bi/ShowDlycMapper.xml

@@ -273,6 +273,22 @@
     group by t1.dict_label
   </select>
 
+  <select id="totalDlwxdByDay" resultType="com.railway.business.bi.domain.dto.DlycDTO">
+    select sum(yj)       as dj1,
+           sum(ej)       as dj2,
+           sum(sj)       as dj3
+    from (select ssgq,
+                 case when gravity = '一级' then 1 else 0 end as yj,
+                 case when gravity = '二级' then 1 else 0 end as ej,
+                 case when gravity = '三级' then 1 else 0 end as sj
+          from show_dlyc
+          where del_flag = '0'
+            and rectify_result='未处理'
+            and file_id =
+                (select max(id) from show_file where data_type = 'yctj' and imp_result = '1')
+            and ssgq is not null) x
+  </select>
+
   <resultMap id="TotalResultMap" type="com.railway.business.bi.domain.vo.YcxxTotalVO">
     <result column="gravity" property="gravity"/>
     <result column="data" property="data"/>