Browse Source

报警回放修改

gao.qiang 1 year ago
parent
commit
e1c6b50363

+ 9 - 0
business-service/src/main/java/com/ozs/entity/BaseRouteMassage.java

@@ -1,6 +1,7 @@
 package com.ozs.entity;
 
 import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.ozs.common.annotation.Excel;
 import com.ozs.common.core.domain.BaseEntity;
@@ -46,6 +47,14 @@ public class BaseRouteMassage extends BaseEntity implements Serializable {
      */
     @Excel(name = "里程位置")
     private Integer mileagePosition;
+
+
+    /**
+     * 里程位置字符串
+     */
+    @TableField(exist = false)
+    private String mileagePositionName;
+    
     /**
      * 进路股道
      */

+ 1 - 1
vehicle-sdk/src/main/java/com/ozs/config/ShotExecutors.java

@@ -32,6 +32,6 @@ public class ShotExecutors {
     @Async
     @Scheduled(fixedRate = 3)
     public void handleAlarmPicture() {
-        System.out.println("1");
+//        System.out.println("1");
     }
 }

+ 8 - 1
vehicle-sdk/src/main/java/com/ozs/controller/upload/GeoHazardMonitorTokenController.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.ozs.common.core.domain.entity.SysDictData;
 import com.ozs.common.core.redis.RedisCache;
 import com.ozs.common.utils.ApiTokenUtils;
+import com.ozs.common.utils.AppendUtils;
 import com.ozs.common.utils.ChineseToPingyin;
 import com.ozs.common.utils.HeartbeatUtils;
 import com.ozs.common.utils.HttpClientUtil;
@@ -1397,6 +1398,7 @@ public class GeoHazardMonitorTokenController {
         }
         baseRouteMassage.setCreateTime(new Date());
         baseRouteMassage.setStationName("博野站");
+        baseRouteMassage.setMileagePosition(11111);
         baseRouteMassageService.save(baseRouteMassage);
         return "200";
     }
@@ -1408,7 +1410,12 @@ public class GeoHazardMonitorTokenController {
      */
     @GetMapping("/api/getRouteMassageList")
     public List<BaseRouteMassage> getRouteMassageList() {
-        return baseRouteMassageService.list();
+        List<BaseRouteMassage> list = baseRouteMassageService.list();
+        for (BaseRouteMassage baseRouteMassage : list) {
+            String mils = AppendUtils.stringAppend(baseRouteMassage.getMileagePosition());
+            baseRouteMassage.setMileagePositionName(mils);
+        }
+        return list;
     }
 
     /**