|
@@ -9,6 +9,7 @@ import com.xy.collections.list.JList;
|
|
import com.xy.collections.map.JMap;
|
|
import com.xy.collections.map.JMap;
|
|
import com.xy.device.*;
|
|
import com.xy.device.*;
|
|
import com.xy.dto.DeviceAlgorithmChargingDto;
|
|
import com.xy.dto.DeviceAlgorithmChargingDto;
|
|
|
|
+import com.xy.dto.DeviceChargingConfigDto;
|
|
import com.xy.dto.DeviceChargingDto;
|
|
import com.xy.dto.DeviceChargingDto;
|
|
import com.xy.dto.DeviceInfoDto;
|
|
import com.xy.dto.DeviceInfoDto;
|
|
import com.xy.entity.*;
|
|
import com.xy.entity.*;
|
|
@@ -194,11 +195,24 @@ public class DeviceChargingServiceImpl extends ServiceImpl<DeviceChargingMapper,
|
|
timeoutStatus = s <= value * 86400 ? "即将到期(" + s / 86400 + "天)" : "正常(" + s / 86400 + "天)";
|
|
timeoutStatus = s <= value * 86400 ? "即将到期(" + s / 86400 + "天)" : "正常(" + s / 86400 + "天)";
|
|
}
|
|
}
|
|
record.getDeviceCharging().setTimeoutStatus(timeoutStatus);
|
|
record.getDeviceCharging().setTimeoutStatus(timeoutStatus);
|
|
- //封装计费标准金额
|
|
|
|
DeviceInfoDto.Vo deviceInfo = record.getDeviceInfo();
|
|
DeviceInfoDto.Vo deviceInfo = record.getDeviceInfo();
|
|
- SysDictRedis sysDictRedis = stringSysDictRedisMap.get(deviceInfo.getDeviceType().toString());
|
|
|
|
- if (sysDictRedis != null) {
|
|
|
|
- record.setChargingMoney(Integer.valueOf(sysDictRedis.getValue()));
|
|
|
|
|
|
+
|
|
|
|
+ //查询设备计费配置
|
|
|
|
+ DeviceChargingConfigDto.SelectList selectList = new DeviceChargingConfigDto.SelectList()
|
|
|
|
+ .setDeviceType(deviceInfo.getDeviceType())
|
|
|
|
+ .setMercId(deviceInfo.getMercId());
|
|
|
|
+ selectList.setType(value);
|
|
|
|
+ List<DeviceChargingConfigDto.Vo> deviceChargingConfigs = deviceChargingConfigService.list2(selectList).getData();
|
|
|
|
+ if (Emptys.check(deviceChargingConfigs)) {
|
|
|
|
+ //获取自定义配置计费标准
|
|
|
|
+ DeviceChargingConfigDto.Vo deviceChargingConfig = deviceChargingConfigs.get(0);
|
|
|
|
+ record.setChargingMoney(deviceChargingConfig.getConfigValue());
|
|
|
|
+ } else {
|
|
|
|
+ //获取默认计费标准
|
|
|
|
+ SysDictRedis sysDictRedis = stringSysDictRedisMap.get(deviceInfo.getDeviceType().toString());
|
|
|
|
+ if (sysDictRedis != null) {
|
|
|
|
+ record.setChargingMoney(Integer.valueOf(sysDictRedis.getValue()));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|