修改
This commit is contained in:
@ -605,6 +605,9 @@ public class DeviceDataProcessServiceImpl extends AbstractBatteryDataProcessor i
|
|||||||
*/
|
*/
|
||||||
private void saveDeviceData(List<EmsPointMatch> pointMatchList, Map<String, Object> obj,
|
private void saveDeviceData(List<EmsPointMatch> pointMatchList, Map<String, Object> obj,
|
||||||
Object entity, Map<String, List<EmsPointEnumMatch>> pointEnumMatchMap) {
|
Object entity, Map<String, List<EmsPointEnumMatch>> pointEnumMatchMap) {
|
||||||
|
if (null == obj || obj.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Map<String, String> pointMatchMap = pointMatchList.stream()
|
Map<String, String> pointMatchMap = pointMatchList.stream()
|
||||||
.collect(Collectors.toMap(
|
.collect(Collectors.toMap(
|
||||||
data -> StringUtils.toCamelCase(data.getMatchField()), // 源字段名转为驼峰
|
data -> StringUtils.toCamelCase(data.getMatchField()), // 源字段名转为驼峰
|
||||||
|
|||||||
@ -351,7 +351,7 @@ public class EmsStatsReportServiceImpl implements IEmsStatsReportService
|
|||||||
resultList.forEach(ammeterRevenue -> {
|
resultList.forEach(ammeterRevenue -> {
|
||||||
ammeterRevenue.setActiveTotalPrice(ammeterRevenue.getActivePeakPrice().add(ammeterRevenue.getActiveHighPrice()).add(ammeterRevenue.getActiveFlatPrice()).add(ammeterRevenue.getActiveValleyPrice()));
|
ammeterRevenue.setActiveTotalPrice(ammeterRevenue.getActivePeakPrice().add(ammeterRevenue.getActiveHighPrice()).add(ammeterRevenue.getActiveFlatPrice()).add(ammeterRevenue.getActiveValleyPrice()));
|
||||||
ammeterRevenue.setReActiveTotalPrice(ammeterRevenue.getReActivePeakPrice().add(ammeterRevenue.getReActiveHighPrice()).add(ammeterRevenue.getReActiveFlatPrice()).add(ammeterRevenue.getReActiveValleyPrice()));
|
ammeterRevenue.setReActiveTotalPrice(ammeterRevenue.getReActivePeakPrice().add(ammeterRevenue.getReActiveHighPrice()).add(ammeterRevenue.getReActiveFlatPrice()).add(ammeterRevenue.getReActiveValleyPrice()));
|
||||||
ammeterRevenue.setActualRevenue(ammeterRevenue.getReActiveFlatPrice().subtract(ammeterRevenue.getActiveTotalPrice()));
|
ammeterRevenue.setActualRevenue(ammeterRevenue.getReActiveTotalPrice().subtract(ammeterRevenue.getActiveTotalPrice()));
|
||||||
});
|
});
|
||||||
|
|
||||||
return resultList;
|
return resultList;
|
||||||
|
|||||||
Reference in New Issue
Block a user