Browse Source

心跳接口修改

gao.qiang 6 months ago
parent
commit
a0b2c981ce

+ 2 - 10
vehicle-sdk/src/main/java/com/ozs/controller/upload/GeoHazardMonitorTokenController.java

@@ -510,7 +510,7 @@ public class GeoHazardMonitorTokenController {
                 return SM4Utils.encryptData_ECB(JSONObject.toJSONString(AjaxResults1), key);
             }
             if (ObjectUtils.isEmpty(heartbeatVo.getLongitude())) {
-                AjaxResults1 = new AjaxResults(0, "当前所在度不能为空");
+                AjaxResults1 = new AjaxResults(0, "当前所在度不能为空");
                 return SM4Utils.encryptData_ECB(JSONObject.toJSONString(AjaxResults1), key);
             }
             LambdaQueryWrapper<BaseRailwayManagement> railway = new LambdaQueryWrapper<BaseRailwayManagement>();
@@ -555,17 +555,9 @@ public class GeoHazardMonitorTokenController {
             vehiclePosition.setCurrenTime(vehiclePosition.getCreateTime());
             //机车行驶表添加数据
             boolean save = vehiclePositionService.save(vehiclePosition);
-            //修改车载终端经度纬度
-            BaseTerminal baseTerminal1 = new BaseTerminal();
-            baseTerminal1.setTerminalLatitude(heartbeatVo.getLatitude());
-            baseTerminal1.setTerminalLongitude(heartbeatVo.getLongitude());
-            baseTerminal1.setStatus(1);
-            LambdaQueryWrapper<BaseTerminal> terminal = new LambdaQueryWrapper<>();
-            terminal.eq(BaseTerminal::getTerminalCode, vehiclePosition.getTerminalCode());
-            boolean update = baseTerminalService.update(baseTerminal1, terminal);
             baseVideoTrains.setTrainsMile(heartbeatVo.getCurrentMile());
             //目视距离和里程位置
-            if (save && update) {
+            if (save) {
                 LambdaQueryWrapper<MsgAlarm> queryWrapper = new LambdaQueryWrapper<>();
                 if (heartbeatVo.getLineDir() == 1) {
                     queryWrapper.ge(MsgAlarm::getAlarmMile, heartbeatVo.getCurrentMile());