Selaa lähdekoodia

Merge branch 'master' of http://git.xt.wenhq.top:8083/liwei19941102/cbwqpf

MSI\liwei 3 vuotta sitten
vanhempi
commit
6ea8d298de
35 muutettua tiedostoa jossa 1462 lisäystä ja 237 poistoa
  1. 263 2
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/gas/GasCommonController.java
  2. 0 97
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/gas/So2Controller.java
  3. 86 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/MessageService.java
  4. 39 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/MessageServiceSoap.java
  5. 43 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/ObjectFactory.java
  6. 25 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/SMSUtil.java
  7. 78 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/SendMessage.java
  8. 51 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/SendMessageResponse.java
  9. 63 19
      ruoyi-admin/src/main/java/com/ruoyi/web/job/CanalScheduling.java
  10. 8 0
      ruoyi-admin/src/main/java/com/ruoyi/web/service/Impl/GasCommonServiceImpl.java
  11. 2 0
      ruoyi-common/src/main/java/com/ruoyi/common/constant/CacheConstants.java
  12. 13 17
      ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
  13. 153 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/IllegalShipData.java
  14. 2 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/AisDatabaseMapper.java
  15. 2 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/HeiYanMapper.java
  16. 61 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/IllegalShipDataMapper.java
  17. 2 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/So2Mapper.java
  18. 2 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IAisDatabase.java
  19. 2 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IHeiYanService.java
  20. 61 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IIllegalShipDataService.java
  21. 2 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/ISo2Service.java
  22. 5 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AisDatabaseImpl.java
  23. 10 7
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AisInfoServiceImpl.java
  24. 5 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/HeiYanServiceImpl.java
  25. 89 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IllegalShipDataServiceImpl.java
  26. 5 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/So2ServiceImpl.java
  27. 23 1
      ruoyi-system/src/main/resources/mapper/system/AisDatabaseMapper.xml
  28. 1 0
      ruoyi-system/src/main/resources/mapper/system/GasCommonMapper.xml
  29. 57 1
      ruoyi-system/src/main/resources/mapper/system/HeiYanMapper.xml
  30. 206 0
      ruoyi-system/src/main/resources/mapper/system/IllegalShipDataMapper.xml
  31. 14 1
      ruoyi-system/src/main/resources/mapper/system/So2Mapper.xml
  32. 2 2
      ruoyi-ui/src/views/components/table/homeTable.vue
  33. 1 1
      ruoyi-ui/src/views/components/table/liuTable.vue
  34. 85 88
      ruoyi-ui/src/views/components/table/scroll.vue
  35. 1 1
      ruoyi-ui/src/views/components/table/xtTable.vue

+ 263 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/gas/GasCommonController.java

@@ -1,26 +1,46 @@
 package com.ruoyi.web.controller.gas;
 
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.bean.copier.CopyOptions;
 import cn.hutool.core.convert.Convert;
 import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.util.NumberUtil;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
+import cn.hutool.http.HttpUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.ruoyi.common.constant.CacheConstants;
 import com.ruoyi.common.constant.ElasticConstants;
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.redis.RedisCache;
+import com.ruoyi.common.utils.uuid.IdUtils;
 import com.ruoyi.framework.config.ElasticSearchClient;
 import com.ruoyi.system.domain.AisShip;
 import com.ruoyi.system.domain.DeviceBo;
 import com.ruoyi.system.domain.IllegalInfo;
+import com.ruoyi.system.domain.IllegalShipData;
 import com.ruoyi.system.domain.MonitorInfo;
 import com.ruoyi.system.domain.SyncPost;
+import com.ruoyi.system.domain.vo.AisShipInfo;
+import com.ruoyi.system.domain.vo.ShipEepReportRecInfo;
 import com.ruoyi.system.service.IAisDatabase;
+import com.ruoyi.system.service.IAisInfoService;
 import com.ruoyi.system.service.IAisShipService;
 import com.ruoyi.system.service.IHeiYanService;
+import com.ruoyi.system.service.IIllegalShipDataService;
 import com.ruoyi.system.service.ISo2Service;
