|
@@ -278,6 +278,11 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
if (deviceInfo == null) {
|
|
|
return R.fail("设备不存在");
|
|
|
}
|
|
|
+ Integer busyState = deviceInfo.getBusyState();
|
|
|
+ SysDictRedis sdr = SysDictUtils.get(EnumDeviceBusyStatus.Code.CODE.getCode(), EnumDeviceBusyStatus.N_2.getCode());
|
|
|
+ if (busyState.intValue() == Integer.valueOf(sdr.getValue()).intValue()) {
|
|
|
+ return R.fail("设备已停运");
|
|
|
+ }
|
|
|
DeviceStatusDto.Vo deviceStatus = deviceInfo.getDeviceStatus();
|
|
|
SysDictRedis sysDictRedis = SysDictUtils.get(EnumDeviceFaultLevelPayThreshold.Code.CODE.getCode(), EnumDeviceFaultLevelPayThreshold.NOT_PAY.getCode());
|
|
|
if (deviceInfo.getFaultLevel() >= Integer.valueOf(sysDictRedis.getValue())) {
|
|
@@ -895,6 +900,7 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
device.setTempValue(deviceStatus.getTempValue());
|
|
|
device.setDeviceStateL(deviceStateL);
|
|
|
device.setDeviceStateR(deviceStateR);
|
|
|
+ device.setSysPower(deviceStatus.getSysPower());
|
|
|
DeviceLockState deviceLockStateL = DeviceLockState.getEnumByCode(deviceStateL);
|
|
|
DeviceLockState deviceLockStateR = DeviceLockState.getEnumByCode(deviceStateR);
|
|
|
device.setDeviceStateRName(deviceLockStateR == null ? "未知" : deviceLockStateR.getDescription());
|