|
@@ -324,21 +324,19 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
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())) {
|
|
|
- return R.fail("设备故障");
|
|
|
- }
|
|
|
- check(deviceStatus.getNetState(), 2, "设备已离线");
|
|
|
- if (!deviceStatus.getIsPay()) {
|
|
|
- return R.fail("设备不可交易");
|
|
|
- }
|
|
|
- check(obj.getDoor() != null && obj.getDoor() == 1 ? deviceStatus.getDoorStateR() : deviceStatus.getDoorStateL(), 1, "设备正在使用中,请稍后");
|
|
|
- //质检用户不检查
|
|
|
SysDictRedis qualitySets = SysDictUtils.get(EnumQualityMercSets.Code.CODE.getCode(), EnumQualityMercSets.MERC_CODE.getCode());
|
|
|
+ //设备当前商户是质检时不检查
|
|
|
if (!qualitySets.getValue().equals(deviceInfo.getMercCode())) {
|
|
|
+ check(deviceInfo.getActiveState(), 2, "设备未激活");
|
|
|
check(deviceInfo.getFreezeStatus(), 2, "设备已冻结");
|
|
|
check(obj.getDoor() != null && obj.getDoor() == 1 ? deviceStatus.getLockStateR() : deviceStatus.getLockStateL(), 2, "设备已锁机");
|
|
|
+ check(deviceStatus.getIsPay(), Boolean.FALSE, "设备不可交易");
|
|
|
+ check(deviceInfo.getBusyState(), 2, "设备已停运");
|
|
|
+ SysDictRedis sysDictRedis = SysDictUtils.get(EnumDeviceFaultLevelPayThreshold.Code.CODE.getCode(), EnumDeviceFaultLevelPayThreshold.NOT_PAY.getCode());
|
|
|
+ check(deviceInfo.getFaultLevel(), sysDictRedis.getValue(), "设备故障");
|
|
|
}
|
|
|
+ check(deviceStatus.getNetState(), 2, "设备已离线");
|
|
|
+ check(obj.getDoor() != null && obj.getDoor() == 1 ? deviceStatus.getDoorStateR() : deviceStatus.getDoorStateL(), 1, "设备正在使用中,请稍后");
|
|
|
return R.ok(deviceInfo);
|
|
|
}
|
|
|
|