|
@@ -108,7 +108,7 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
|
|
|
@ApiOperation("点位设备数量查询")
|
|
|
@Override
|
|
|
- public R<List<DeviceInfoDto.PlaceDeviceNumVo>> placeDeviceNum(@RequestBody @Validated DeviceInfoDto.PlaceDeviceNumDto dto){
|
|
|
+ public R<List<DeviceInfoDto.PlaceDeviceNumVo>> placeDeviceNum(@RequestBody @Validated DeviceInfoDto.PlaceDeviceNumDto dto) {
|
|
|
return R.ok(baseMapper.placeDeviceNum(dto));
|
|
|
}
|
|
|
|
|
@@ -825,7 +825,7 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
Long districtId = v.getDistrictId();
|
|
|
vo.setDeviceNum(v.getDeviceNum());
|
|
|
vo.setDistrictId(v.getDistrictId());
|
|
|
- vo.setDistrictName(v.getDistrictId()==-1L ? "未分配区域" : districtMap.get(v.getDistrictId()));
|
|
|
+ vo.setDistrictName(v.getDistrictId() == -1L ? "未分配区域" : districtMap.get(v.getDistrictId()));
|
|
|
//区域下的设备列表
|
|
|
List<DeviceInfoDto.MercHomeDeviceVo> deviceInfos = BeanUtil.copyToList(deviceMap.get(districtId), DeviceInfoDto.MercHomeDeviceVo.class);
|
|
|
if (CollUtil.isEmpty(deviceInfos)) {
|
|
@@ -900,7 +900,14 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
device.setTempValue(deviceStatus.getTempValue());
|
|
|
device.setDeviceStateL(deviceStateL);
|
|
|
device.setDeviceStateR(deviceStateR);
|
|
|
- device.setSysPower(deviceStatus.getSysPower());
|
|
|
+ Boolean isUseBattery = deviceStatus.getIsUseBattery();
|
|
|
+ if (BooleanUtil.isTrue(isUseBattery)) {
|
|
|
+ //使用电池。即断电状态
|
|
|
+ device.setSysPower(2);
|
|
|
+ } else {
|
|
|
+ device.setSysPower(1);
|
|
|
+ }
|
|
|
+
|
|
|
DeviceLockState deviceLockStateL = DeviceLockState.getEnumByCode(deviceStateL);
|
|
|
DeviceLockState deviceLockStateR = DeviceLockState.getEnumByCode(deviceStateR);
|
|
|
device.setDeviceStateRName(deviceLockStateR == null ? "未知" : deviceLockStateR.getDescription());
|