Browse Source

1.大屏添加异常列表

wangxiaofei 2 tháng trước cách đây
mục cha
commit
57ace20c1d

+ 24 - 0
taphole-iron/src/main/java/com/sckj/iron/constant/SubscribeTagConstants.java

@@ -102,5 +102,29 @@ public class SubscribeTagConstants {
         return "AOD25607.PV";
     }
 
+    //开口机旋转位置
+    public static final String TAG_KKJ_STATUS(String type) {
+        if (Objects.equals(type, "3")) {
+            return "BF4LQSDJ_1_SCH_IRONNOTCH_OPENER_ROTATE_LOC";
+        }
+        return "AOD25607.PV";
+    }
+
+    //泥炮旋转油压
+    public static final String TAG_NPXZYY(String type) {
+        if (Objects.equals(type, "3")) {
+            return "BF4LQSDJ_1_SCH_CLAYCAN_ROTATE_PT";
+        }
+        return "AOD25607.PV";
+    }
+
+    //四高炉南水渣粒化泵供水总管温度
+    public static final String TAG_NSZSW(String type) {
+        if (Objects.equals(type, "3")) {
+            return "BF4SSZ_GRANUL_PUMP_WATSUPL_MTUBE_TEMP";
+        }
+        return "AOD25607.PV";
+    }
+
 
 }

+ 38 - 6
taphole-iron/src/main/java/com/sckj/iron/controller/TIronVisualScreenController.java

