|  |  | 
 |  |  | import lombok.Data; | 
 |  |  | import lombok.extern.slf4j.Slf4j; | 
 |  |  |  | 
 |  |  | import java.util.HashMap; | 
 |  |  |  | 
 |  |  | /** | 
 |  |  |  * 四向穿梭车 | 
 |  |  |  */ | 
 |  |  | 
 |  |  |     private String locNo; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 小车设备状态 | 
 |  |  |      * 小车设备状态0:忙碌 1:空闲 | 
 |  |  |      */ | 
 |  |  |     private Integer deviceStatus; | 
 |  |  |  | 
 |  |  | 
 |  |  |      */ | 
 |  |  |     private Integer batteryVoltage; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 运行速度 | 
 |  |  |      */ | 
 |  |  |     private Integer speed; | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     //**********************系统自身所需属性********************** | 
 |  |  |     /** | 
 |  |  | 
 |  |  |     private Integer yCurrent = 0; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 演示模式 | 
 |  |  |      */ | 
 |  |  |     private Boolean demo = false; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 日志采集时间 | 
 |  |  |      */ | 
 |  |  |     private Long deviceDataLog = System.currentTimeMillis(); | 
 |  |  | 
 |  |  |      * 扩展字段 | 
 |  |  |      */ | 
 |  |  |     private Object extend; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 系统消息 | 
 |  |  |      */ | 
 |  |  |     private String systemMsg; | 
 |  |  |  | 
 |  |  |     public String getProtocolStatus$() { | 
 |  |  |         if (this.protocolStatusType == null) { | 
 |  |  |             return ""; | 
 |  |  |         } | 
 |  |  |         return this.protocolStatusType.desc; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 设置小车状态 | 
 |  |  | 
 |  |  |         return basShuttleErr.getErrName(); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public String getMode$() { | 
 |  |  |         if (this.mode == null) { | 
 |  |  |             return ""; | 
 |  |  |         } | 
 |  |  |         if (this.mode == 0) { | 
 |  |  |             return "手动"; | 
 |  |  |         } else if (this.mode == 1) { | 
 |  |  |             return "自动"; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         return ""; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public String getDeviceStatus$() { | 
 |  |  |         if (this.deviceStatus == null) { | 
 |  |  |             return ""; | 
 |  |  |         } | 
 |  |  |         if (this.deviceStatus == 0) { | 
 |  |  |             return "忙碌"; | 
 |  |  |         } else if (this.deviceStatus == 1) { | 
 |  |  |             return "空闲"; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         return ""; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public String getHasLift$() { | 
 |  |  |         if (this.hasLift == null) { | 
 |  |  |             return ""; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         return this.hasLift ? "Y" : "N"; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public String getHasCharge$() { | 
 |  |  |         if (this.hasCharge == null) { | 
 |  |  |             return ""; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         return this.hasCharge ? "Y" : "N"; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public String getHasPallet$() { | 
 |  |  |         if (this.hasPallet == null) { | 
 |  |  |             return ""; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         return this.hasPallet ? "Y" : "N"; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public String getPakMk$() { | 
 |  |  |         if (this.pakMk == null) { | 
 |  |  |             return ""; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         return this.pakMk ? "Y" : "N"; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public String getDemo$() { | 
 |  |  |         if (this.demo == null) { | 
 |  |  |             return ""; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         return this.demo ? "Y" : "N"; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public HashMap<String, Object> getPoint() { | 
 |  |  |         HashMap<String, Object> map = new HashMap<>(); | 
 |  |  |         if (this.currentCode == null) { | 
 |  |  |             return map; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         LocMastService locMastService = SpringUtils.getBean(LocMastService.class); | 
 |  |  |         if (locMastService == null) { | 
 |  |  |             return map; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         //源库位(小车当前位置) | 
 |  |  |         LocMast currentLocMast = locMastService.queryByQrCode(this.currentCode); | 
 |  |  |         if (currentLocMast == null) { | 
 |  |  |             return map; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         map.put("x", currentLocMast.getRow1()); | 
 |  |  |         map.put("y", currentLocMast.getBay1()); | 
 |  |  |         map.put("z", currentLocMast.getLev1()); | 
 |  |  |         return map; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | } |