Browse Source

fix 增加预抵时间

459242451@qq.com 3 years ago
parent
commit
6634f3dd5e

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

@@ -516,6 +516,7 @@ public class GasCommonController {
                 if (eepReportRecInfo != null) {
                     afterDataMap.put("destination", eepReportRecInfo.getNextPortName());
                     afterDataMap.put("berthName", eepReportRecInfo.getBerthName());
+                    afterDataMap.put("expectTime", eepReportRecInfo.getExpectTime());
                 }
                 afterDataMap.put("deviceId", afterDataMap.get("semId"));
                 // 查询站点信息
@@ -560,6 +561,7 @@ public class GasCommonController {
                 if (eepReportRecInfo != null) {
                     afterDataMap.put("destination", eepReportRecInfo.getNextPortName());
                     afterDataMap.put("berthName", eepReportRecInfo.getBerthName());
+                    afterDataMap.put("expectTime", eepReportRecInfo.getExpectTime());
                 }
 
                 // 嫌疑船舶
@@ -618,6 +620,7 @@ public class GasCommonController {
                 if (eepReportRecInfo != null) {
                     afterDataMap.put("destination", eepReportRecInfo.getNextPortName());
                     afterDataMap.put("berthName", eepReportRecInfo.getBerthName());
+                    afterDataMap.put("expectTime", eepReportRecInfo.getExpectTime());
                 }
                 // 超过阈值后直接判定为违规船舶
                 afterDataMap.put("illegalStatus", 3);

+ 3 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/job/CanalScheduling.java

@@ -241,6 +241,7 @@ public class CanalScheduling implements Runnable, ApplicationContextAware {
                         if (eepReportRecInfo != null) {
                             afterDataMap.put("destination", eepReportRecInfo.getNextPortName());
                             afterDataMap.put("berthName", eepReportRecInfo.getBerthName());
+                            afterDataMap.put("expectTime", eepReportRecInfo.getExpectTime());
                         }
                         // 超过阈值后直接判定为违规船舶
                         afterDataMap.put("illegalStatus", 3);
@@ -317,6 +318,7 @@ public class CanalScheduling implements Runnable, ApplicationContextAware {
                         if (eepReportRecInfo != null) {
                             afterDataMap.put("destination", eepReportRecInfo.getNextPortName());
                             afterDataMap.put("berthName", eepReportRecInfo.getBerthName());
+                            afterDataMap.put("expectTime", eepReportRecInfo.getExpectTime());
                         }
                         // 嫌疑船舶
                         afterDataMap.put("illegalStatus", 2);
@@ -370,6 +372,7 @@ public class CanalScheduling implements Runnable, ApplicationContextAware {
                         if (eepReportRecInfo != null) {
                             afterDataMap.put("destination", eepReportRecInfo.getNextPortName());
                             afterDataMap.put("berthName", eepReportRecInfo.getBerthName());
+                            afterDataMap.put("expectTime", eepReportRecInfo.getExpectTime());
                         }
 
                         // 嫌疑船舶

+ 5 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/IllegalShip.java

@@ -54,4 +54,9 @@ public class IllegalShip extends BaseEntity {
 
     private String deviceName;
 
+    /**
+     * 预抵/预离时间
+     */
+    private String expectTime;
+
 }

+ 4 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/ShipEepReportRecInfo.java

@@ -20,4 +20,8 @@ public class ShipEepReportRecInfo {
      * 停靠泊位
      */
     private String berthName;
+    /**
+     * 预计到港时间
+     */
+    private String expectTime;
 }

+ 6 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AisInfoServiceImpl.java

@@ -67,7 +67,12 @@ public class AisInfoServiceImpl implements IAisInfoService {
                     JSONArray result = jsonObject.getJSONArray("result");
                     if (result != null && !result.isEmpty()) {
                         Map<String, String> stringStringMap = Convert.toMap(String.class, String.class, result.get(0));
-                        return ShipEepReportRecInfo.builder().berthName(stringStringMap.get("berth_name")).nextPortName(stringStringMap.get("next_port_name")).build();
+                        String expectTime = stringStringMap.get("expect_time");
+                        return ShipEepReportRecInfo.builder()
+                                .berthName(stringStringMap.get("berth_name"))
+                                .nextPortName(stringStringMap.get("next_port_name"))
+                                .expectTime(StrUtil.isNotBlank(expectTime) && expectTime.length() >= 16 ? expectTime.replace("T", " ").substring(0, 16) : "")
+                                .build();
                     }
                 }
             } catch (Exception e) {

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

@@ -298,6 +298,11 @@
         v-if="tableShow == 1">
       </el-table-column>
       <el-table-column
+        prop="expectTime"
+        label="预抵/预离时间"
+        v-if="tableShow == 1">
+      </el-table-column>
+      <el-table-column
         prop="berthName"
         label="码头泊位"
         v-if="tableShow == 1">