@@ -294,6 +294,8 @@ public class TIronVisualScreenController {
     public AjaxResult getIronTrends(@RequestBody TrendRequest queryDateType) {
         // 1. 计算起止时间
         int hours = queryDateType.getQueryDateType();
+        //给固定时间,24小时之内
+        hours = 24;
         java.util.Date endTime = new java.util.Date();
         java.util.Calendar cal = java.util.Calendar.getInstance();
         cal.setTime(endTime);
@@ -308,7 +310,10 @@ public class TIronVisualScreenController {
                     "BF4_1_IRONNOTCH_RAILLINE_ACPIRON_SPEED1", // 1车流速
                     "BF4_1_IRONNOTCH_RAILLINE_ACPIRON_SPEED2", // 2车流速
                     "BF4_1TH_2_TPC_TWT",                  // 1车铁水重量
-                    "BF4_1TH_1_TPC_TWT"                   // 2车铁水重量
+                    "BF4_1TH_1_TPC_TWT",                   // 2车铁水重量
+                    "BF4_1_IRONNOTCH_TAPPING",               // 1号出铁状态
+                    "BF4_1TH_2_TPC_CARNO",                  // 1TH-2号车混铁车车号
+                    "BF4_1TH_1_TPC_CARNO"                  // 1TH-1号车混铁车车号
                 ))
                 .between(OPCData::getServerTime, startTime, endTime)
                 .orderByAsc(OPCData::getServerTime)
@@ -336,6 +341,8 @@ public class TIronVisualScreenController {
                 List<TL2Data> l2DataList = l2DataFuture.get();
 
                 // 并行转换所有数据
+
+                //铁水温度
                 CompletableFuture<List<IronTrendL1DTO>> tempListFuture = CompletableFuture.supplyAsync(() ->
                     opcDataMap.getOrDefault("BF4_1_IRONNOTCH_MIR_TEMP", new ArrayList<>())
                         .stream().map(item -> {
@@ -346,6 +353,7 @@ public class TIronVisualScreenController {
                         }).collect(Collectors.toList())
                 );
 
+                //1TH-1号车受铁速度
                 CompletableFuture<List<IronTrendL1DTO>> speed1ListFuture = CompletableFuture.supplyAsync(() ->
                     opcDataMap.getOrDefault("BF4_1_IRONNOTCH_RAILLINE_ACPIRON_SPEED1", new ArrayList<>())
                         .stream().map(item -> {
@@ -356,6 +364,7 @@ public class TIronVisualScreenController {
                         }).collect(Collectors.toList())
                 );
 
+                //1TH-2号车受铁速度
                 CompletableFuture<List<IronTrendL1DTO>> speed2ListFuture = CompletableFuture.supplyAsync(() ->
                     opcDataMap.getOrDefault("BF4_1_IRONNOTCH_RAILLINE_ACPIRON_SPEED2", new ArrayList<>())
                         .stream().map(item -> {
@@ -366,6 +375,7 @@ public class TIronVisualScreenController {
                         }).collect(Collectors.toList())
                 );
 
+                //1TH-2号车TPC总重
                 CompletableFuture<List<IronTrendL1DTO>> weight1ListFuture = CompletableFuture.supplyAsync(() ->
                     opcDataMap.getOrDefault("BF4_1TH_2_TPC_TWT", new ArrayList<>())
                         .stream().map(item -> {
@@ -376,6 +386,7 @@ public class TIronVisualScreenController {
                         }).collect(Collectors.toList())
                 );
 
+                //1TH-1号车TPC总重
                 CompletableFuture<List<IronTrendL1DTO>> weight2ListFuture = CompletableFuture.supplyAsync(() ->
                     opcDataMap.getOrDefault("BF4_1TH_1_TPC_TWT", new ArrayList<>())
                         .stream().map(item -> {
@@ -386,6 +397,7 @@ public class TIronVisualScreenController {
                         }).collect(Collectors.toList())
                 );
 
+                //L2
                 CompletableFuture<List<IronTrendL2DTO>> elemenListFuture = CompletableFuture.supplyAsync(() ->
                     l2DataList.stream().map(item -> {
                         IronTrendL2DTO dto = new IronTrendL2DTO();
@@ -399,7 +411,12 @@ public class TIronVisualScreenController {
                         } catch (NumberFormatException e) {
                             dto.setElementSi(null);
                         }
-                        dto.setCreateTime(item.getIronStarttime());
+                        dto.setIronStarttime(item.getIronStarttime());
+                        dto.setIronEndtime(item.getIronEndtime());
+                        dto.setPollMm(item.getPollMm());
+                        dto.setOpenDepth(item.getOpenDepth());
+                        dto.setMudWeight(item.getMudWeight());
+                        dto.setIronCosttime(item.getIronCosttime());
                         return dto;
                     }).collect(Collectors.toList())
                 );
@@ -431,7 +448,7 @@ public class TIronVisualScreenController {
                     speed2List.forEach(e -> allTimes.add(e.getCreateTime() != null ? sdf.format(e.getCreateTime()) : null));
                     weight1List.forEach(e -> allTimes.add(e.getCreateTime() != null ? sdf.format(e.getCreateTime()) : null));
                     weight2List.forEach(e -> allTimes.add(e.getCreateTime() != null ? sdf.format(e.getCreateTime()) : null));
-                    elemenList.forEach(e -> allTimes.add(e.getCreateTime()));
+                    elemenList.forEach(e -> allTimes.add(e.getIronStarttime()));
                     allTimes.removeIf(Objects::isNull);
                     java.util.List<String> xAxis = new java.util.ArrayList<>(allTimes);
 
@@ -444,6 +461,10 @@ public class TIronVisualScreenController {
                     series.add(buildSeries("2车铁水重量", weight2List, xAxis));
                     series.add(buildSeries("硫", elemenList, xAxis, "elementS"));
                     series.add(buildSeries("硅", elemenList, xAxis, "elementSi"));
+                    series.add(buildSeries("泥炮量", elemenList, xAxis, "mudWeight"));
+                    series.add(buildSeries("钻杆直径", elemenList, xAxis, "pollMm"));
+                    series.add(buildSeries("开口深度", elemenList, xAxis, "openDepth"));
+                    series.add(buildSeries("出铁时间", elemenList, xAxis, "ironCosttime"));
 
                     java.util.Map<String, Object> result = new java.util.HashMap<>();
                     result.put("xAxis", xAxis);
@@ -481,14 +502,25 @@ public class TIronVisualScreenController {
         map.put("data", data);
         return map;
     }
+
     private java.util.Map<String, Object> buildSeries(String name, java.util.List<IronTrendL2DTO> list, java.util.List<String> xAxis, String field) {
         java.util.Map<String, Object> map = new java.util.HashMap<>();
         map.put("name", name);
         java.util.Map<String, Object> timeValueMap = list.stream()
-            .filter(e -> e.getCreateTime() != null)
+            .filter(e -> e.getIronStarttime() != null)
             .collect(java.util.stream.Collectors.toMap(
-                IronTrendL2DTO::getCreateTime,
-                e -> "elementS".equals(field) ? e.getElementS() : e.getElementSi(),
+                IronTrendL2DTO::getIronStarttime,
+                e -> {
+                    switch (field) {
+                        case "elementS": return e.getElementS();
+                        case "elementSi": return e.getElementSi();
+                        case "mudWeight": return e.getMudWeight();
+                        case "pollMm": return e.getPollMm();
+                        case "openDepth": return e.getOpenDepth();
+                        case "ironCosttime": return e.getIronCosttime();
+                        default: return null;
+                    }
+                },
                 (v1, v2) -> v1
             ));
         java.util.List<Object> data = xAxis.stream().map(timeValueMap::get).collect(java.util.stream.Collectors.toList());

+ 29 - 6
taphole-iron/src/main/java/com/sckj/iron/dto/IronTrendL2DTO.java

@@ -1,15 +1,38 @@
 package com.sckj.iron.dto;
 
+import com.alibaba.excel.annotation.ExcelProperty;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 @Data
 public class IronTrendL2DTO {
-    // 硫含量
+    @ApiModelProperty(value = "铁水成分-硫")
     private Double elementS;
-    
-    // 硅含量
+
+    @ApiModelProperty(value = "铁水成分-硅")
     private Double elementSi;
-    
-    // 出铁开始时间(格式:yyyyMMddHHmmss)
-    private String createTime;
+
+//    @ApiModelProperty(value = "出铁开始时间(格式:yyyyMMddHHmmss)")
+//    private String createTime;
+
+    @ApiModelProperty(value = "泥炮量")
+    private Double mudWeight;
+
+    @ApiModelProperty(value = "钻杆直径")
+    private Double pollMm;
+
+    //计算公式中需要设置类型为double
+    @ApiModelProperty(value = "开口深度")
+    private Double openDepth;
+
+    //计算公式中需要设置类型为double
+    @ApiModelProperty(value = "出铁时间")
+    private Integer ironCosttime;
+
+    @ApiModelProperty(value = "开始时间")
+    private String ironStarttime;
+
+    @ExcelProperty("结束时间")
+    private String ironEndtime;
+
 } 

+ 85 - 17
taphole-iron/src/main/java/com/sckj/iron/socketio/DeviceEventListener.java

@@ -31,6 +31,7 @@ import com.sckj.warn.entity.TAudio;
 import com.sckj.warn.service.impl.TAudioServiceImpl;
 import com.sckj.warn.service.impl.TExceptionLogServiceImpl;
 import com.sckj.warn.validate.TExceptionLogCreateValidate;
+import com.sckj.warn.vo.TExceptionLogBigScreenVo;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.ObjectUtils;
 import org.springframework.beans.BeanUtils;
@@ -132,8 +133,8 @@ public class DeviceEventListener extends EventListener { //
 
     //鱼雷罐车
     private static final String YLGC_STATUS = "ylgc";
-    //泥炮
-    private static final String NPJ_STATUS = "npj";
+    //泥炮堵口状态
+    private static final String NPDK_STATUS = "npj";
     //开口机状态
     private static final String KKJ_STATUS = "kkj";
     //摆动溜咀
@@ -143,6 +144,9 @@ public class DeviceEventListener extends EventListener { //
     //出渣状态
     private static final String CHUZ_STATUS = "chuz";
 
+    //存储出渣温度,3个点的温度明显升高即为正在出渣
+    private LinkedList<Double> lastChuzTemps = new LinkedList<>();
+
     // 1.创建表达式解析器
     private static final SpelExpressionParser mParser = new SpelExpressionParser();
 
@@ -188,6 +192,9 @@ public class DeviceEventListener extends EventListener { //
     private Map<String, Object> mRealtimeData = new ConcurrentHashMap<>();
 
     //实时状态
+    //开口机开口状态
+    //泥炮堵口状态
+    //
     private Map<String, Object> mRealtimeStatus = new ConcurrentHashMap<>();
 
     private AtomicDouble speed1 = new AtomicDouble(0);
@@ -274,6 +281,12 @@ public class DeviceEventListener extends EventListener { //
                 });
             }
         });
+
+
+        scheduledTaskManager.addTask("warnList", 0, 60, TimeUnit.SECONDS, () -> {
+             getExceptionList();
+        });
+
     }
 
 
@@ -540,6 +553,11 @@ public class DeviceEventListener extends EventListener { //
         PushData.send2CloseTime(realtimeData);
     }
 
+    private void getExceptionList(){
+        List<TExceptionLogBigScreenVo> list = exceptionLogService.getExceptionLogList();
+        PushData.send2Exception(list);
+    }
+
     /**
      * 1号铁口正在出铁的操作项目(由 0-> 1 表明1号铁口开始出铁)
      * 处理出铁开始事件
@@ -587,6 +605,8 @@ public class DeviceEventListener extends EventListener { //
                             PushData.send2Warn(WarnData.warnClose("铁水流速过快告警", closureAlarmUrl));
                             taskExecutor.submit(() -> {
                                 exceptionLogService.add(TExceptionLogCreateValidate.builder().exceptionType("7000").exceptionDesc("铁水流速过快告警").build());
+                                //推送预警列表
+                                getExceptionList();
                             });
                             closureWarnCountMap.put(modelKey1, 0);
                             return;
@@ -607,6 +627,8 @@ public class DeviceEventListener extends EventListener { //
                             PushData.send2Warn(WarnData.warnClose("铁水流速过慢告警", closureAlarmUrl));
                             taskExecutor.submit(() -> {
                                 exceptionLogService.add(TExceptionLogCreateValidate.builder().exceptionType("8000").exceptionDesc("铁水流速过慢告警").build());
+                                //推送预警列表
+                                getExceptionList();
                             });
                             closureWarnCountMap.put(modelKey2, 0);
                             return;
@@ -627,6 +649,8 @@ public class DeviceEventListener extends EventListener { //
                             PushData.send2Warn(WarnData.warnClose("铁水流速过慢告警", closureAlarmUrl));
                             taskExecutor.submit(() -> {
                                 exceptionLogService.add(TExceptionLogCreateValidate.builder().exceptionType("8000").exceptionDesc("铁水流速过慢告警").build());
+                                //推送预警列表
+                                getExceptionList();
                             });
                             closureWarnCountMap.put(modelKey3, 0);
                         }
@@ -679,6 +703,8 @@ public class DeviceEventListener extends EventListener { //
                         PushData.send2Warn(WarnData.warnTappingTimeout("出铁时间过长告警", tappingTimeoutAlramUrl));
                         taskExecutor.submit(() -> {
                             exceptionLogService.add(TExceptionLogCreateValidate.builder().exceptionType("3000").exceptionDesc("出铁时间过长告警").build());
+                            //推送预警列表
+                            getExceptionList();
                         });
                     }
                 });
@@ -828,6 +854,8 @@ public class DeviceEventListener extends EventListener { //
                                 PushData.send2Warn(WarnData.warnTapping("急需出铁告警", tappingAlramUrl));
                                 exceptionLogService.add(TExceptionLogCreateValidate.builder().exceptionType("10000").exceptionDesc("急需出铁告警").build());
                                 tappingWarnCountMap.put(modelKey, 0);
+                                //推送预警列表
+                                getExceptionList();
                             }
                         } else {
                             tappingWarnCountMap.put(modelKey, 0);
@@ -982,6 +1010,17 @@ public class DeviceEventListener extends EventListener { //
                     if (bigDecimalNew.compareTo(ironWeight11Max) > 0) {
                         ironWeight11Max = bigDecimalNew;
                     }
+                    if (ironLoading1.get() > 0) {
+                        RealtimeData realtimeData = new RealtimeData();
+                        realtimeData.setValue(1);
+                        realtimeData.setDesc("摆动溜嘴的摆动方向");
+                        mRealtimeStatus.put(CHONGZ_STATUS, realtimeData);
+                    } else {
+                        RealtimeData realtimeData = new RealtimeData();
+                        realtimeData.setValue(0);
+                        realtimeData.setDesc("摆动溜嘴的摆动方向");
+                        mRealtimeStatus.put(CHONGZ_STATUS, realtimeData);
+                    }
                 } else {
                     // 罐车卸载,累计最大值到总量
                     mTotalWeight = mTotalWeight.add(ironWeight11Max);
@@ -996,14 +1035,42 @@ public class DeviceEventListener extends EventListener { //
                     if (bigDecimalNew.compareTo(ironWeight12Max) > 0) {
                         ironWeight12Max = bigDecimalNew;
                     }
+                    if (ironLoading1.get() > 0) {
+                        RealtimeData realtimeData = new RealtimeData();
+                        realtimeData.setValue(2);
+                        realtimeData.setDesc("摆动溜嘴的摆动方向");
+                        mRealtimeStatus.put(CHONGZ_STATUS, realtimeData);
+                    } else {
+                        RealtimeData realtimeData = new RealtimeData();
+                        realtimeData.setValue(0);
+                        realtimeData.setDesc("摆动溜嘴的摆动方向");
+                        mRealtimeStatus.put(CHONGZ_STATUS, realtimeData);
+                    }
                 } else {
                     mTotalWeight = mTotalWeight.add(ironWeight12Max);
                     ironWeight12Max = BigDecimal.ZERO;
                     ironWeight12Current = BigDecimal.ZERO;
                 }
             } else if (opcData.getPointName().contains(SubscribeTagConstants.TAG_CHUZ_STATUS(opcData.getServerType()))) {
+                double temp = Double.parseDouble(opcData.getData().toString());
+                if (lastChuzTemps.size() >= 3) {
+                    lastChuzTemps.removeFirst();
+                }
+                lastChuzTemps.add(temp);
+
+                boolean isRising = false;
+                if (lastChuzTemps.size() == 3) {
+                    double t1 = lastChuzTemps.get(0);
+                    double t2 = lastChuzTemps.get(1);
+                    double t3 = lastChuzTemps.get(2);
+                    // 设定“明显升高”阈值,比如每次升高10度
+                    if (t2 - t1 > 10 && t3 - t2 > 10) {
+                        isRising = true;
+                    }
+                }
+
                 RealtimeData realtimeData = new RealtimeData();
-                realtimeData.setValue(opcData.getData());
+                realtimeData.setValue(isRising ? 1 : 0);
                 realtimeData.setDesc("出渣状态");
                 mRealtimeStatus.put(CHUZ_STATUS, realtimeData);
             } else if (opcData.getPointName().contains(SubscribeTagConstants.TAG_SZB_STATUS(opcData.getServerType()))
@@ -1011,9 +1078,21 @@ public class DeviceEventListener extends EventListener { //
             ) {
                 RealtimeData realtimeData = new RealtimeData();
                 Boolean value = mParser.parseExpression("#szxt999 > 0 and #szb999 > 0").getValue(mContext, Boolean.class);
-                realtimeData.setValue(Boolean.TRUE.equals(value) ? "1" : "0");
+                realtimeData.setValue(Boolean.TRUE.equals(value) ? 1 : 0);
                 realtimeData.setDesc("冲渣状态");
                 mRealtimeStatus.put(CHONGZ_STATUS, realtimeData);
+            }else if (opcData.getPointName().contains(SubscribeTagConstants.TAG_KKJ_STATUS(opcData.getServerType()))) {
+                //开口机状态
+                RealtimeData realtimeData = new RealtimeData();
+                realtimeData.setValue(opcData.getData());
+                realtimeData.setDesc("开口机状态");
+                mRealtimeStatus.put(KKJ_STATUS, realtimeData);
+            }else if (opcData.getPointName().contains(SubscribeTagConstants.TAG_NPXZYY(opcData.getServerType()))) {
+                //泥炮堵口状态
+                RealtimeData realtimeData = new RealtimeData();
+                realtimeData.setValue(opcData.getData());
+                realtimeData.setDesc("泥炮堵口状态");
+                mRealtimeStatus.put(NPDK_STATUS, realtimeData);
             }
 
         }
@@ -1301,6 +1380,8 @@ public class DeviceEventListener extends EventListener { //
                         PushData.send2Warn(WarnData.warnOpen("急需开口告警", openAlarmUrl));
                         taskExecutor.submit(() -> {
                             exceptionLogService.add(TExceptionLogCreateValidate.builder().exceptionType("12000").exceptionDesc("急需开口告警").build());
+                            //推送预警列表
+                            getExceptionList();
                         });
                     });
                 }
@@ -1316,19 +1397,6 @@ public class DeviceEventListener extends EventListener { //
                     mRealtimeStatus.put(YLGC_STATUS, realtimeData);
                 }
 
-//                if (Objects.equals(child.getIdentifier(), NPJ_STATUS)) {
-//                    RealtimeData realtimeData = new RealtimeData();
-//                    realtimeData.setValue(child.getPassResult());
-//                    realtimeData.setDesc("拔炮状态");
-//                    mRealtimeStatus.put(NPJ_STATUS, realtimeData);
-//                }
-//                if (Objects.equals(child.getIdentifier(), BDLZ_STATUS)) {
-//                    RealtimeData realtimeData = new RealtimeData();
-//                    realtimeData.setValue(child.getPassResult());
-//                    realtimeData.setDesc("摆动溜嘴状态");
-//                    mRealtimeStatus.put(BDLZ_STATUS, realtimeData);
-//                }
-
                 PushData.send2RealtimeStatus(mRealtimeStatus);
             }
         }

+ 21 - 0
taphole-iron/src/main/java/com/sckj/iron/socketio/PushData.java

@@ -83,6 +83,11 @@ public class PushData {
      */
     public static final String IRON_CLOSETTIME = "IRON_CLOSETTIME";
 
+    /***
+     * 告警列表
+     */
+    public static final String IRON_EXCEPTION = "IRON_EXCEPTION";
+
 
     /**
      * 出铁操作
@@ -268,5 +273,21 @@ public class PushData {
         }
     }
 
+    /**
+     * 告警列表
+     *
+     * @return
+     * @Param
+     **/
+    public static void send2Exception(Object message) {
+        if (SocketUtil.connectMap.isEmpty()) {
+            return;
+        }
+        //
+        for (Map.Entry<String, SocketIOClient> entry : SocketUtil.connectMap.entrySet()) {
+            entry.getValue().sendEvent(PushData.IRON_EXCEPTION, AjaxResult.success(message));
+        }
+    }
+
 
 }

+ 7 - 1
taphole-warn/src/main/java/com/sckj/warn/mapper/TExceptionLogMapper.java

@@ -3,11 +3,11 @@ package com.sckj.warn.mapper;
 import com.sckj.common.core.basics.IBaseMapper;
 import com.sckj.warn.dto.WarnDTO;
 import com.sckj.warn.entity.TExceptionLog;
+import com.sckj.warn.vo.TExceptionLogBigScreenVo;
 import com.sckj.warn.vo.TExceptionLogExportVo;
 import org.apache.ibatis.annotations.Mapper;
 
 import java.util.List;
-import java.util.Map;
 
 /**
  * 异常情况记录Mapper
@@ -26,4 +26,10 @@ public interface TExceptionLogMapper extends IBaseMapper<TExceptionLog> {
      * @return
      */
     List<TExceptionLogExportVo> exportExceptionLogList();
+
+    /***
+     * 导出
+     * @return
+     */
+    List<TExceptionLogBigScreenVo> getExceptionLogList();
 }

+ 9 - 0
taphole-warn/src/main/java/com/sckj/warn/service/impl/TExceptionLogServiceImpl.java

@@ -15,6 +15,7 @@ import com.sckj.warn.mapper.TExceptionLogMapper;
 import com.sckj.warn.validate.TExceptionLogCreateValidate;
 import com.sckj.warn.validate.TExceptionLogSearchValidate;
 import com.sckj.warn.validate.TExceptionLogUpdateValidate;
+import com.sckj.warn.vo.TExceptionLogBigScreenVo;
 import com.sckj.warn.vo.TExceptionLogDetailVo;
 import com.sckj.warn.vo.TExceptionLogExportVo;
 import com.sckj.warn.vo.TExceptionLogListedVo;
@@ -275,4 +276,12 @@ public class TExceptionLogServiceImpl extends ServiceImpl<TExceptionLogMapper, T
     public TExceptionLog getLatests() {
         return this.lambdaQuery().orderByDesc(TExceptionLog::getCreateTime).list().stream().findFirst().orElseThrow(()->new OperateException("未查询到数据"));
     }
+
+
+    public List<TExceptionLogBigScreenVo> getExceptionLogList() {
+        return tExceptionLogMapper.getExceptionLogList();
+    }
+
+
+
 }

+ 37 - 0
taphole-warn/src/main/java/com/sckj/warn/vo/TExceptionLogBigScreenVo.java

@@ -0,0 +1,37 @@
+package com.sckj.warn.vo;
+
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+@ApiModel("出铁告警列表")
+public class TExceptionLogBigScreenVo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ColumnWidth(25)
+    @ApiModelProperty(value = "告警时间")
+    private String createTime;
+
+    @ColumnWidth(25)
+    @ApiModelProperty(value = "告警类型")
+    private String exceptionTypeName;
+
+    @ColumnWidth(25)
+    @ApiModelProperty(value = "高炉编号")
+    private String boilerName;
+
+    @ColumnWidth(25)
+    @ApiModelProperty(value = "铁口区域编号")
+    private String tapholeName;
+
+    @ColumnWidth(25)
+    @ApiModelProperty(value = "告警明细")
+    private String exceptionDesc;
+
+
+}

+ 46 - 1
taphole-warn/src/main/resources/mapper/TExceptionLogMapper.xml

@@ -55,9 +55,54 @@
                 and exception_Level = #{exceptionLevel}
             </if>
         </where>
+        order by create_time desc
     </select>
 
 
-
+    <select id="getExceptionLogList" resultType="com.sckj.warn.vo.TExceptionLogBigScreenVo" >
+        SELECT
+        DATE_FORMAT(el.create_time, '%Y-%m-%d %H:%i:%s') create_time,
+        el.exception_desc,
+        a2.name AS exception_type_name,
+        a4.name AS taphole_name,
+        a5.name AS boiler_name
+        FROM t_exception_log el
+        LEFT JOIN (
+        SELECT b.dict_type, a.name, a.value
+        FROM la_dict_data a
+        INNER JOIN la_dict_type b ON a.type_id = b.id
+        ) a2 ON a2.value = el.exception_type AND a2.dict_type = 'exception_type'
+        LEFT JOIN (
+        SELECT b.dict_type, a.name, a.value
+        FROM la_dict_data a
+        INNER JOIN la_dict_type b ON a.type_id = b.id
+        ) a3 ON a3.value = el.exception_level AND a3.dict_type = 'exception_level'
+        LEFT JOIN (
+        SELECT b.dict_type, a.name, a.value
+        FROM la_dict_data a
+        INNER JOIN la_dict_type b ON a.type_id = b.id
+        ) a4 ON a4.value = el.taphole_id AND a4.dict_type = 'taphole_num'
+        LEFT JOIN (
+        SELECT b.dict_type, a.name, a.value
+        FROM la_dict_data a
+        INNER JOIN la_dict_type b ON a.type_id = b.id
+        ) a5 ON a5.value = el.boiler_id AND a5.dict_type = 'boiler_num'
+        <where>
+            <if test="boilerId != null and boiler_id !=''">
+                and boiler_id = #{boiler_id}
+            </if>
+            <if test="tapholeId != null and tapholeId !=''">
+                and taphole_Id = #{tapholeId}
+            </if>
+            <if test="exceptionType != null and exceptionType !=''">
+                and exception_Type = #{exceptionType}
+            </if>
+            <if test="exceptionLevel != null and exceptionLevel !=''">
+                and exception_Level = #{exceptionLevel}
+            </if>
+        </where>
+        order by create_time desc
+        limit 10
+    </select>
 
 </mapper>