|
@@ -94,7 +94,7 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
@ApiOperation("分页")
|
|
@ApiOperation("分页")
|
|
public R<PageBean<DeviceInfoDto.Vo>> pageSingle(DeviceInfoDto.PageSingle dto) {
|
|
public R<PageBean<DeviceInfoDto.Vo>> pageSingle(DeviceInfoDto.PageSingle dto) {
|
|
PageBean pageBean = dto.getPage();
|
|
PageBean pageBean = dto.getPage();
|
|
- LambdaQueryWrapper<DeviceInfo> lqw = new MybatisPlusQuery().eqWrapper(dto,DeviceInfo.class)
|
|
|
|
|
|
+ LambdaQueryWrapper<DeviceInfo> lqw = new MybatisPlusQuery().eqWrapper(dto, DeviceInfo.class)
|
|
.build();
|
|
.build();
|
|
IPage<DeviceInfo> iPage = page(toIPage(pageBean), lqw);
|
|
IPage<DeviceInfo> iPage = page(toIPage(pageBean), lqw);
|
|
return R.ok(toPageBean(DeviceInfoDto.Vo.class, iPage));
|
|
return R.ok(toPageBean(DeviceInfoDto.Vo.class, iPage));
|
|
@@ -201,14 +201,18 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
return R.fail("设备不存在");
|
|
return R.fail("设备不存在");
|
|
}
|
|
}
|
|
DeviceStatusDto.Vo deviceStatus = deviceInfo.getDeviceStatus();
|
|
DeviceStatusDto.Vo deviceStatus = deviceInfo.getDeviceStatus();
|
|
- check(deviceInfo.getFreezeStatus(), 2, "设备已冻结");
|
|
|
|
SysDictRedis sysDictRedis = SysDictUtils.get(DictsEnum.DEVICE_FAULT_LEVEL_PAY_THRESHOLD.getKey(), DictsSonEnum.DEVICE_FAULT_LEVEL_PAY_THRESHOLD_NOT_PAY.getKey());
|
|
SysDictRedis sysDictRedis = SysDictUtils.get(DictsEnum.DEVICE_FAULT_LEVEL_PAY_THRESHOLD.getKey(), DictsSonEnum.DEVICE_FAULT_LEVEL_PAY_THRESHOLD_NOT_PAY.getKey());
|
|
if (deviceInfo.getFaultLevel() >= Integer.valueOf(sysDictRedis.getValue())) {
|
|
if (deviceInfo.getFaultLevel() >= Integer.valueOf(sysDictRedis.getValue())) {
|
|
return R.fail("设备故障");
|
|
return R.fail("设备故障");
|
|
}
|
|
}
|
|
check(deviceStatus.getNetState(), 2, "设备已离线");
|
|
check(deviceStatus.getNetState(), 2, "设备已离线");
|
|
check(obj.getDoor() != null && obj.getDoor() == 1 ? deviceStatus.getDoorStateR() : deviceStatus.getDoorStateL(), 1, "设备正在使用中,请稍后");
|
|
check(obj.getDoor() != null && obj.getDoor() == 1 ? deviceStatus.getDoorStateR() : deviceStatus.getDoorStateL(), 1, "设备正在使用中,请稍后");
|
|
- check(obj.getDoor() != null && obj.getDoor() == 1 ? deviceStatus.getLockStateR() : deviceStatus.getLockStateL(), 2, "设备已锁机");
|
|
|
|
|
|
+ //质检用户不检查
|
|
|
|
+ SysDictRedis qualitySets = SysDictUtils.get(DictsEnum.QUALITY_MERC_SETS.getKey(), DictsSonEnum.QUALITY_MERC_SETS_MERC_CODE.getKey());
|
|
|
|
+ if (!qualitySets.getValue().equals(deviceInfo.getMercCode())) {
|
|
|
|
+ check(deviceInfo.getFreezeStatus(), 2, "设备已冻结");
|
|
|
|
+ check(obj.getDoor() != null && obj.getDoor() == 1 ? deviceStatus.getLockStateR() : deviceStatus.getLockStateL(), 2, "设备已锁机");
|
|
|
|
+ }
|
|
return R.ok(deviceInfo);
|
|
return R.ok(deviceInfo);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -272,8 +276,6 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
@Override
|
|
@Override
|
|
@ApiOperation("更新商户点位")
|
|
@ApiOperation("更新商户点位")
|
|
public R updatePlace(@RequestBody @Validated DeviceInfoDto.UpdatePlace updatePlace) {
|
|
public R updatePlace(@RequestBody @Validated DeviceInfoDto.UpdatePlace updatePlace) {
|