|
@@ -17,6 +17,7 @@ import com.xy.mapper.DeviceInfoMapper;
|
|
|
import com.xy.mapper.entity.DeviceInfoQueryPage;
|
|
|
import com.xy.utils.*;
|
|
|
import com.xy.utils.enums.DictEnum;
|
|
|
+import com.xy.utils.enums.DictSonEnum;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
@@ -118,8 +119,12 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
DeviceStatusDto.Vo deviceStatus = deviceInfo.getDeviceStatus();
|
|
|
check(deviceInfo.getBusyState(), 2, "设备已停运");
|
|
|
check(deviceInfo.getFreezeStatus(), 2, "设备已冻结");
|
|
|
+ SysDictRedis sysDictRedis = SysDictUtils.get(DictEnum.DEVICE_FAULT_LEVEL_PAY_THRESHOLD.getKey(), DictSonEnum.DEVICE_FAULT_LEVEL_PAY_THRESHOLD_NOT_PAY.getKey());
|
|
|
+ if (deviceInfo.getFaultLevel() >= Integer.valueOf(sysDictRedis.getValue())) {
|
|
|
+ return R.fail("设备故障");
|
|
|
+ }
|
|
|
check(deviceStatus.getNetState(), 2, "设备已离线");
|
|
|
- check(deviceStatus.getDeviceState(), 2, "设备已锁机");
|
|
|
+ check(obj.getIsTwoDoor() != null && obj.getIsTwoDoor() ? deviceStatus.getDeviceStateR() : deviceStatus.getDeviceStateL(), 2, "设备已锁机");
|
|
|
return R.ok();
|
|
|
}
|
|
|
|