+import com.ruoyi.system.service.ISysConfigService;
+import com.ruoyi.web.controller.tool.SMSUtil;
 import com.ruoyi.web.service.IGasCommonService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import lombok.SneakyThrows;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -60,6 +80,18 @@ public class GasCommonController {
     private IHeiYanService heiYanService;
     @Autowired
     private IAisShipService aisShipService;
+    @Value("${spring.profiles.active}")
+    private String env;
+    @Autowired
+    private IAisInfoService aisInfoService;
+    @Autowired
+    private IIllegalShipDataService illegalShipDataService;
+    @Autowired
+    private ISysConfigService configService;
+    @Value("${black.snapImgUrl}")
+    private String blackImgUrl;
+    @Autowired
+    private RedisCache redisCache;
 
     @PreAuthorize("@ss.hasPermi('system:gas:sync')")
     @PostMapping("/sync")
@@ -115,6 +147,9 @@ public class GasCommonController {
     @GetMapping("/queryDeviceList")
     @ApiOperation("获取所有设备数据")
     public AjaxResult queryDeviceList(@RequestParam(required = false) String monitor) {
+        if (redisCache.hasKey(CacheConstants.DEVICE_LIST_STATIC)) {
+            return AjaxResult.success(redisCache.getCacheMap(CacheConstants.DEVICE_LIST_STATIC));
+        }
         List<DeviceBo> njsanq = new ArrayList<>();
         List<DeviceBo> njsiq = new ArrayList<>();
         List<DeviceBo> ry = new ArrayList<>();
@@ -182,9 +217,30 @@ public class GasCommonController {
         data.put("江阴大桥", jy);
         data.put("苏通大桥", st);
 
+        redisCache.setCacheMap(CacheConstants.DEVICE_LIST_STATIC, data);
         return AjaxResult.success(data);
     }
 
+    @GetMapping("/queryShipByDeviceId")
+    @ApiOperation("根据设备id获取设备的嫌疑或违规船舶数据")
+    public AjaxResult queryShipByDeviceId(@RequestParam String deviceId, @RequestParam String illegalStatus, @RequestParam(required = false) Integer size, @RequestParam String... index) {
+        Map<String, Object> equalsCondition = new HashMap<>();
+        equalsCondition.put("illegalStatus", illegalStatus);
+        equalsCondition.put("deviceId", deviceId);
+        List<String> orderBy = new ArrayList<>();
+        orderBy.add("-createTime");
+        if (ObjectUtil.isEmpty(size)) {
+            size = 20;
+        }
+        Map<String, Object> stringObjectMap = client.searchDocument(equalsCondition,
+                null,
+                orderBy,
+                1,
+                size,
+                index);
+        return AjaxResult.success(Convert.toList(IllegalInfo.class, stringObjectMap.get("pageList")));
+    }
+
     @GetMapping("/queryShipList")
     @ApiOperation("获取所有船舶数据-用于地图展示船舶")
     public AjaxResult queryShipList(@RequestParam(required = false) String monitor, @RequestParam(required = false) String startTime) {
@@ -272,10 +328,16 @@ public class GasCommonController {
         put("江阴大桥", "江阴海事局");
         put("苏通大桥", "常熟海事局");
     }};
+    public final static Map<String, String> heiyanDeviceMap = new HashMap<String, String>() {{
+        put("南京三桥", "65");
+        put("润扬大桥", "66");
+        put("江阴大桥", "67");
+        put("苏通大桥", "68");
+    }};
 
     @GetMapping("/queryData")
     @ApiOperation("查询ES数据")
-    public Object queryData(@RequestParam(required = false) String id, @RequestParam(required = false) Integer size, @RequestParam String... index) {
+    public Object queryData(@RequestParam(required = false) String id, @RequestParam(required = false) Integer size, @RequestParam(required = false) String orderKey, @RequestParam String... index) {
         if (size == null) {
             size = 200;
         }
@@ -284,7 +346,9 @@ public class GasCommonController {
             equalsCondition.put("id", id);
         }
         List<String> orderBy = new ArrayList<>();
-        orderBy.add("-createTime");
+        if (StrUtil.isNotBlank(orderKey)) {
+            orderBy.add("-" + orderKey);
+        }
         Map<String, Object> map = client.searchDocument(equalsCondition,
                 null,
                 orderBy,
@@ -294,4 +358,201 @@ public class GasCommonController {
         return map.get("pageList");
     }
 
+    @DeleteMapping("/deleteIndexOneData")
+    @ApiOperation("删除ES中某个数据")
+    public void deleteIndexData(@RequestParam String index, @RequestParam String id) {
+        client.deleteDocument(index, id);
+    }
+
+    @PostMapping("/sendSms")
+    @ApiOperation("发送短信")
+    public AjaxResult sendSms(@RequestBody JSONObject jsonObject) {
+        String content = jsonObject.getString("content");
+        String phone = jsonObject.getString("phone");
+        if (StrUtil.hasBlank(content, phone)) {
+            return AjaxResult.error("存在参数为空");
+        }
+        SMSUtil smsUtil = new SMSUtil();
+        smsUtil.sendMessage(content, phone);
+        return AjaxResult.success();
+    }
+
+    @SneakyThrows
+    @PostMapping("/reSyncOneData")
+    @ApiOperation("重新同步某一个数据")
+    public void reSyncOneData(@RequestParam String index, @RequestParam String id) {
+        client.deleteDocument(index, id);
+        String so2ThresholdVal = configService.selectConfigByKey("so2.so2");
+        String blackThresholdVal = configService.selectConfigByKey("black.rcgSoot");
+        if (ElasticConstants.AIS_ILLEGAL_SHIP.equals(index)) {
+            Map<String, Object> afterDataMap = aisDatabase.queryById(id);
+            // 嗅探系统-违规船舶
+            if ("prod".equals(env)) {
+                // 查询检测点和船舶信息、船舶进出港记录
+                if (ObjectUtil.isNotEmpty(afterDataMap.get("shipMmsi"))) {
+                    AisShipInfo shipInfo = aisInfoService.getShipInfo("", Convert.toStr(afterDataMap.get("shipMmsi")), "", "");
+                    if (shipInfo != null) {
+                        afterDataMap.put("shipName", shipInfo.getShipName());
+                        afterDataMap.put("shipRegionType", shipInfo.getShipRegionType());
+                    }
+                }
+            }
+            if (ObjectUtil.isNotEmpty(afterDataMap.get("sPercent")) && NumberUtil.isGreaterOrEqual(Convert.toBigDecimal(afterDataMap.get("sPercent")), Convert.toBigDecimal(so2ThresholdVal))) {
+                // 查询检测点和船舶信息、船舶进出港记录
+                if (ObjectUtil.isNotEmpty(afterDataMap.get("mmsi"))) {
+                    ShipEepReportRecInfo eepReportRecInfo = aisInfoService.getShipEepReportRecInfo(DateUtil.formatDate(DateUtil.lastWeek()), DateUtil.formatDate(DateUtil.tomorrow()), Convert.toStr(afterDataMap.get("mmsi")), "", "");
+                    if (eepReportRecInfo != null) {
+                        afterDataMap.put("destination", eepReportRecInfo.getNextPortName());
+                        afterDataMap.put("berthName", eepReportRecInfo.getBerthName());
+                    }
+                }
+                afterDataMap.put("deviceId", afterDataMap.get("semId"));
+                // 查询站点信息
+                Map<String, Object> sem = client.getDocById(ElasticConstants.AIS_SEM_INSTRUMENT, Convert.toStr(afterDataMap.get("semId")), "name,category");
+                if (sem != null && ObjectUtil.equal(sem.get("code"), 200)) {
+                    Map<String, String> data = Convert.toMap(String.class, String.class, sem.get("data"));
+                    afterDataMap.put("semName", data.get("name"));
+                    afterDataMap.put("monitorPointName", data.get("category"));
+                    afterDataMap.put("orgName", orgMap.get(data.get("category")));
+                }
+
+                // 嫌疑船舶
+                afterDataMap.put("illegalStatus", 2);
+                afterDataMap.put("uploadFlag", 0);
+                // TODO 上报行政检查系统
+
+            } else {
+                afterDataMap.put("uploadFlag", 0);
+                afterDataMap.put("illegalStatus", 1);
+            }
+            if (ObjectUtil.isNotEmpty(afterDataMap.get("mmsi"))) {
+                aisInfoService.getDynamicShipInfo(Convert.toStr(afterDataMap.get("mmsi")));
+            }
+            afterDataMap.put("illegalType", "xiutan");
+            // 保存数据
+            saveIllegalData(afterDataMap, ElasticConstants.AIS_ILLEGAL_SHIP);
+            client.createDocument(ElasticConstants.AIS_ILLEGAL_SHIP, Convert.toStr(afterDataMap.get("id")), afterDataMap);
+
+        } else if (ElasticConstants.SO2_ALERT.equals(index)) {
+            Map<String, Object> afterDataMap = so2Service.queryById(id);
+
+            // 船舶记录
+            if ("prod".equals(env)) {
+                if (ObjectUtil.isNotEmpty(afterDataMap.get("mmsi"))) {
+                    AisShipInfo shipInfo = aisInfoService.getShipInfo("", Convert.toStr(afterDataMap.get("mmsi")), "", "");
+                    if (shipInfo != null) {
+                        afterDataMap.put("shipName", shipInfo.getShipName());
+                        afterDataMap.put("shipRegionType", shipInfo.getShipRegionType());
+                    }
+                }
+            }
+            // 判断是否大于阈值
+            if (ObjectUtil.isNotEmpty(afterDataMap.get("so2Percent")) && NumberUtil.isGreaterOrEqual(Convert.toBigDecimal(afterDataMap.get("so2Percent")), Convert.toBigDecimal(so2ThresholdVal))) {
+                // 查询检测点和船舶信息、船舶进出港记录
+                if (ObjectUtil.isNotEmpty(afterDataMap.get("mmsi"))) {
+                    ShipEepReportRecInfo eepReportRecInfo = aisInfoService.getShipEepReportRecInfo(DateUtil.formatDate(DateUtil.lastWeek()), DateUtil.formatDate(DateUtil.tomorrow()), Convert.toStr(afterDataMap.get("mmsi")), "", "");
+                    if (eepReportRecInfo != null) {
+                        afterDataMap.put("destination", eepReportRecInfo.getNextPortName());
+                        afterDataMap.put("berthName", eepReportRecInfo.getBerthName());
+                    }
+                }
+                Map<String, Object> monitor = client.getDocById(ElasticConstants.SO2_MONITOR_POINT, Convert.toStr(afterDataMap.get("monitorPointId")), "name");
+                if (monitor != null && ObjectUtil.equal(monitor.get("code"), 200)) {
+                    Map<String, String> data = Convert.toMap(String.class, String.class, monitor.get("data"));
+                    afterDataMap.put("monitorPointName", data.get("name"));
+                    afterDataMap.put("orgName", orgMap.get(data.get("name")));
+                }
+
+                // 嫌疑船舶
+                afterDataMap.put("illegalStatus", 2);
+                afterDataMap.put("uploadFlag", 0);
+                // TODO 上报行政检查系统
+
+            } else {
+                afterDataMap.put("uploadFlag", 0);
+                afterDataMap.put("illegalStatus", 1);
+            }
+            if (ObjectUtil.isNotEmpty(afterDataMap.get("mmsi"))) {
+                aisInfoService.getDynamicShipInfo(Convert.toStr(afterDataMap.get("mmsi")));
+            }
+            afterDataMap.put("illegalType", "guangpu");
+            // 保存数据
+            saveIllegalData(afterDataMap, ElasticConstants.SO2_ALERT);
+            client.createDocument(ElasticConstants.SO2_ALERT, Convert.toStr(afterDataMap.get("id")), afterDataMap);
+
+        } else if (ElasticConstants.HEIYAN_SHIP_RECOGNITION.equals(index)) {
+            Map<String, Object> afterDataMap = heiYanService.queryById(id);
+
+            if (ObjectUtil.isEmpty(afterDataMap.get("aisMmsi")) /*|| Convert.toStr(afterDataMap.get("aisMmsi")).length() != 9*/) {
+                return;
+            }
+            // 判断数据状态
+            if (ObjectUtil.isNotEmpty(afterDataMap.get("rcgSoot")) && NumberUtil.isGreaterOrEqual(Convert.toBigDecimal(afterDataMap.get("rcgSoot")),
+                    Convert.toBigDecimal(blackThresholdVal))) {
+                // 查询黑烟图片
+                if ("prod".equals(env)) {
+                    String imgUrl = HttpUtil.get(blackImgUrl + Convert.toStr(afterDataMap.get("id")));
+                    JSONObject response = JSON.parseObject(imgUrl);
+                    if (200 == response.getInteger("code")) {
+                        List<String> newImgList = new ArrayList<>();
+                        JSONArray imgUrlList = response.getJSONObject("data").getJSONArray("imgUrlList");
+                        String sootImgUrl = response.getJSONObject("data").getString("sootImgUrl");
+                        for (Object o : imgUrlList) {
+                            // 只保存细节、全貌开头的图片
+                            String s = Convert.toStr(o);
+                            if (StrUtil.containsAny(s, "全貌", "细节")) {
+                                newImgList.add("http://" + s);
+                            }
+                        }
+                        afterDataMap.put("sootImgUrl", StrUtil.isNotBlank(sootImgUrl) ? "http://" + sootImgUrl : "");
+                        afterDataMap.put("allImgUrl", newImgList);
+                    }
+                }
+                // 超过阈值后直接判定为违规船舶
+                afterDataMap.put("illegalStatus", 3);
+                afterDataMap.put("uploadFlag", 0);
+                // TODO 上报行政检查系统
+
+            } else {
+                afterDataMap.put("uploadFlag", 0);
+                afterDataMap.put("illegalStatus", 1);
+            }
+            if (ObjectUtil.isNotEmpty(afterDataMap.get("aisMmsi")) && Convert.toStr(afterDataMap.get("aisMmsi")).length() == 9) {
+                aisInfoService.getDynamicShipInfo(Convert.toStr(afterDataMap.get("aisMmsi")));
+            }
+            afterDataMap.put("illegalType", "heiyan");
+            // 查询检测点和船舶信息
+            if (ObjectUtil.isNotEmpty(afterDataMap.get("aisMmsi")) && !"0".equals(Convert.toStr(afterDataMap.get("aisMmsi")))) {
+                AisShipInfo shipInfo = aisInfoService.getShipInfo("", Convert.toStr(afterDataMap.get("aisMmsi")), "", "");
+                if (shipInfo != null) {
+                    afterDataMap.put("shipName", shipInfo.getShipName());
+                    afterDataMap.put("shipRegionType", shipInfo.getShipRegionType());
+                }
+            }
+            if (ObjectUtil.isNotEmpty(afterDataMap.get("snapPos"))) {
+                afterDataMap.put("orgName", orgMap.get(Convert.toStr(afterDataMap.get("snapPos"))));
+                afterDataMap.put("deviceId", heiyanDeviceMap.get(Convert.toStr(afterDataMap.get("snapPos"))));
+            }
+            // 保存数据
+            saveIllegalData(afterDataMap, ElasticConstants.HEIYAN_SHIP_RECOGNITION);
+            client.createDocument(ElasticConstants.HEIYAN_SHIP_RECOGNITION, Convert.toStr(afterDataMap.get("id")), afterDataMap);
+        }
+    }
+
+    private void saveIllegalData(Map<String, Object> afterDataMap, String indexName) {
+        if (Convert.toInt(afterDataMap.get("illegalStatus")) != 1) {
+            IllegalShipData illegalShipData = new IllegalShipData();
+            BeanUtil.fillBeanWithMap(afterDataMap, illegalShipData, CopyOptions.create().setIgnoreProperties("id"));
+            illegalShipData.setId(IdUtils.fastSimpleUUID());
+            illegalShipData.setSystemId(Convert.toStr(afterDataMap.get("id")));
+            illegalShipData.setSystemEsIndex(indexName);
+            try {
+                illegalShipDataService.insertIllegalShipData(illegalShipData);
+            } catch (Exception ignored) {
+                ignored.printStackTrace();
+            }
+
+        }
+    }
+
 }

+ 0 - 97
ruoyi-admin/src/main/java/com/ruoyi/web/controller/gas/So2Controller.java

@@ -17,10 +17,8 @@ import com.ruoyi.common.core.page.TableSupport;
 import com.ruoyi.common.core.redis.RedisCache;
 import com.ruoyi.common.enums.AggsType;
 import com.ruoyi.framework.config.ElasticSearchClient;
-import com.ruoyi.system.domain.GuapAlert;
 import com.ruoyi.system.domain.GuapMonitorPoint;
 import com.ruoyi.system.domain.IllegalShip;
-import com.ruoyi.system.domain.XiuTanIllegalShip;
 import com.ruoyi.system.domain.XiuTanSemInstrument;
 import com.ruoyi.system.service.IAisDatabase;
 import com.ruoyi.system.service.IHeiYanService;
@@ -65,84 +63,6 @@ public class So2Controller extends BaseController {
     @Autowired
     private ISysDictTypeService dictTypeService;
 
-    @GetMapping("/guangpu/list")
-    @ApiOperation("光谱-硫嫌疑船舶列表数据")
-    public TableDataInfo GpList(GuapAlert guapAlert) {
-        // 传来的参数
-        Map<String, Object> params = guapAlert.getParams();
-        Map<String, Object> equalsCondition = new HashMap<>();
-        // 组装查询条件
-        equalsCondition.put("mmsi", ObjectUtil.isEmpty(guapAlert.getMmsi()) ? null : StrUtil.concat(true, "*", Convert.toStr(guapAlert.getMmsi()), "*"));
-        equalsCondition.put("shipName", StrUtil.isBlank(guapAlert.getShipName()) ? null : StrUtil.concat(true, "*", guapAlert.getShipName(), "*"));
-        equalsCondition.put("shipRegionType", guapAlert.getShipRegionType());
-        equalsCondition.put("destination", StrUtil.isBlank(guapAlert.getDestination()) ? null : StrUtil.concat(true, "*", guapAlert.getDestination(), "*"));
-        equalsCondition.put("orgName", guapAlert.getOrgName());
-        equalsCondition.put("illegalStatus", guapAlert.getIllegalStatus());
-        equalsCondition.put("dealResult", guapAlert.getDealResult());
-        equalsCondition.put("fastResult", guapAlert.getFastResult());
-        equalsCondition.put("uploadResult", guapAlert.getUploadResult());
-        equalsCondition.put("monitorPointName", guapAlert.getMonitorPointName());
-        // 组装范围查询条件
-        Map<String, Object> rangeCondition = new HashMap<>();
-        if (ObjectUtil.isNotEmpty(params.get("beginTime"))) {
-            params.put("beginTime", params.get("beginTime") + " 00:00:00");
-        }
-        if (ObjectUtil.isNotEmpty(params.get("endTime"))) {
-            params.put("endTime", params.get("endTime") + " 23:59:59");
-        }
-        rangeCondition.put("createTime", StrUtil.concat(true, "[", Convert.toStr(params.get("beginTime")), ",", Convert.toStr(params.get("endTime")), "]"));
-        List<String> orderBy = new ArrayList<>();
-        orderBy.add("-createTime");
-        PageDomain pageDomain = TableSupport.buildPageRequest();
-        Map<String, Object> maps = client.searchDocument(equalsCondition, rangeCondition, orderBy, pageDomain.getPageNum(), pageDomain.getPageSize(), ElasticConstants.SO2_ALERT);
-
-        TableDataInfo rspData = new TableDataInfo();
-        rspData.setCode(HttpStatus.SUCCESS);
-        rspData.setMsg("查询成功");
-        rspData.setRows(Convert.toList(GuapAlert.class, maps.get("pageList")));
-        rspData.setTotal(Convert.toLong(maps.get("totalNum")));
-        return rspData;
-    }
-
-    @GetMapping("/xiutan/list")
-    @ApiOperation("嗅探-硫嫌疑船舶列表数据")
-    public TableDataInfo XtList(XiuTanIllegalShip illegalShip) {
-        // 传来的参数
-        Map<String, Object> params = illegalShip.getParams();
-        Map<String, Object> equalsCondition = new HashMap<>();
-        // 组装查询条件
-        equalsCondition.put("mmsi", ObjectUtil.isEmpty(illegalShip.getMmsi()) ? null : StrUtil.concat(true, "*", Convert.toStr(illegalShip.getMmsi()), "*"));
-        equalsCondition.put("shipName", StrUtil.isBlank(illegalShip.getShipName()) ? null : StrUtil.concat(true, "*", illegalShip.getShipName(), "*"));
-        equalsCondition.put("shipRegionType", illegalShip.getShipRegionType());
-        equalsCondition.put("destination", StrUtil.isBlank(illegalShip.getDestination()) ? null : StrUtil.concat(true, "*", illegalShip.getDestination(), "*"));
-        equalsCondition.put("orgName", illegalShip.getOrgName());
-        equalsCondition.put("illegalStatus", illegalShip.getIllegalStatus());
-        equalsCondition.put("dealResult", illegalShip.getDealResult());
-        equalsCondition.put("fastResult", illegalShip.getFastResult());
-        equalsCondition.put("uploadResult", illegalShip.getUploadResult());
-        equalsCondition.put("monitorPointName", illegalShip.getMonitorPointName());
-        // 组装范围查询条件
-        Map<String, Object> rangeCondition = new HashMap<>();
-        if (ObjectUtil.isNotEmpty(params.get("beginTime"))) {
-            params.put("beginTime", params.get("beginTime") + " 00:00:00");
-        }
-        if (ObjectUtil.isNotEmpty(params.get("endTime"))) {
-            params.put("endTime", params.get("endTime") + " 23:59:59");
-        }
-        rangeCondition.put("peakTime", StrUtil.concat(true, "[", Convert.toStr(params.get("beginTime")), ",", Convert.toStr(params.get("endTime")), "]"));
-        List<String> orderBy = new ArrayList<>();
-        orderBy.add("-peakTime");
-        PageDomain pageDomain = TableSupport.buildPageRequest();
-        Map<String, Object> maps = client.searchDocument(equalsCondition, rangeCondition, orderBy, pageDomain.getPageNum(), pageDomain.getPageSize(), ElasticConstants.AIS_ILLEGAL_SHIP);
-
-        TableDataInfo rspData = new TableDataInfo();
-        rspData.setCode(HttpStatus.SUCCESS);
-        rspData.setMsg("查询成功");
-        rspData.setRows(Convert.toList(GuapAlert.class, maps.get("pageList")));
-        rspData.setTotal(Convert.toLong(maps.get("totalNum")));
-        return rspData;
-    }
-
     @GetMapping("/list")
     @ApiOperation("硫嫌疑船舶列表数据")
     public TableDataInfo list(IllegalShip illegalShip) {
@@ -304,21 +224,4 @@ public class So2Controller extends BaseController {
         return AjaxResult.success(result);
     }
 
-    /*@DeleteMapping("/del")
-    @ApiOperation("删除数据")
-    public AjaxResult del() {
-        if (StrUtil.isBlank(interval)) {
-            // 默认值为1个月
-            interval = "1M";
-        }
-        Map<Object, Object> aisAggs = client.dateHistogramAggs(ElasticConstants.AIS_ILLEGAL_SHIP, AggsType.count, "peakTime", "id", null, null, new DateHistogramInterval(interval));
-        Map<Object, Object> so2Aggs = client.dateHistogramAggs(ElasticConstants.SO2_ALERT, AggsType.count, "createTime", "id", null, null, new DateHistogramInterval(interval));
-        Map<Object, Object> heiyanAggs = client.dateHistogramAggs(ElasticConstants.HEIYAN_SHIP_RECOGNITION, AggsType.count, "snapTimeFmt", "id", null, null, new DateHistogramInterval(interval));
-        Map<String, Map<Object, Object>> result = new HashMap<>();
-        result.put("ais", aisAggs);
-        result.put("so2", so2Aggs);
-        result.put("black", heiyanAggs);
-        return AjaxResult.success(result);
-    }*/
-
 }

+ 86 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/MessageService.java

@@ -0,0 +1,86 @@
+package com.ruoyi.web.controller.tool;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceFeature;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2.9-b130926.1035
+ * Generated source version: 2.2
+ */
+@WebServiceClient(name = "MessageService", targetNamespace = "http://tempuri.org/", wsdlLocation = "http://198.17.1.157:9013/sms/messageservice.asmx?wsdl")
+public class MessageService
+        extends Service {
+
+    private final static URL MESSAGESERVICE_WSDL_LOCATION;
+    private final static WebServiceException MESSAGESERVICE_EXCEPTION;
+    private final static QName MESSAGESERVICE_QNAME = new QName("http://tempuri.org/", "MessageService");
+
+    static {
+        URL url = null;
+        WebServiceException e = null;
+        try {
+            url = new URL("http://198.17.1.157:9013/sms/messageservice.asmx?wsdl");
+        } catch (MalformedURLException ex) {
+            e = new WebServiceException(ex);
+        }
+        MESSAGESERVICE_WSDL_LOCATION = url;
+        MESSAGESERVICE_EXCEPTION = e;
+    }
+
+    public MessageService() {
+        super(__getWsdlLocation(), MESSAGESERVICE_QNAME);
+    }
+
+    public MessageService(WebServiceFeature... features) {
+        super(__getWsdlLocation(), MESSAGESERVICE_QNAME, features);
+    }
+
+    public MessageService(URL wsdlLocation) {
+        super(wsdlLocation, MESSAGESERVICE_QNAME);
+    }
+
+    public MessageService(URL wsdlLocation, WebServiceFeature... features) {
+        super(wsdlLocation, MESSAGESERVICE_QNAME, features);
+    }
+
+    public MessageService(URL wsdlLocation, QName serviceName) {
+        super(wsdlLocation, serviceName);
+    }
+
+    public MessageService(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
+        super(wsdlLocation, serviceName, features);
+    }
+
+    /**
+     * @return returns MessageServiceSoap
+     */
+    @WebEndpoint(name = "MessageServiceSoap")
+    public com.ruoyi.web.controller.tool.MessageServiceSoap getMessageServiceSoap() {
+        return super.getPort(new QName("http://tempuri.org/", "MessageServiceSoap"), com.ruoyi.web.controller.tool.MessageServiceSoap.class);
+    }
+
+    /**
+     * @param features A list of {@link WebServiceFeature} to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.
+     * @return returns MessageServiceSoap
+     */
+    @WebEndpoint(name = "MessageServiceSoap")
+    public com.ruoyi.web.controller.tool.MessageServiceSoap getMessageServiceSoap(WebServiceFeature... features) {
+        return super.getPort(new QName("http://tempuri.org/", "MessageServiceSoap"), com.ruoyi.web.controller.tool.MessageServiceSoap.class, features);
+    }
+
+    private static URL __getWsdlLocation() {
+        if (MESSAGESERVICE_EXCEPTION != null) {
+            throw MESSAGESERVICE_EXCEPTION;
+        }
+        return MESSAGESERVICE_WSDL_LOCATION;
+    }
+
+}

+ 39 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/MessageServiceSoap.java

@@ -0,0 +1,39 @@
+package com.ruoyi.web.controller.tool;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2.9-b130926.1035
+ * Generated source version: 2.2
+ */
+@WebService(name = "MessageServiceSoap", targetNamespace = "http://tempuri.org/")
+@XmlSeeAlso({
+        ObjectFactory.class
+})
+public interface MessageServiceSoap {
+
+
+    /**
+     * @param mobiles
+     * @param content
+     * @return returns int
+     */
+    @WebMethod(operationName = "SendMessage", action = "http://tempuri.org/SendMessage")
+    @WebResult(name = "SendMessageResult", targetNamespace = "http://tempuri.org/")
+    @RequestWrapper(localName = "SendMessage", targetNamespace = "http://tempuri.org/", className = "com.hqiqi.jmles.webservice.sms.SendMessage")
+    @ResponseWrapper(localName = "SendMessageResponse", targetNamespace = "http://tempuri.org/", className = "com.hqiqi.jmles.webservice.sms.SendMessageResponse")
+    public int sendMessage(
+            @WebParam(name = "mobiles", targetNamespace = "http://tempuri.org/")
+                    String mobiles,
+            @WebParam(name = "content", targetNamespace = "http://tempuri.org/")
+                    String content);
+
+}

+ 43 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/ObjectFactory.java

@@ -0,0 +1,43 @@
+package com.ruoyi.web.controller.tool;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the com.heeexy.example.webservice.sms package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups.  Factory methods for each of these are
+ * provided in this class.
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.hqiqi.jmles.webservice.sms
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link SendMessageResponse }
+     */
+    public SendMessageResponse createSendMessageResponse() {
+        return new SendMessageResponse();
+    }
+
+    /**
+     * Create an instance of {@link SendMessage }
+     */
+    public SendMessage createSendMessage() {
+        return new SendMessage();
+    }
+
+}

+ 25 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/SMSUtil.java

@@ -0,0 +1,25 @@
+package com.ruoyi.web.controller.tool;
+
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+@Component
+@Data
+@Slf4j
+public class SMSUtil {
+
+    /**
+     * 最新发送短信工具
+     *
+     * @param content
+     * @param phone
+     */
+    public void sendMessage(String content, String phone) {
+        MessageService messageService = new MessageService();
+        MessageServiceSoap messageServiceSoap = messageService.getMessageServiceSoap();
+        int result = messageServiceSoap.sendMessage(phone, content);
+        log.info("手机号:{},内容:{},短信返回码:{}", phone, content, result);
+    }
+
+}

+ 78 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/SendMessage.java

@@ -0,0 +1,78 @@
+package com.ruoyi.web.controller.tool;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>anonymous complex type�� Java �ࡣ
+ *
+ * <p>����ģʽƬ��ָ�������ڴ����е�Ԥ�����ݡ�
+ *
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="mobiles" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="content" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+        "mobiles",
+        "content"
+})
+@XmlRootElement(name = "SendMessage")
+public class SendMessage {
+
+    protected String mobiles;
+    protected String content;
+
+    /**
+     * ��ȡmobiles���Ե�ֵ��
+     *
+     * @return possible object is
+     * {@link String }
+     */
+    public String getMobiles() {
+        return mobiles;
+    }
+
+    /**
+     * ����mobiles���Ե�ֵ��
+     *
+     * @param value allowed object is
+     *              {@link String }
+     */
+    public void setMobiles(String value) {
+        this.mobiles = value;
+    }
+
+    /**
+     * ��ȡcontent���Ե�ֵ��
+     *
+     * @return possible object is
+     * {@link String }
+     */
+    public String getContent() {
+        return content;
+    }
+
+    /**
+     * ����content���Ե�ֵ��
+     *
+     * @param value allowed object is
+     *              {@link String }
+     */
+    public void setContent(String value) {
+        this.content = value;
+    }
+
+}

+ 51 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/SendMessageResponse.java

@@ -0,0 +1,51 @@
+package com.ruoyi.web.controller.tool;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>anonymous complex type�� Java �ࡣ
+ *
+ * <p>����ģʽƬ��ָ�������ڴ����е�Ԥ�����ݡ�
+ *
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="SendMessageResult" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+        "sendMessageResult"
+})
+@XmlRootElement(name = "SendMessageResponse")
+public class SendMessageResponse {
+
+    @XmlElement(name = "SendMessageResult")
+    protected int sendMessageResult;
+
+    /**
+     * ��ȡsendMessageResult���Ե�ֵ��
+     */
+    public int getSendMessageResult() {
+        return sendMessageResult;
+    }
+
+    /**
+     * ����sendMessageResult���Ե�ֵ��
+     */
+    public void setSendMessageResult(int value) {
+        this.sendMessageResult = value;
+    }
+
+}

+ 63 - 19
ruoyi-admin/src/main/java/com/ruoyi/web/job/CanalScheduling.java

@@ -1,5 +1,7 @@
 package com.ruoyi.web.job;
 
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.bean.copier.CopyOptions;
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.convert.Convert;
 import cn.hutool.core.date.DateUtil;
@@ -19,10 +21,13 @@ import com.ruoyi.common.constant.CacheConstants;
 import com.ruoyi.common.constant.ElasticConstants;
 import com.ruoyi.common.core.redis.RedisCache;
 import com.ruoyi.common.utils.JdbcTypeUtil;
+import com.ruoyi.common.utils.uuid.IdUtils;
 import com.ruoyi.framework.config.ElasticSearchClient;
+import com.ruoyi.system.domain.IllegalShipData;
 import com.ruoyi.system.domain.vo.AisShipInfo;
 import com.ruoyi.system.domain.vo.ShipEepReportRecInfo;
 import com.ruoyi.system.service.IAisInfoService;
+import com.ruoyi.system.service.IIllegalShipDataService;
 import com.ruoyi.system.service.ISysConfigService;
 import com.ruoyi.web.core.config.CanalConfig;
 import lombok.SneakyThrows;
@@ -65,6 +70,8 @@ public class CanalScheduling implements Runnable, ApplicationContextAware {
 //    private CanalConnector canalConnector;
     @Value("${black.snapImgUrl}")
     private String blackImgUrl;
+    @Autowired
+    private IIllegalShipDataService illegalShipDataService;
 
     @Autowired
     private CanalConfig canalConfig;
@@ -80,6 +87,12 @@ public class CanalScheduling implements Runnable, ApplicationContextAware {
         put("江阴大桥", "江阴海事局");
         put("苏通大桥", "常熟海事局");
     }};
