wenhongquan před 1 rokem
rodič
revize
5a4afb1ee0

+ 2 - 0
ruoyi-modules/ruoyi-khy/src/main/java/org/dromara/system/domain/vo/TblCarScheduleVo.java

@@ -54,6 +54,8 @@ public class TblCarScheduleVo implements Serializable {
 
 
     private String stationInfo;
     private String stationInfo;
 
 
+    private Object carlocation;
+
     private String ext1;
     private String ext1;
 
 
     private String ext2;
     private String ext2;

+ 6 - 0
ruoyi-modules/ruoyi-khy/src/main/java/org/dromara/system/service/impl/TblCarScheduleServiceImpl.java

@@ -20,6 +20,8 @@ import org.dromara.system.service.ITblCarScheduleService;
 
 
 import java.util.*;
 import java.util.*;
 
 
+import static jt809.handle.JT809Packet0x1202Handle.convertToPinyin;
+
 /**
 /**
  * 车及人员排班Service业务层处理
  * 车及人员排班Service业务层处理
  *
  *
@@ -58,6 +60,10 @@ public class TblCarScheduleServiceImpl implements ITblCarScheduleService {
         Page<TblCarScheduleVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
         Page<TblCarScheduleVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
 
 
         result.getRecords().forEach(e -> {
         result.getRecords().forEach(e -> {
+            try{
+                e.setCarlocation(RedisUtils.getCacheObject(StringUtils.format("gps_{}", convertToPinyin(e.getCarNum().trim()))));
+            }catch (Exception e1){}
+
             String stations = RedisUtils.getCacheObject(StringUtils.format("car_{}_{}_current_station",e.getCarNum(), DateFormatUtils.format( e.getScheduleDate(),DateUtils.YYYYMMDDHHMMSS)));
             String stations = RedisUtils.getCacheObject(StringUtils.format("car_{}_{}_current_station",e.getCarNum(), DateFormatUtils.format( e.getScheduleDate(),DateUtils.YYYYMMDDHHMMSS)));
             String stationName =  RedisUtils.getCacheObject(StringUtils.format("car_{}_{}_tip",e.getCarNum(),DateFormatUtils.format( e.getScheduleDate(),DateUtils.YYYYMMDDHHMMSS) ));
             String stationName =  RedisUtils.getCacheObject(StringUtils.format("car_{}_{}_tip",e.getCarNum(),DateFormatUtils.format( e.getScheduleDate(),DateUtils.YYYYMMDDHHMMSS) ));
 //            String gpsinfo = RedisUtils.getCacheObject(StringUtils.format("gps_{}", id));
 //            String gpsinfo = RedisUtils.getCacheObject(StringUtils.format("gps_{}", id));