459242451@qq.com 3 年之前
父节点
当前提交
8f799582ab
共有 22 个文件被更改,包括 935 次插入16 次删除
  1. 201 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/gas/GasCommonController.java
  2. 34 7
      ruoyi-admin/src/main/java/com/ruoyi/web/job/CanalScheduling.java
  3. 153 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/IllegalShipData.java
  4. 2 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/AisDatabaseMapper.java
  5. 2 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/HeiYanMapper.java
  6. 61 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/IllegalShipDataMapper.java
  7. 2 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/So2Mapper.java
  8. 2 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IAisDatabase.java
  9. 2 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IHeiYanService.java
  10. 61 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IIllegalShipDataService.java
  11. 2 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/ISo2Service.java
  12. 5 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AisDatabaseImpl.java
  13. 10 7
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AisInfoServiceImpl.java
  14. 5 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/HeiYanServiceImpl.java
  15. 89 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IllegalShipDataServiceImpl.java
  16. 5 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/So2ServiceImpl.java
  17. 22 0
      ruoyi-system/src/main/resources/mapper/system/AisDatabaseMapper.xml
  18. 56 0
      ruoyi-system/src/main/resources/mapper/system/HeiYanMapper.xml
  19. 206 0
      ruoyi-system/src/main/resources/mapper/system/IllegalShipDataMapper.xml
  20. 13 0
      ruoyi-system/src/main/resources/mapper/system/So2Mapper.xml
  21. 1 1
      ruoyi-ui/src/views/components/table/liuTable.vue
  22. 1 1
      ruoyi-ui/src/views/components/table/xtTable.vue

+ 201 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/gas/GasCommonController.java

@@ -1,27 +1,42 @@
 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.ElasticConstants;
 import com.ruoyi.common.core.domain.AjaxResult;
+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;
@@ -63,6 +78,16 @@ 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;
 
     @PreAuthorize("@ss.hasPermi('system:gas:sync')")
     @PostMapping("/sync")
@@ -318,4 +343,180 @@ public class GasCommonController {
         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());
+                    }
+                }
+                // 查询站点信息
+                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"))));
+            }
+            // 保存数据
+            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();
+            }
+
+        }
+    }
+
 }

+ 34 - 7
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;
@@ -193,14 +200,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 +227,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"));
@@ -247,6 +252,8 @@ public class CanalScheduling implements Runnable, ApplicationContextAware {
                     }
                     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")) {
                     // 删除设备和类型的统计缓存
@@ -292,7 +299,7 @@ public class CanalScheduling implements Runnable, ApplicationContextAware {
 
                         // 嫌疑船舶
                         afterDataMap.put("illegalStatus", 2);
-                        afterDataMap.put("uploadFlag", 1);
+                        afterDataMap.put("uploadFlag", 0);
                         // TODO 上报行政检查系统
 
                     } else {
@@ -303,6 +310,8 @@ 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"))) {
                     // 嗅探系统-站点信息
@@ -345,7 +354,7 @@ public class CanalScheduling implements Runnable, ApplicationContextAware {
 
                         // 嫌疑船舶
                         afterDataMap.put("illegalStatus", 2);
-                        afterDataMap.put("uploadFlag", 1);
+                        afterDataMap.put("uploadFlag", 0);
                         // TODO 上报行政检查系统
 
                     } else {
@@ -356,6 +365,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;
@@ -408,6 +419,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();
+            }
+
+        }
+    }
+
     /**
      * 或缺数据库字段的大小写
      *

+ 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);
+    }
 }

+ 22 - 0
ruoyi-system/src/main/resources/mapper/system/AisDatabaseMapper.xml

@@ -31,4 +31,26 @@
         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>

+ 56 - 0
ruoyi-system/src/main/resources/mapper/system/HeiYanMapper.xml

@@ -25,4 +25,60 @@
                'heiyan'                         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>

+ 13 - 0
ruoyi-system/src/main/resources/mapper/system/So2Mapper.xml

@@ -36,4 +36,17 @@
                  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>

+ 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);

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

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