+    public final static Map<String, String> heiyanDeviceMap = new HashMap<String, String>() {{
+        put("南京三桥", "65");
+        put("润扬大桥", "66");
+        put("江阴大桥", "67");
+        put("苏通大桥", "68");
+    }};
 
     @Override
     @Scheduled(fixedDelay = 100) //每隔100秒执行
@@ -193,14 +206,12 @@ public class CanalScheduling implements Runnable, ApplicationContextAware {
             case INSERT:
                 // 黑烟船舶数据入库
                 if (StrUtil.equalsIgnoreCase(database, "smoke_api") && StrUtil.equalsIgnoreCase(table, "ship_recognition")) {
-                    if (ObjectUtil.isEmpty(afterDataMap.get("aisMmsi")) || Convert.toStr(afterDataMap.get("aisMmsi")).length() != 9) {
-                        log.info("==1");
+                    if (ObjectUtil.isEmpty(afterDataMap.get("aisMmsi")) /*|| Convert.toStr(afterDataMap.get("aisMmsi")).length() != 9*/) {
                         break;
                     }
                     // 判断数据状态
                     if (ObjectUtil.isNotEmpty(afterDataMap.get("rcgSoot")) && NumberUtil.isGreaterOrEqual(Convert.toBigDecimal(afterDataMap.get("rcgSoot")),
                             Convert.toBigDecimal(blackThresholdVal))) {
-                        log.info("==2");
                         // 查询黑烟图片
                         if ("prod".equals(env)) {
                             String imgUrl = HttpUtil.get(blackImgUrl + Convert.toStr(afterDataMap.get("id")));
@@ -222,14 +233,14 @@ public class CanalScheduling implements Runnable, ApplicationContextAware {
                         }
                         // 超过阈值后直接判定为违规船舶
                         afterDataMap.put("illegalStatus", 3);
-                        afterDataMap.put("uploadFlag", 1);
+                        afterDataMap.put("uploadFlag", 0);
                         // TODO 上报行政检查系统
 
                     } else {
                         afterDataMap.put("uploadFlag", 0);
                         afterDataMap.put("illegalStatus", 1);
                     }
-                    if ("prod".equals(env) && ObjectUtil.isNotEmpty(afterDataMap.get("aisMmsi"))) {
+                    if (ObjectUtil.isNotEmpty(afterDataMap.get("aisMmsi")) && Convert.toStr(afterDataMap.get("aisMmsi")).length() == 9) {
                         aisInfoService.getDynamicShipInfo(Convert.toStr(afterDataMap.get("aisMmsi")));
                     }
                     afterDataMap.put("mmsi", afterDataMap.get("aisMmsi"));
@@ -244,15 +255,19 @@ public class CanalScheduling implements Runnable, ApplicationContextAware {
                     }
                     if (ObjectUtil.isNotEmpty(afterDataMap.get("snapPos"))) {
                         afterDataMap.put("orgName", orgMap.get(Convert.toStr(afterDataMap.get("snapPos"))));
+                        afterDataMap.put("deviceId", heiyanDeviceMap.get(Convert.toStr(afterDataMap.get("snapPos"))));
                     }
                     afterDataMap.put("createTime", afterDataMap.get("snapTimeFmt"));
                     afterDataMap.put("monitorPointName", afterDataMap.get("snapPos"));
+                    // 保存数据
+                    saveIllegalData(afterDataMap, ElasticConstants.HEIYAN_SHIP_RECOGNITION);
                     client.createDocument(ElasticConstants.HEIYAN_SHIP_RECOGNITION, Convert.toStr(afterDataMap.get("id")), afterDataMap);
                 } else if (StrUtil.equalsIgnoreCase(database, "smoke_api") && StrUtil.equalsIgnoreCase(table, "ship_snap_address")) {
                     // 删除设备和类型的统计缓存
                     redisCache.deleteObject(CollUtil.set(false,
                             CacheConstants.DEVICE_STATIC,
-                            CacheConstants.DEVICE_TYPE_STATIC));
+                            CacheConstants.DEVICE_TYPE_STATIC,
+                            CacheConstants.DEVICE_LIST_STATIC));
                 } else if (StrUtil.equalsIgnoreCase(database, "ship") && StrUtil.equalsIgnoreCase(table, "monitor_point")) {
                     // 检测点信息
                     client.createDocument(ElasticConstants.SO2_MONITOR_POINT, Convert.toStr(afterDataMap.get("id")), afterDataMap);
@@ -261,7 +276,8 @@ public class CanalScheduling implements Runnable, ApplicationContextAware {
                     // 设备信息
                     redisCache.deleteObject(CollUtil.set(false,
                             CacheConstants.DEVICE_STATIC,
-                            CacheConstants.DEVICE_TYPE_STATIC));
+                            CacheConstants.DEVICE_TYPE_STATIC,
+                            CacheConstants.DEVICE_LIST_STATIC));
                 } else if (StrUtil.equalsIgnoreCase(database, "ship") && StrUtil.equalsIgnoreCase(table, "alert")) {
                     // 船舶记录
                     if ("prod".equals(env)) {
@@ -292,7 +308,7 @@ public class CanalScheduling implements Runnable, ApplicationContextAware {
 
                         // 嫌疑船舶
                         afterDataMap.put("illegalStatus", 2);
-                        afterDataMap.put("uploadFlag", 1);
+                        afterDataMap.put("uploadFlag", 0);
                         // TODO 上报行政检查系统
 
                     } else {
@@ -303,19 +319,22 @@ public class CanalScheduling implements Runnable, ApplicationContextAware {
                         aisInfoService.getDynamicShipInfo(Convert.toStr(afterDataMap.get("mmsi")));
                     }
                     afterDataMap.put("illegalType", "guangpu");
+                    // 保存数据
+                    saveIllegalData(afterDataMap, ElasticConstants.SO2_ALERT);
                     client.createDocument(ElasticConstants.SO2_ALERT, Convert.toStr(afterDataMap.get("id")), afterDataMap);
                 } else if (StrUtil.equalsIgnoreCase(database, "ais_database") && (StrUtil.equalsIgnoreCase(table, "sem_instrument"))) {
                     // 嗅探系统-站点信息
                     client.createDocument(ElasticConstants.AIS_SEM_INSTRUMENT, Convert.toStr(afterDataMap.get("id")), afterDataMap);
                     redisCache.deleteObject(CollUtil.set(false,
                             CacheConstants.DEVICE_STATIC,
-                            CacheConstants.DEVICE_TYPE_STATIC));
+                            CacheConstants.DEVICE_TYPE_STATIC,
+                            CacheConstants.DEVICE_LIST_STATIC));
                 } else if (StrUtil.equalsIgnoreCase(database, "ais_database") && StrUtil.equalsIgnoreCase(table, "illegal_ship")) {
                     // 嗅探系统-违规船舶
                     if ("prod".equals(env)) {
                         // 查询检测点和船舶信息、船舶进出港记录
-                        if (ObjectUtil.isNotEmpty(afterDataMap.get("mmsi"))) {
-                            AisShipInfo shipInfo = aisInfoService.getShipInfo("", Convert.toStr(afterDataMap.get("mmsi")), "", "");
+                        if (ObjectUtil.isNotEmpty(afterDataMap.get("shipMmsi"))) {
+                            AisShipInfo shipInfo = aisInfoService.getShipInfo("", Convert.toStr(afterDataMap.get("shipMmsi")), "", "");
                             if (shipInfo != null) {
                                 afterDataMap.put("shipName", shipInfo.getShipName());
                                 afterDataMap.put("shipRegionType", shipInfo.getShipRegionType());
@@ -334,18 +353,19 @@ public class CanalScheduling implements Runnable, ApplicationContextAware {
                                 afterDataMap.put("berthName", eepReportRecInfo.getBerthName());
                             }
                         }
+                        afterDataMap.put("deviceId", afterDataMap.get("semId"));
                         // 查询站点信息
                         Map<String, Object> sem = client.getDocById(ElasticConstants.AIS_SEM_INSTRUMENT, Convert.toStr(afterDataMap.get("semId")), "name,category");
                         if (sem != null && ObjectUtil.equal(sem.get("code"), 200)) {
                             Map<String, String> data = Convert.toMap(String.class, String.class, sem.get("data"));
                             afterDataMap.put("semName", data.get("name"));
                             afterDataMap.put("monitorPointName", data.get("category"));
-                            afterDataMap.put("orgName", orgMap.get(data.get("name")));
+                            afterDataMap.put("orgName", orgMap.get(data.get("category")));
                         }
 
                         // 嫌疑船舶
                         afterDataMap.put("illegalStatus", 2);
-                        afterDataMap.put("uploadFlag", 1);
+                        afterDataMap.put("uploadFlag", 0);
                         // TODO 上报行政检查系统
 
                     } else {
@@ -356,6 +376,8 @@ public class CanalScheduling implements Runnable, ApplicationContextAware {
                         aisInfoService.getDynamicShipInfo(Convert.toStr(afterDataMap.get("mmsi")));
                     }
                     afterDataMap.put("illegalType", "xiutan");
+                    // 保存数据
+                    saveIllegalData(afterDataMap, ElasticConstants.AIS_ILLEGAL_SHIP);
                     client.createDocument(ElasticConstants.AIS_ILLEGAL_SHIP, Convert.toStr(afterDataMap.get("id")), afterDataMap);
                 }
                 break;
@@ -363,7 +385,8 @@ public class CanalScheduling implements Runnable, ApplicationContextAware {
                 if (StrUtil.equalsIgnoreCase(database, "smoke_api") && StrUtil.equalsIgnoreCase(table, "ship_snap_address")) {
                     redisCache.deleteObject(CollUtil.set(false,
                             CacheConstants.DEVICE_STATIC,
-                            CacheConstants.DEVICE_TYPE_STATIC));
+                            CacheConstants.DEVICE_TYPE_STATIC,
+                            CacheConstants.DEVICE_LIST_STATIC));
                 } else if (StrUtil.equalsIgnoreCase(database, "ship") && StrUtil.equalsIgnoreCase(table, "monitor_point")) {
                     // 检测点信息
                     client.updateDocument(ElasticConstants.SO2_MONITOR_POINT, Convert.toStr(afterDataMap.get("id")), afterDataMap);
@@ -372,20 +395,23 @@ public class CanalScheduling implements Runnable, ApplicationContextAware {
                     // 设备信息
                     redisCache.deleteObject(CollUtil.set(false,
                             CacheConstants.DEVICE_STATIC,
-                            CacheConstants.DEVICE_TYPE_STATIC));
+                            CacheConstants.DEVICE_TYPE_STATIC,
+                            CacheConstants.DEVICE_LIST_STATIC));
                 } else if (StrUtil.equalsIgnoreCase(database, "ais_database") && (StrUtil.equalsIgnoreCase(table, "sem_instrument"))) {
                     // 嗅探系统-站点信息
                     client.updateDocument(ElasticConstants.AIS_SEM_INSTRUMENT, Convert.toStr(afterDataMap.get("id")), afterDataMap);
                     redisCache.deleteObject(CollUtil.set(false,
                             CacheConstants.DEVICE_STATIC,
-                            CacheConstants.DEVICE_TYPE_STATIC));
+                            CacheConstants.DEVICE_TYPE_STATIC,
+                            CacheConstants.DEVICE_LIST_STATIC));
                 }
                 break;
             case DELETE:
                 if (StrUtil.equalsIgnoreCase(database, "smoke_api") && StrUtil.equalsIgnoreCase(table, "ship_snap_address")) {
                     redisCache.deleteObject(CollUtil.set(false,
                             CacheConstants.DEVICE_STATIC,
-                            CacheConstants.DEVICE_TYPE_STATIC));
+                            CacheConstants.DEVICE_TYPE_STATIC,
+                            CacheConstants.DEVICE_LIST_STATIC));
                 } else if (StrUtil.equalsIgnoreCase(database, "ship") && StrUtil.equalsIgnoreCase(table, "monitor_point")) {
                     // 检测点信息
                     client.deleteDocument(ElasticConstants.SO2_MONITOR_POINT, Convert.toStr(afterDataMap.get("id")));
@@ -394,13 +420,15 @@ public class CanalScheduling implements Runnable, ApplicationContextAware {
                     // 设备信息
                     redisCache.deleteObject(CollUtil.set(false,
                             CacheConstants.DEVICE_STATIC,
-                            CacheConstants.DEVICE_TYPE_STATIC));
+                            CacheConstants.DEVICE_TYPE_STATIC,
+                            CacheConstants.DEVICE_LIST_STATIC));
                 } else if (StrUtil.equalsIgnoreCase(database, "ais_database") && (StrUtil.equalsIgnoreCase(table, "sem_instrument"))) {
                     // 嗅探系统-站点信息
                     client.deleteDocument(ElasticConstants.AIS_SEM_INSTRUMENT, Convert.toStr(afterDataMap.get("id")));
                     redisCache.deleteObject(CollUtil.set(false,
                             CacheConstants.DEVICE_STATIC,
-                            CacheConstants.DEVICE_TYPE_STATIC));
+                            CacheConstants.DEVICE_TYPE_STATIC,
+                            CacheConstants.DEVICE_LIST_STATIC));
                 }
                 break;
             default:
