Browse Source

#MOD 设备首页反显锁状态

谭斌 2 năm trước cách đây
mục cha
commit
11c44f7674

+ 9 - 0
device-api-service/src/main/java/com/xy/service/DeviceInfoServiceImpl.java

@@ -630,6 +630,15 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
                     device.setNetStateName(DeviceNetSateType.getEnumByCode(deviceStatus.getNetState()).getDescription());
                 }
 
+                Integer deviceStateL = deviceStatus.getDeviceStateL();
+                Integer deviceStateR = deviceStatus.getDeviceStateR();
+                device.setDeviceStateL(deviceStateL);
+                device.setDeviceStateR(deviceStateR);
+                DeviceLockState deviceLockStateL = DeviceLockState.getEnumByCode(deviceStateL);
+                DeviceLockState deviceLockStateR = DeviceLockState.getEnumByCode(deviceStateR);
+                device.setDeviceStateRName(deviceLockStateR == null ? "未知" : deviceLockStateR.getDescription());
+                device.setDeviceStateLName(deviceLockStateL == null ? "未知" : deviceLockStateL.getDescription());
+
             }
 
             //在线排序

+ 14 - 0
device-api/src/main/java/com/xy/dto/DeviceInfoDto.java

@@ -689,6 +689,20 @@ public class DeviceInfoDto {
         @ApiModelProperty("补货数")
         private Integer fillNum;
 
+
+        @ApiModelProperty("左门锁机状态名称")
+        private String deviceStateLName;
+
+        @ApiModelProperty("右门锁机状态名称")
+        private String deviceStateRName;
+
+        @ApiModelProperty("左门锁机状态,字典类型:devcie_lock_status")
+        private Integer deviceStateL;
+
+
+        @ApiModelProperty("右门锁机状态,字典类型:devcie_lock_status")
+        private Integer deviceStateR;
+
     }