|
|
@ -129,7 +129,7 @@ public class RealTargetServiceImpl implements RealTargetService { |
|
|
|
}); |
|
|
|
}); |
|
|
|
// 设备遍历
|
|
|
|
// 设备遍历
|
|
|
|
devices.forEach(item->{ |
|
|
|
devices.forEach(item->{ |
|
|
|
item.setRideCount(1); |
|
|
|
item.setRideCount(1.0); |
|
|
|
item.setInstalledCapacity(0.0); |
|
|
|
item.setInstalledCapacity(0.0); |
|
|
|
// 站点设置
|
|
|
|
// 站点设置
|
|
|
|
if(CollectionUtil.isNotEmpty(stations)){ |
|
|
|
if(CollectionUtil.isNotEmpty(stations)){ |
|
|
@ -152,10 +152,10 @@ public class RealTargetServiceImpl implements RealTargetService { |
|
|
|
String param_name = param.getParamName(); |
|
|
|
String param_name = param.getParamName(); |
|
|
|
switch (param_name){ |
|
|
|
switch (param_name){ |
|
|
|
case "ct": |
|
|
|
case "ct": |
|
|
|
item.setCt(Integer.valueOf(param.getParamValue())); |
|
|
|
item.setCt(Double.valueOf(param.getParamValue())); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "pt": |
|
|
|
case "pt": |
|
|
|
item.setPt(Integer.valueOf(param.getParamValue())); |
|
|
|
item.setPt(Double.valueOf(param.getParamValue())); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "installedCapacity": |
|
|
|
case "installedCapacity": |
|
|
|
item.setInstalledCapacity(Double.valueOf(param.getParamValue())); |
|
|
|
item.setInstalledCapacity(Double.valueOf(param.getParamValue())); |
|
|
@ -744,7 +744,11 @@ public class RealTargetServiceImpl implements RealTargetService { |
|
|
|
PowerMonthVo generate = new PowerMonthVo(); |
|
|
|
PowerMonthVo generate = new PowerMonthVo(); |
|
|
|
Date time = DateUtil.parse(record.getTs(), "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
Date time = DateUtil.parse(record.getTs(), "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
generate.setStrMonth(DateUtil.format(time, DateUtil.PATTERN_DATE)); |
|
|
|
generate.setStrMonth(DateUtil.format(time, DateUtil.PATTERN_DATE)); |
|
|
|
generate.setPower(Float.parseFloat(Optional.ofNullable(record.getVal()).orElse("0")) * device.getRideCount()); |
|
|
|
if(StringUtil.isEmpty(record.getVal())){ |
|
|
|
|
|
|
|
generate.setPower(0f); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
generate.setPower(Float.parseFloat(String.valueOf(Double.parseDouble(record.getVal()) * device.getRideCount()))); |
|
|
|
|
|
|
|
} |
|
|
|
return generate; |
|
|
|
return generate; |
|
|
|
}).collect(Collectors.toMap(PowerMonthVo::getStrMonth,PowerMonthVo::getPower)); |
|
|
|
}).collect(Collectors.toMap(PowerMonthVo::getStrMonth,PowerMonthVo::getPower)); |
|
|
|
} |
|
|
|
} |
|
|
@ -1161,7 +1165,11 @@ public class RealTargetServiceImpl implements RealTargetService { |
|
|
|
PowerMonthVo generate = new PowerMonthVo(); |
|
|
|
PowerMonthVo generate = new PowerMonthVo(); |
|
|
|
Date time = DateUtil.parse(record.getTs(), "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
Date time = DateUtil.parse(record.getTs(), "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
generate.setStrMonth(DateUtil.format(time,DateUtil.PATTERN_DATE)); |
|
|
|
generate.setStrMonth(DateUtil.format(time,DateUtil.PATTERN_DATE)); |
|
|
|
generate.setPower(Float.parseFloat(Optional.ofNullable(record.getVal()).orElse("0")) * device.getRideCount()); |
|
|
|
if(StringUtil.isEmpty(record.getVal())){ |
|
|
|
|
|
|
|
generate.setPower(0f); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
generate.setPower(Float.parseFloat(String.valueOf(Double.parseDouble(record.getVal()) * device.getRideCount()))); |
|
|
|
|
|
|
|
} |
|
|
|
return generate; |
|
|
|
return generate; |
|
|
|
}).collect(Collectors.toList())); |
|
|
|
}).collect(Collectors.toList())); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -1320,7 +1328,7 @@ public class RealTargetServiceImpl implements RealTargetService { |
|
|
|
* @param type |
|
|
|
* @param type |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private float sumValueByTime(String deviceCode, int rideCount, String type) { |
|
|
|
private float sumValueByTime(String deviceCode, Double rideCount, String type) { |
|
|
|
Calendar calendar = Calendar.getInstance(); |
|
|
|
Calendar calendar = Calendar.getInstance(); |
|
|
|
String start, end; |
|
|
|
String start, end; |
|
|
|
int cycleType = 3; |
|
|
|
int cycleType = 3; |
|
|
@ -1612,7 +1620,11 @@ public class RealTargetServiceImpl implements RealTargetService { |
|
|
|
GenerationPowerVo generate = new GenerationPowerVo(); |
|
|
|
GenerationPowerVo generate = new GenerationPowerVo(); |
|
|
|
Date time = DateUtil.parse(record.getTs(), "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
Date time = DateUtil.parse(record.getTs(), "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
generate.setDate(DateUtil.format(time,DateUtil.PATTERN_DATE)); |
|
|
|
generate.setDate(DateUtil.format(time,DateUtil.PATTERN_DATE)); |
|
|
|
generate.setGenerate(Float.parseFloat(Optional.ofNullable(record.getVal()).orElse("0")) * device.getRideCount()); |
|
|
|
if(StringUtil.isEmpty(record.getVal())){ |
|
|
|
|
|
|
|
generate.setGenerate(0f); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
generate.setGenerate(Float.parseFloat(String.valueOf(Double.parseDouble(record.getVal()) * device.getRideCount()))); |
|
|
|
|
|
|
|
} |
|
|
|
return generate; |
|
|
|
return generate; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
} |
|
|
|