@@ -408,6 +436,22 @@ public class CanalScheduling implements Runnable, ApplicationContextAware {
         }
     }
 
+    private void saveIllegalData(Map<String, Object> afterDataMap, String indexName) {
+        if (Convert.toInt(afterDataMap.get("illegalStatus")) != 1) {
+            IllegalShipData illegalShipData = new IllegalShipData();
+            BeanUtil.fillBeanWithMap(afterDataMap, illegalShipData, CopyOptions.create().setIgnoreProperties("id"));
+            illegalShipData.setId(IdUtils.fastSimpleUUID());
+            illegalShipData.setSystemId(Convert.toStr(afterDataMap.get("id")));
+            illegalShipData.setSystemEsIndex(indexName);
+            try {
+                illegalShipDataService.insertIllegalShipData(illegalShipData);
+            } catch (Exception ignored) {
+                ignored.printStackTrace();
+            }
+
+        }
+    }
+
     /**
      * 或缺数据库字段的大小写
      *

+ 8 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/service/Impl/GasCommonServiceImpl.java

@@ -42,6 +42,12 @@ public class GasCommonServiceImpl implements IGasCommonService {
         put("江阴大桥", "江阴海事局");
         put("苏通大桥", "常熟海事局");
     }};
+    public final static Map<String, String> heiyanDeviceMap = new HashMap<String, String>() {{
+        put("南京三桥", "65");
+        put("润扬大桥", "66");
+        put("江阴大桥", "67");
+        put("苏通大桥", "68");
+    }};
 
     @SneakyThrows
     @Override
@@ -81,6 +87,7 @@ public class GasCommonServiceImpl implements IGasCommonService {
                     stringObjectMap.put("semName", data.get("name"));
                     stringObjectMap.put("monitorPointName", data.get("category"));
                 }
+                stringObjectMap.put("deviceId", stringObjectMap.get("semId"));
                 stringObjectMap.put("orgName", orgMap.get(Convert.toStr(stringObjectMap.get("monitorPointName"))));
                 stringObjectMap.put("so2Percent", stringObjectMap.get("sPercent"));
                 saveOrUpdate(ElasticConstants.AIS_ILLEGAL_SHIP, Convert.toStr(stringObjectMap.get("id")), stringObjectMap);
@@ -102,6 +109,7 @@ public class GasCommonServiceImpl implements IGasCommonService {
                 stringObjectMap.put("createTime", stringObjectMap.get("snapTimeFmt"));
                 stringObjectMap.put("mmsi", stringObjectMap.get("aisMmsi"));
                 stringObjectMap.put("orgName", orgMap.get(Convert.toStr(stringObjectMap.get("snapPos"))));
+                stringObjectMap.put("deviceId", heiyanDeviceMap.get(Convert.toStr(stringObjectMap.get("snapPos"))));
                 saveOrUpdate(ElasticConstants.HEIYAN_SHIP_RECOGNITION, Convert.toStr(stringObjectMap.get("id")), stringObjectMap);
             }
         } else if (StrUtil.equalsIgnoreCase(schema, "ship") && StrUtil.equalsIgnoreCase(table, "alert")) {

+ 2 - 0
ruoyi-common/src/main/java/com/ruoyi/common/constant/CacheConstants.java

@@ -11,5 +11,7 @@ public class CacheConstants {
     public static final String DEVICE_STATIC = "device:static";
     // 设备类型统计
     public static final String DEVICE_TYPE_STATIC = "devicetype:static";
+    // 设备所有数据统计
+    public static final String DEVICE_LIST_STATIC = "devicelist:static";
 
 }

+ 13 - 17
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java

@@ -1,5 +1,8 @@
 package com.ruoyi.framework.config;
 
+import com.ruoyi.framework.security.filter.JwtAuthenticationTokenFilter;
+import com.ruoyi.framework.security.handle.AuthenticationEntryPointImpl;
+import com.ruoyi.framework.security.handle.LogoutSuccessHandlerImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Bean;
 import org.springframework.http.HttpMethod;
@@ -14,24 +17,20 @@ import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
 import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
 import org.springframework.security.web.authentication.logout.LogoutFilter;
 import org.springframework.web.filter.CorsFilter;
-import com.ruoyi.framework.security.filter.JwtAuthenticationTokenFilter;
-import com.ruoyi.framework.security.handle.AuthenticationEntryPointImpl;
-import com.ruoyi.framework.security.handle.LogoutSuccessHandlerImpl;
 
 /**
  * spring security配置
- * 
+ *
  * @author ruoyi
  */
 @EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
-public class SecurityConfig extends WebSecurityConfigurerAdapter
-{
+public class SecurityConfig extends WebSecurityConfigurerAdapter {
     /**
      * 自定义用户认证逻辑
      */
     @Autowired
     private UserDetailsService userDetailsService;
-    
+
     /**
      * 认证失败处理类
      */
@@ -55,7 +54,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
      */
     @Autowired
     private CorsFilter corsFilter;
-    
+
     /**
      * 解决 无法直接注入 AuthenticationManager
      *
@@ -64,8 +63,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
      */
     @Bean
     @Override
-    public AuthenticationManager authenticationManagerBean() throws Exception
-    {
+    public AuthenticationManager authenticationManagerBean() throws Exception {
         return super.authenticationManagerBean();
     }
 
@@ -85,8 +83,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
      * authenticated       |   用户登录后可访问
      */
     @Override
-    protected void configure(HttpSecurity httpSecurity) throws Exception
-    {
+    protected void configure(HttpSecurity httpSecurity) throws Exception {
         httpSecurity
                 // CSRF禁用,因为不使用session
                 .csrf().disable()
@@ -114,6 +111,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
                 .antMatchers("/webjars/**").anonymous()
                 .antMatchers("/*/api-docs").anonymous()
                 .antMatchers("/druid/**").anonymous()
+                .antMatchers("/gas/common/sendSms").anonymous()
                 // 除上面外的所有请求全部需要鉴权认证
                 .anyRequest().authenticated()
                 .and()
@@ -126,13 +124,12 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
         httpSecurity.addFilterBefore(corsFilter, LogoutFilter.class);
     }
 
-    
+
     /**
      * 强散列哈希加密实现
      */
     @Bean
-    public BCryptPasswordEncoder bCryptPasswordEncoder()
-    {
+    public BCryptPasswordEncoder bCryptPasswordEncoder() {
         return new BCryptPasswordEncoder();
     }
 
@@ -140,8 +137,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
      * 身份认证接口
      */
     @Override
-    protected void configure(AuthenticationManagerBuilder auth) throws Exception
-    {
+    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
         auth.userDetailsService(userDetailsService).passwordEncoder(bCryptPasswordEncoder());
     }
 }

+ 153 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/IllegalShipData.java

@@ -0,0 +1,153 @@
+package com.ruoyi.system.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 嫌疑违法船舶对象 illegal_ship_data
+ *
+ * @author xintong
+ * @date 2021-11-05
+ */
+@Data
+public class IllegalShipData extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * ID
+     */
+    private String id;
+
+    private String systemId;
+    
+    private String systemEsIndex;
+
+    /**
+     * 数据类型
+     */
+    @Excel(name = "数据类型")
+    private String illegalType;
+
+    /**
+     * mmsi
+     */
+    @Excel(name = "mmsi")
+    private String mmsi;
+
+    /**
+     * 船名
+     */
+    @Excel(name = "船名")
+    private String shipName;
+
+    /**
+     * 目的港
+     */
+    @Excel(name = "目的港")
+    private String destination;
+
+    /**
+     * 锚泊计划
+     */
+    @Excel(name = "锚泊计划")
+    private String berthName;
+
+    /**
+     * 船类型,0-内河船;1-海船
+     */
+    @Excel(name = "船类型,0-内河船;1-海船")
+    private String shipRegionType;
+
+    /**
+     * 管辖机构
+     */
+    @Excel(name = "管辖机构")
+    private String orgName;
+
+    /**
+     * 处置结果
+     */
+    @Excel(name = "处置结果")
+    private String dealResult;
+
+    /**
+     * 快检结果
+     */
+    @Excel(name = "快检结果")
+    private String fastResult;
+
+    /**
+     * 送检结果
+     */
+    @Excel(name = "送检结果")
+    private String uploadResult;
+
+    /**
+     * 监测点
+     */
+    @Excel(name = "监测点")
+    private String monitorPointName;
+
+    /**
+     * 硫含量
+     */
+    @Excel(name = "硫含量")
+    private BigDecimal so2Percent;
+
+    /**
+     * 二氧化氮浓度
+     */
+    @Excel(name = "二氧化氮浓度")
+    private BigDecimal no2Concentration;
+
+    /**
+     * 二氧化硫浓度
+     */
+    @Excel(name = "二氧化硫浓度")
+    private BigDecimal so2Concentration;
+
+    /**
+     * 二氧化碳浓度
+     */
+    @Excel(name = "二氧化碳浓度")
+    private BigDecimal co2Concentration;
+
+    /**
+     * 黑度
+     */
+    @Excel(name = "黑度")
+    private Long rcgSoot;
+
+    /**
+     * 黑烟照片
+     */
+    @Excel(name = "黑烟照片")
+    private String sootImgUrl;
+
+    /**
+     * 黑烟其他照片
+     */
+    @Excel(name = "黑烟其他照片")
+    private String allImgUrl;
+
+    /**
+     * 违法状态
+     */
+    @Excel(name = "违法状态")
+    private Long illegalStatus;
+
+    /**
+     * 上报标记
+     */
+    @Excel(name = "上报标记")
+    private Long uploadFlag;
+
+    /**
+     * $column.columnComment
+     */
+    private String delFlag;
+
+}

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/AisDatabaseMapper.java

@@ -18,4 +18,6 @@ public interface AisDatabaseMapper {
     int queryDeviceCount();
 
     List<DeviceBo> queryDeviceList(@Param("monitor") String monitor);
+
+    Map<String, Object> queryById(@Param("id") String id);
 }

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/HeiYanMapper.java

@@ -18,4 +18,6 @@ public interface HeiYanMapper {
     int queryDeviceCount();
 
     List<DeviceBo> queryDeviceList(@Param("monitor") String monitor);
+
+    Map<String, Object> queryById(@Param("id") String id);
 }

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/IllegalShipDataMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.mapper;
+
+import java.util.List;
+import com.ruoyi.system.domain.IllegalShipData;
+
+/**
+ * 嫌疑违法船舶Mapper接口
+ * 
+ * @author xintong
+ * @date 2021-11-05
+ */
+public interface IllegalShipDataMapper 
+{
+    /**
+     * 查询嫌疑违法船舶
+     * 
+     * @param id 嫌疑违法船舶ID
+     * @return 嫌疑违法船舶
+     */
+    public IllegalShipData selectIllegalShipDataById(Long id);
+
+    /**
+     * 查询嫌疑违法船舶列表
+     * 
+     * @param illegalShipData 嫌疑违法船舶
+     * @return 嫌疑违法船舶集合
+     */
+    public List<IllegalShipData> selectIllegalShipDataList(IllegalShipData illegalShipData);
+
+    /**
+     * 新增嫌疑违法船舶
+     * 
+     * @param illegalShipData 嫌疑违法船舶
+     * @return 结果
+     */
+    public int insertIllegalShipData(IllegalShipData illegalShipData);
+
+    /**
+     * 修改嫌疑违法船舶
+     * 
+     * @param illegalShipData 嫌疑违法船舶
+     * @return 结果
+     */
+    public int updateIllegalShipData(IllegalShipData illegalShipData);
+
+    /**
+     * 删除嫌疑违法船舶
+     * 
+     * @param id 嫌疑违法船舶ID
+     * @return 结果
+     */
+    public int deleteIllegalShipDataById(Long id);
+
+    /**
+     * 批量删除嫌疑违法船舶
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteIllegalShipDataByIds(Long[] ids);
+}

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/So2Mapper.java

@@ -18,4 +18,6 @@ public interface So2Mapper {
     int queryDeviceCount();
 
     List<DeviceBo> queryDeviceList(@Param("monitor") String monitor);
+
+    Map<String, Object> queryById(@Param("id") String id);
 }

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IAisDatabase.java

@@ -17,4 +17,6 @@ public interface IAisDatabase {
     int queryDeviceCount();
 
     List<DeviceBo> queryDeviceList(String monitor);
+
+    Map<String, Object> queryById(String id);
 }

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IHeiYanService.java

@@ -17,4 +17,6 @@ public interface IHeiYanService {
     int queryDeviceCount();
 
     List<DeviceBo> queryDeviceList(String monitor);
+
+    Map<String, Object> queryById(String id);
 }

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IIllegalShipDataService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.service;
+
+import java.util.List;
+import com.ruoyi.system.domain.IllegalShipData;
+
+/**
+ * 嫌疑违法船舶Service接口
+ * 
+ * @author xintong
+ * @date 2021-11-05
+ */
+public interface IIllegalShipDataService 
+{
+    /**
+     * 查询嫌疑违法船舶
+     * 
+     * @param id 嫌疑违法船舶ID
+     * @return 嫌疑违法船舶
+     */
+    public IllegalShipData selectIllegalShipDataById(Long id);
+
+    /**
+     * 查询嫌疑违法船舶列表
+     * 
+     * @param illegalShipData 嫌疑违法船舶
+     * @return 嫌疑违法船舶集合
+     */
+    public List<IllegalShipData> selectIllegalShipDataList(IllegalShipData illegalShipData);
+
+    /**
+     * 新增嫌疑违法船舶
+     * 
+     * @param illegalShipData 嫌疑违法船舶
+     * @return 结果
+     */
+    public int insertIllegalShipData(IllegalShipData illegalShipData);
+
+    /**
+     * 修改嫌疑违法船舶
+     * 
+     * @param illegalShipData 嫌疑违法船舶
+     * @return 结果
+     */
+    public int updateIllegalShipData(IllegalShipData illegalShipData);
+
+    /**
+     * 批量删除嫌疑违法船舶
+     * 
+     * @param ids 需要删除的嫌疑违法船舶ID
+     * @return 结果
+     */
+    public int deleteIllegalShipDataByIds(Long[] ids);
+
+    /**
+     * 删除嫌疑违法船舶信息
+     * 
+     * @param id 嫌疑违法船舶ID
+     * @return 结果
+     */
+    public int deleteIllegalShipDataById(Long id);
+}

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/ISo2Service.java

@@ -17,4 +17,6 @@ public interface ISo2Service {
     int queryDeviceCount();
 
     List<DeviceBo> queryDeviceList(String monitor);
+
+    Map<String, Object> queryById(String id);
 }

+ 5 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AisDatabaseImpl.java

@@ -38,4 +38,9 @@ public class AisDatabaseImpl implements IAisDatabase {
     public List<DeviceBo> queryDeviceList(String monitor) {
         return aisDatabaseMapper.queryDeviceList(monitor);
     }
+
+    @Override
+    public Map<String, Object> queryById(String id) {
+        return aisDatabaseMapper.queryById(id);
+    }
 }

+ 10 - 7
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AisInfoServiceImpl.java

@@ -54,8 +54,9 @@ public class AisInfoServiceImpl implements IAisInfoService {
 //            params.put("shipId", shipId);
 //            params.put("shipNameCn", shipNameCn);
             try {
-                String getResult = HttpUtil.get(shipEepReportRecInfoUrl + "?" + HttpUtil.toParams(params));
-                log.info("获取进出港数据:{}", getResult);
+                String para = HttpUtil.toParams(params);
+                String getResult = HttpUtil.get(shipEepReportRecInfoUrl + "?" + para);
+                log.info("入参:{},获取进出港数据:{}", para, getResult);
                 JSONObject jsonObject = JSON.parseObject(getResult);
                 if (jsonObject != null && 200 == jsonObject.getInteger("code")) {
                     JSONArray result = jsonObject.getJSONArray("result");
@@ -107,11 +108,13 @@ public class AisInfoServiceImpl implements IAisInfoService {
      */
     @Override
     public void getDynamicShipInfo(String mmsis) {
-        try {
-            String s = HttpUtil.get(shipDynamicInfo + mmsis);
-            log.info("推送船舶动态信息,返回结果:{}", s);
-        } catch (Exception e) {
-            log.error("推送船舶动态信息异常");
+        if ("prod".equals(profile)) {
+            try {
+                String s = HttpUtil.get(shipDynamicInfo + mmsis);
+                log.info("推送船舶动态信息,返回结果:{}", s);
+            } catch (Exception e) {
+                log.error("推送船舶动态信息异常");
+            }
         }
     }
 }

+ 5 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/HeiYanServiceImpl.java

@@ -38,4 +38,9 @@ public class HeiYanServiceImpl implements IHeiYanService {
     public List<DeviceBo> queryDeviceList(String monitor) {
         return heiYanMapper.queryDeviceList(monitor);
     }
+
+    @Override
+    public Map<String, Object> queryById(String id) {
+        return heiYanMapper.queryById(id);
+    }
 }

+ 89 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IllegalShipDataServiceImpl.java

@@ -0,0 +1,89 @@
+package com.ruoyi.system.service.impl;
+
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.system.domain.IllegalShipData;
+import com.ruoyi.system.mapper.IllegalShipDataMapper;
+import com.ruoyi.system.service.IIllegalShipDataService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 嫌疑违法船舶Service业务层处理
+ *
+ * @author xintong
+ * @date 2021-11-05
+ */
+@Service
+public class IllegalShipDataServiceImpl implements IIllegalShipDataService {
+    @Autowired
+    private IllegalShipDataMapper illegalShipDataMapper;
+
+    /**
+     * 查询嫌疑违法船舶
+     *
+     * @param id 嫌疑违法船舶ID
+     * @return 嫌疑违法船舶
+     */
+    @Override
+    public IllegalShipData selectIllegalShipDataById(Long id) {
+        return illegalShipDataMapper.selectIllegalShipDataById(id);
+    }
+
+    /**
+     * 查询嫌疑违法船舶列表
+     *
+     * @param illegalShipData 嫌疑违法船舶
+     * @return 嫌疑违法船舶
+     */
+    @Override
+    public List<IllegalShipData> selectIllegalShipDataList(IllegalShipData illegalShipData) {
+        return illegalShipDataMapper.selectIllegalShipDataList(illegalShipData);
+    }
+
+    /**
+     * 新增嫌疑违法船舶
+     *
+     * @param illegalShipData 嫌疑违法船舶
+     * @return 结果
+     */
+    @Override
+    public int insertIllegalShipData(IllegalShipData illegalShipData) {
+        return illegalShipDataMapper.insertIllegalShipData(illegalShipData);
+    }
+
+    /**
+     * 修改嫌疑违法船舶
+     *
+     * @param illegalShipData 嫌疑违法船舶
+     * @return 结果
+     */
+    @Override
+    public int updateIllegalShipData(IllegalShipData illegalShipData) {
+        illegalShipData.setUpdateTime(DateUtils.getNowDate());
+        return illegalShipDataMapper.updateIllegalShipData(illegalShipData);
+    }
+
+    /**
+     * 批量删除嫌疑违法船舶
+     *
+     * @param ids 需要删除的嫌疑违法船舶ID
+     * @return 结果
+     */
+    @Override
+    public int deleteIllegalShipDataByIds(Long[] ids) {
+        return illegalShipDataMapper.deleteIllegalShipDataByIds(ids);
+    }
+
+    /**
+     * 删除嫌疑违法船舶信息
+     *
+     * @param id 嫌疑违法船舶ID
+     * @return 结果
+     */
+    @Override
+    public int deleteIllegalShipDataById(Long id) {
+        return illegalShipDataMapper.deleteIllegalShipDataById(id);
+    }
+}

+ 5 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/So2ServiceImpl.java

@@ -38,4 +38,9 @@ public class So2ServiceImpl implements ISo2Service {
     public List<DeviceBo> queryDeviceList(String monitor) {
         return so2Mapper.queryDeviceList(monitor);
     }
+
+    @Override
+    public Map<String, Object> queryById(String id) {
+        return so2Mapper.queryById(id);
+    }
 }

+ 23 - 1
ruoyi-system/src/main/resources/mapper/system/AisDatabaseMapper.xml

@@ -27,8 +27,30 @@
                    end                             status,
                'ais'                            as deviceType,
                now()                            as updateTime,
-               'ais'                            as source
+               'ais_illegal_ship'               as source
         from sem_instrument
         where Category is not null
     </select>
+
+    <select id="queryById" resultType="java.util.Map">
+        select id,
+               sem_id                                          semId,
+               s_percent                                       sPercent,
+               s_percent                                       so2Percent,
+               n_percent                                       nPercent,
+               date_format(peak_time, '%Y-%m-%d %H:%i:%s')  as peakTime,
+               date_format(peak_time, '%Y-%m-%d %H:%i:%s')  as createTime,
+               date_format(start_time, '%Y-%m-%d %H:%i:%s') as startTime,
+               date_format(end_time, '%Y-%m-%d %H:%i:%s')   as endTime,
+               ship_mmsi                                       shipMmsi,
+               ship_mmsi                                       mmsi,
+               ship_name                                       shipName,
+               error,
+               distance,
+               wind_speed                                      windSpeed,
+               wind_angle                                      windAngle,
+               confirmed
+        from illegal_ship
+        where id = #{id}
+    </select>
 </mapper>

+ 1 - 0
ruoyi-system/src/main/resources/mapper/system/GasCommonMapper.xml

@@ -114,6 +114,7 @@
         monitor_point_id monitorPointId,
         t2.name monitorPointName,
         t1.mmsi,
+        t1.device_id as deviceId,
         t3.name shipName,
         t3.destination,
         t1.no2_concentration no2Concentration,

+ 57 - 1
ruoyi-system/src/main/resources/mapper/system/HeiYanMapper.xml

@@ -22,7 +22,63 @@
                type                             as                                deviceType,
                case status when 'ENABLED' then '在线' when 'DISABLED' then '离线' end status,
                orgName,
-               'heiyan'                         as                                source
+               'heiyan_ship_recognition'        as                                source
         from ship_snap_address
     </select>
+
+    <select id="queryById" resultType="java.util.Map">
+        select id,
+               createBy,
+               date_format(createTime, '%Y-%m-%d %H:%i:%s') as createTime,
+               updateBy,
+               date_format(updateTime, '%Y-%m-%d %H:%i:%s') as updateTime,
+               aisDist,
+               aisDrt,
+               aisDst,
+               aisMmsi,
+               aisMmsi                                      as mmsi,
+               aisShipLen,
+               aisShipName,
+               aisShipSpd,
+               aisShipType,
+               aisShipWidth,
+               isAbnormalSize,
+               latitude,
+               rcgSoot,
+               lockSeq,
+               longitude,
+               rcgCargoType,
+               rcgDeadweightTon,
+               rcgDist,
+               rcgDrt,
+               rcgIsFleet,
+               rcgLoadSts,
+               rcgShipHeightAboveWater,
+               rcgShipLen,
+               rcgShipName,
+               rcgShipSpd,
+               rcgShipType,
+               rcgShipWidth,
+               regportName,
+               remark,
+               snapImPath,
+               snapPos,
+               snapPos                                      as monitorPointName,
+               snapTime,
+               snapTimeFmt,
+               snapTimeFmt                                  as createTime,
+               status,
+               textFeatureLabel,
+               textImgUrl,
+               rcgShipTypeDetail,
+               useWarn,
+               warnLabelList,
+               qrcode,
+               shipNameDirection,
+               shipNameValid,
+               sootFeatureLabel,
+               sootImgUrl
+        from ship_recognition
+        where id = #{id}
+    </select>
 </mapper>

+ 206 - 0
ruoyi-system/src/main/resources/mapper/system/IllegalShipDataMapper.xml

@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.system.mapper.IllegalShipDataMapper">
+
+    <resultMap type="IllegalShipData" id="IllegalShipDataResult">
+        <result property="id" column="id"/>
+        <result property="systemId" column="system_id"/>
+        <result property="systemEsIndex" column="system_es_index"/>
+        <result property="illegalType" column="illegal_type"/>
+        <result property="mmsi" column="mmsi"/>
+        <result property="shipName" column="ship_name"/>
+        <result property="destination" column="destination"/>
+        <result property="berthName" column="berth_name"/>
+        <result property="shipRegionType" column="ship_region_type"/>
+        <result property="orgName" column="org_name"/>
+        <result property="dealResult" column="deal_result"/>
+        <result property="fastResult" column="fast_result"/>
+        <result property="uploadResult" column="upload_result"/>
+        <result property="monitorPointName" column="monitor_point_name"/>
+        <result property="so2Percent" column="so2_percent"/>
+        <result property="no2Concentration" column="no2_concentration"/>
+        <result property="so2Concentration" column="so2_concentration"/>
+        <result property="co2Concentration" column="co2_concentration"/>
+        <result property="rcgSoot" column="rcg_soot"/>
+        <result property="sootImgUrl" column="soot_img_url"/>
+        <result property="allImgUrl" column="all_img_url"/>
+        <result property="illegalStatus" column="illegal_status"/>
+        <result property="uploadFlag" column="upload_flag"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="delFlag" column="del_flag"/>
+    </resultMap>
+
+    <sql id="selectIllegalShipDataVo">
+        select id,
+               system_id,
+               system_es_index
+                   illegal_type,
+               mmsi,
+               ship_name,
+               destination,
+               berth_name,
+               ship_region_type,
+               org_name,
+               deal_result,
+               fast_result,
+               upload_result,
+               monitor_point_name,
+               so2_percent,
+               no2_concentration,
+               so2_concentration,
+               co2_concentration,
+               rcg_soot,
+               soot_img_url,
+               all_img_url,
+               illegal_status,
+               upload_flag,
+               create_by,
+               create_time,
+               update_by,
+               update_time,
+               del_flag
+        from illegal_ship_data
+    </sql>
+
+    <select id="selectIllegalShipDataList" parameterType="IllegalShipData" resultMap="IllegalShipDataResult">
+        <include refid="selectIllegalShipDataVo"/>
+        <where>
+            <if test="systemId != null and systemId != ''">and system_id = #{systemId}</if>
+            <if test="systemEsIndex != null and systemEsIndex != ''">and system_es_index = #{systemEsIndex}</if>
+            <if test="illegalType != null  and illegalType != ''">and illegal_type = #{illegalType}</if>
+            <if test="mmsi != null  and mmsi != ''">and mmsi = #{mmsi}</if>
+            <if test="shipName != null  and shipName != ''">and ship_name like concat('%', #{shipName}, '%')</if>
+            <if test="destination != null  and destination != ''">and destination = #{destination}</if>
+            <if test="berthName != null  and berthName != ''">and berth_name like concat('%', #{berthName}, '%')</if>
+            <if test="shipRegionType != null  and shipRegionType != ''">and ship_region_type = #{shipRegionType}</if>
+            <if test="orgName != null  and orgName != ''">and org_name like concat('%', #{orgName}, '%')</if>
+            <if test="dealResult != null  and dealResult != ''">and deal_result = #{dealResult}</if>
+            <if test="fastResult != null  and fastResult != ''">and fast_result = #{fastResult}</if>
+            <if test="uploadResult != null  and uploadResult != ''">and upload_result = #{uploadResult}</if>
+            <if test="monitorPointName != null  and monitorPointName != ''">and monitor_point_name like concat('%', #{monitorPointName}, '%')</if>
+            <if test="so2Percent != null ">and so2_percent = #{so2Percent}</if>
+            <if test="rcgSoot != null ">and rcg_soot = #{rcgSoot}</if>
+            <if test="illegalStatus != null ">and illegal_status = #{illegalStatus}</if>
+            <if test="uploadFlag != null ">and upload_flag = #{uploadFlag}</if>
+        </where>
+    </select>
+
+    <select id="selectIllegalShipDataById" parameterType="Long" resultMap="IllegalShipDataResult">
+        <include refid="selectIllegalShipDataVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertIllegalShipData" parameterType="IllegalShipData">
+        insert into illegal_ship_data
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="systemId != null">system_id,</if>
+            <if test="systemEsIndex != null">system_es_index,</if>
+            <if test="illegalType != null">illegal_type,</if>
+            <if test="mmsi != null">mmsi,</if>
+            <if test="shipName != null">ship_name,</if>
+            <if test="destination != null">destination,</if>
+            <if test="berthName != null">berth_name,</if>
+            <if test="shipRegionType != null">ship_region_type,</if>
+            <if test="orgName != null">org_name,</if>
+            <if test="dealResult != null">deal_result,</if>
+            <if test="fastResult != null">fast_result,</if>
+            <if test="uploadResult != null">upload_result,</if>
+            <if test="monitorPointName != null">monitor_point_name,</if>
+            <if test="so2Percent != null">so2_percent,</if>
+            <if test="no2Concentration != null">no2_concentration,</if>
+            <if test="so2Concentration != null">so2_concentration,</if>
+            <if test="co2Concentration != null">co2_concentration,</if>
+            <if test="rcgSoot != null">rcg_soot,</if>
+            <if test="sootImgUrl != null">soot_img_url,</if>
+            <if test="allImgUrl != null">all_img_url,</if>
+            <if test="illegalStatus != null">illegal_status,</if>
+            <if test="uploadFlag != null">upload_flag,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="delFlag != null">del_flag,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="systemId != null">#{systemId},</if>
+            <if test="systemEsIndex != null">#{systemEsIndex},</if>
+            <if test="illegalType != null">#{illegalType},</if>
+            <if test="mmsi != null">#{mmsi},</if>
+            <if test="shipName != null">#{shipName},</if>
+            <if test="destination != null">#{destination},</if>
+            <if test="berthName != null">#{berthName},</if>
+            <if test="shipRegionType != null">#{shipRegionType},</if>
+            <if test="orgName != null">#{orgName},</if>
+            <if test="dealResult != null">#{dealResult},</if>
+            <if test="fastResult != null">#{fastResult},</if>
+            <if test="uploadResult != null">#{uploadResult},</if>
+            <if test="monitorPointName != null">#{monitorPointName},</if>
+            <if test="so2Percent != null">#{so2Percent},</if>
+            <if test="no2Concentration != null">#{no2Concentration},</if>
+            <if test="so2Concentration != null">#{so2Concentration},</if>
+            <if test="co2Concentration != null">#{co2Concentration},</if>
+            <if test="rcgSoot != null">#{rcgSoot},</if>
+            <if test="sootImgUrl != null">#{sootImgUrl},</if>
+            <if test="allImgUrl != null">#{allImgUrl},</if>
+            <if test="illegalStatus != null">#{illegalStatus},</if>
+            <if test="uploadFlag != null">#{uploadFlag},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+        </trim>
+    </insert>
+
+    <update id="updateIllegalShipData" parameterType="IllegalShipData">
+        update illegal_ship_data
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="illegalType != null">illegal_type = #{illegalType},</if>
+            <if test="mmsi != null">mmsi = #{mmsi},</if>
+            <if test="shipName != null">ship_name = #{shipName},</if>
+            <if test="destination != null">destination = #{destination},</if>
+            <if test="berthName != null">berth_name = #{berthName},</if>
+            <if test="shipRegionType != null">ship_region_type = #{shipRegionType},</if>
+            <if test="orgName != null">org_name = #{orgName},</if>
+            <if test="dealResult != null">deal_result = #{dealResult},</if>
+            <if test="fastResult != null">fast_result = #{fastResult},</if>
+            <if test="uploadResult != null">upload_result = #{uploadResult},</if>
+            <if test="monitorPointName != null">monitor_point_name = #{monitorPointName},</if>
+            <if test="so2Percent != null">so2_percent = #{so2Percent},</if>
+            <if test="no2Concentration != null">no2_concentration = #{no2Concentration},</if>
+            <if test="so2Concentration != null">so2_concentration = #{so2Concentration},</if>
+            <if test="co2Concentration != null">co2_concentration = #{co2Concentration},</if>
+            <if test="rcgSoot != null">rcg_soot = #{rcgSoot},</if>
+            <if test="sootImgUrl != null">soot_img_url = #{sootImgUrl},</if>
+            <if test="allImgUrl != null">all_img_url = #{allImgUrl},</if>
+            <if test="illegalStatus != null">illegal_status = #{illegalStatus},</if>
+            <if test="uploadFlag != null">upload_flag = #{uploadFlag},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteIllegalShipDataById" parameterType="Long">
+        delete
+        from illegal_ship_data
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteIllegalShipDataByIds" parameterType="String">
+        delete from illegal_ship_data where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 14 - 1
ruoyi-system/src/main/resources/mapper/system/So2Mapper.xml

@@ -31,9 +31,22 @@
                    end                                 status,
                CONCAT(d.longitude, ',', d.latitude) as latilongti,
                update_time                          as updateTime,
-               'so2'                                as source
+               'so2_alert'                          as source
         from device d
                  left join monitor_point t1
                            on t1.id = d.monitor_point_id
     </select>
+
+    <select id="queryById" resultType="java.util.Map">
+        select id,
+               monitor_point_id                              monitorPointId,
+               mmsi,
+               no2_concentration                             no2Concentration,
+               so2_concentration                             so2Concentration,
+               co2_concentration                             co2Concentration,
+               so2_percent                                   so2Percent,
+               date_format(create_time, '%Y-%m-%d %H:%i:%s') createTime
+        from alert
+        where id = #{id}
+    </select>
 </mapper>

+ 2 - 2
ruoyi-ui/src/views/components/table/homeTable.vue

@@ -131,8 +131,8 @@ export default {
       shipShow: true,
       activeName: 'first',
       normalPer: 0.1,
-      so2Count: 1,
-      blackCount: 1,
+      so2Count: 0,
+      blackCount: 0,
       dialogVisible: false,
       dialogVisibleAzwz: false,
       dialogVisibleType: false,

+ 1 - 1
ruoyi-ui/src/views/components/table/liuTable.vue

@@ -400,7 +400,7 @@ export default {
     },
     // 内河船、海船转化
     shipTypeFormat(row, column) {
-      return row.shipRegionType == 0 ? "内河船" : "海船"
+      return row.shipRegionType == 0 ? "内河船" : row.shipRegionType == 1 ? "海船" : ""
     },
     tabChange() {
       console.log(this.tableShow);

+ 85 - 88
ruoyi-ui/src/views/components/table/scroll.vue

@@ -1,107 +1,104 @@
 <template>
-<div id="box">
-<div id="con1" ref="con1" :class="{anim:animate==true}" style="color:white" @mouseenter="mEnter" @mouseleave="mLeave">
-<div v-for='item in items' style="font-size:3rem">
-      <span>{{item.name}}</span>
-       <span style="margin-left:3rem;color:#A8A8A8">统计时间:{{item.time}}</span>
-</div>
-</div>
-</div>
+  <div id="box">
+    <div id="con1" ref="con1" :class="{anim:animate==true}" style="color:white" @mouseenter="mEnter" @mouseleave="mLeave">
+      <div v-for='item in items' style="font-size:3rem">
+        <span>{{ item.name }}</span>
+        <span style="margin-left:3rem;color:#A8A8A8">统计时间:{{ item.time }}</span>
+      </div>
+    </div>
+  </div>
 </template>
 
 <script>
 import {queryIllegalInfoList} from "@/api/data/staticalData";
 
 export default {
-        data () {
-            return {
-                animate:false,
-                items:[ //消息列表对应的数组
-                    {name:"1.xx船在xx监测点检测燃油含硫量为xx",time:'2021年7月1日'},
-                    {name:"2.xx船在xx监测点检测燃油含硫量为xx",time:'2021年7月1日'},
-                    {name:"3.xx船在xx监测点检测燃油含硫量为xx",time:'2021年7月1日'},
-                    {name:"4.xx船在xx监测点检测燃油含硫量为xx",time:'2021年7月1日'},
-                    {name:"5.xx船在xx监测点检测燃油含硫量为xx",time:'2021年7月1日'},
-                    {name:"6.xx船在xx监测点检测燃油含硫量为xx",time:'2021年7月1日'},
-                    {name:"7.xx船在xx监测点检测燃油含硫量为xx",time:'2021年7月1日'},
-                ],
-            }
-        },
-        props:['illegalStatus'],
-        mounted () {
-               this.queryIllegalInfoList();
-                this.timer1= setInterval(this.scroll,3000)
+  data() {
+    return {
+      animate: false,
+      items: [ //消息列表对应的数组
+        // {name: "1.xx船在xx监测点检测燃油含硫量为xx", time: '2021年7月1日'},
+      ],
+    }
+  },
+  props: ['illegalStatus'],
+  mounted() {
+    this.queryIllegalInfoList();
+    this.timer1 = setInterval(this.scroll, 3000)
 
-        },
+  },
 
-        methods: {
-              queryIllegalInfoList(){
-                    queryIllegalInfoList({'illegalStatus':this.illegalStatus}).then(data =>{
-                        this.items = data.data
-                        for(var index in this.items){
-                            if(this.items[index].illegalType == null){
-                                  var obj =this.items[index]
-                                  obj.name = (parseInt(index)+1)+'.'+obj.aisShipName+"在"+obj.snapPos+"监测点检测黑度为"+obj.rcgSoot
-                                  obj.time=this.timeFormate(obj.snapTimeFmt)
-                            }
-                             if(this.items[index].illegalType != null){
-                                  var obj =this.items[index]
-                                  obj.name = (parseInt(index)+1)+'.'+obj.shipName+"在"+obj.monitorPointName+"监测点检测黑度为"+obj.spercent
-                                  obj.time=this.timeFormate(obj.createTime)
-                            }
-                        }
-                    })
-                },
-            timeFormate(date){
-                // var date = "2018-10-08 15:22:45";
-                var newDate = new Date(date).toLocaleDateString()
-                return newDate.split('/')[0]+"年"+newDate.split('/')[1]+'月'+newDate.split('/')[2]+'日';
-            },
-            scroll(){
-                    let con1 = this.$refs.con1;
-                //     console.log(con1);
-                    // con1.style.marginTop='-29rem';
-                    this.animate=!this.animate;
-                    var that = this; // 在异步函数中会出现this的偏移问题,此处一定要先保存好this的指向
-                    setTimeout(function(){
-                    that.items.push(that.items[0]);
-                    that.items.shift();
-                    // con1.style.marginTop='0px';
-                    that.animate=!that.animate; // 这个地方如果不把animate 取反会出现消息回滚的现象,此时把ul 元素的过渡属性取消掉就可以完美实现无缝滚动的效果了
-                    },500)
-            },
-            mEnter () {
-                    clearInterval(this.timer1)
-            },
-            mLeave () {
-                    this.timer1= setInterval(this.scroll,3000)
-            },
+  methods: {
+    queryIllegalInfoList() {
+      queryIllegalInfoList({'illegalStatus': this.illegalStatus}).then(data => {
+        this.items = data.data
+        for (var index in this.items) {
+          if (this.items[index].illegalType === 'heiyan') {
+            var obj = this.items[index]
+            obj.name = (parseInt(index) + 1) + '.' + obj.aisShipName + "在" + obj.snapPos + "监测点检测黑度为" + obj.rcgSoot
+            obj.time = this.timeFormate(obj.snapTimeFmt)
+          }
+          if (this.items[index].illegalType !== 'heiyan') {
+            var obj = this.items[index]
+            obj.name = (parseInt(index) + 1) + '.' + obj.shipName + "在" + obj.monitorPointName + "监测点检测硫含量为" + obj.so2Percent
+            obj.time = this.timeFormate(obj.createTime)
+          }
+        }
+      })
+    },
+    timeFormate(date) {
+      // var date = "2018-10-08 15:22:45";
+      var newDate = new Date(date).toLocaleDateString()
+      return newDate.split('/')[0] + "年" + newDate.split('/')[1] + '月' + newDate.split('/')[2] + '日';
+    },
+    scroll() {
+      let con1 = this.$refs.con1;
+      //     console.log(con1);
+      // con1.style.marginTop='-29rem';
+      this.animate = !this.animate;
+      var that = this; // 在异步函数中会出现this的偏移问题,此处一定要先保存好this的指向
+      setTimeout(function () {
+        that.items.push(that.items[0]);
+        that.items.shift();
+        // con1.style.marginTop='0px';
+        that.animate = !that.animate; // 这个地方如果不把animate 取反会出现消息回滚的现象,此时把ul 元素的过渡属性取消掉就可以完美实现无缝滚动的效果了
+      }, 500)
+    },
+    mEnter() {
+      clearInterval(this.timer1)
+    },
+    mLeave() {
+      this.timer1 = setInterval(this.scroll, 3000)
+    },
 
-        },
- }
+  },
+}
 </script>
 
 <!-- Add "scoped" attribute to limit CSS to this component only -->
 <style scoped>
-*{
-margin: 0 ;
-padding: 0;
+* {
+  margin: 0;
+  padding: 0;
 }
-#box{
-width: 100rem;
-height: 50rem;
-line-height: 14rem;
-overflow: hidden;
-padding-left: 15rem;
-font-size: 5rem;
-transition: all 0.5s;
+
+#box {
+  width: 100rem;
+  height: 50rem;
+  line-height: 14rem;
+  overflow: hidden;
+  padding-left: 15rem;
+  font-size: 5rem;
+  transition: all 0.5s;
 }
-.anim{
-transition: all 0.5s;
+
+.anim {
+  transition: all 0.5s;
 }
-#con1 li{
-list-style: none;
-line-height: 10rem;
-height: 10rem;
+
+#con1 li {
+  list-style: none;
+  line-height: 10rem;
+  height: 10rem;
 }
 </style>

+ 1 - 1
ruoyi-ui/src/views/components/table/xtTable.vue

@@ -371,7 +371,7 @@ export default {
     },
     // 内河船、海船转化
     shipTypeFormat(row, column) {
-      return row.shipRegionType == 0 ? "内河船" : "海船"
+      return row.shipRegionType == 0 ? "内河船" : row.shipRegionType == 1 ? "海船" : ""
     }
   }
 }