|
|
@ -633,6 +633,8 @@ public class RealTargetServiceImpl implements RealTargetService { |
|
|
|
multiAnalyzeCodePO.setSignages(Collections.singletonList(HomePageConstant.FRONT_WATER_LEVEL)); |
|
|
|
multiAnalyzeCodePO.setSignages(Collections.singletonList(HomePageConstant.FRONT_WATER_LEVEL)); |
|
|
|
multiAnalyzeCodePOList.add(multiAnalyzeCodePO); |
|
|
|
multiAnalyzeCodePOList.add(multiAnalyzeCodePO); |
|
|
|
R<List<AnalyzeCodeBySignagesVO>> result = analyseDataSearchClient.getAnalyzeCodeBySignages(multiAnalyzeCodePOList); |
|
|
|
R<List<AnalyzeCodeBySignagesVO>> result = analyseDataSearchClient.getAnalyzeCodeBySignages(multiAnalyzeCodePOList); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(result.isSuccess() && CollectionUtil.isNotEmpty(result.getData())){ |
|
|
|
if(result.isSuccess() && CollectionUtil.isNotEmpty(result.getData())){ |
|
|
|
WaterLevelVo waterLevelVo=new WaterLevelVo(); |
|
|
|
WaterLevelVo waterLevelVo=new WaterLevelVo(); |
|
|
|
waterLevelVo.setStationCode(item.getStationId()); |
|
|
|
waterLevelVo.setStationCode(item.getStationId()); |
|
|
@ -934,7 +936,12 @@ public class RealTargetServiceImpl implements RealTargetService { |
|
|
|
} |
|
|
|
} |
|
|
|
return datas.stream().map(data->{ |
|
|
|
return datas.stream().map(data->{ |
|
|
|
ActivePowerVo active = new ActivePowerVo(); |
|
|
|
ActivePowerVo active = new ActivePowerVo(); |
|
|
|
Date dateTime = DateUtil.parse(data.getTs(), "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
Date dateTime; |
|
|
|
|
|
|
|
if(data.getTs().contains(".0")){ |
|
|
|
|
|
|
|
dateTime = DateUtil.parse(data.getTs(), "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
dateTime = DateUtil.parse(data.getTs() + ".0", "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
|
|
|
|
} |
|
|
|
active.setHour(dateTime.getHours()); |
|
|
|
active.setHour(dateTime.getHours()); |
|
|
|
if (StringUtil.isBlank(data.getVal())) { |
|
|
|
if (StringUtil.isBlank(data.getVal())) { |
|
|
|
active.setActivePower("0"); |
|
|
|
active.setActivePower("0"); |
|
|
@ -961,7 +968,12 @@ public class RealTargetServiceImpl implements RealTargetService { |
|
|
|
} |
|
|
|
} |
|
|
|
return records.stream().map(record -> { |
|
|
|
return records.stream().map(record -> { |
|
|
|
UsrPowerVo usr = new UsrPowerVo(); |
|
|
|
UsrPowerVo usr = new UsrPowerVo(); |
|
|
|
Date time = DateUtil.parse(record.getTs(), "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
Date time; |
|
|
|
|
|
|
|
if(record.getTs().contains(".0")){ |
|
|
|
|
|
|
|
time = DateUtil.parse(record.getTs(), "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
time = DateUtil.parse(record.getTs() + ".0", "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
|
|
|
|
} |
|
|
|
usr.setDate(DateUtil.format(time,DateUtil.PATTERN_DATE)); |
|
|
|
usr.setDate(DateUtil.format(time,DateUtil.PATTERN_DATE)); |
|
|
|
usr.setUsrPower(Float.valueOf(Optional.ofNullable(record.getVal()).orElse("0"))); |
|
|
|
usr.setUsrPower(Float.valueOf(Optional.ofNullable(record.getVal()).orElse("0"))); |
|
|
|
return usr; |
|
|
|
return usr; |
|
|
@ -991,7 +1003,12 @@ public class RealTargetServiceImpl implements RealTargetService { |
|
|
|
} |
|
|
|
} |
|
|
|
return records.stream().map(record -> { |
|
|
|
return records.stream().map(record -> { |
|
|
|
PowerMonthVo generate = new PowerMonthVo(); |
|
|
|
PowerMonthVo generate = new PowerMonthVo(); |
|
|
|
Date time = DateUtil.parse(record.getTs(), "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
Date time; |
|
|
|
|
|
|
|
if(record.getTs().contains(".0")){ |
|
|
|
|
|
|
|
time = DateUtil.parse(record.getTs(), "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
time = DateUtil.parse(record.getTs() + ".0", "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
|
|
|
|
} |
|
|
|
generate.setStrMonth(DateUtil.format(time, DateUtil.PATTERN_DATE)); |
|
|
|
generate.setStrMonth(DateUtil.format(time, DateUtil.PATTERN_DATE)); |
|
|
|
if(StringUtil.isEmpty(record.getVal())){ |
|
|
|
if(StringUtil.isEmpty(record.getVal())){ |
|
|
|
generate.setPower(0f); |
|
|
|
generate.setPower(0f); |
|
|
@ -1232,8 +1249,12 @@ public class RealTargetServiceImpl implements RealTargetService { |
|
|
|
} |
|
|
|
} |
|
|
|
return datas.stream().collect(Collectors.toMap( |
|
|
|
return datas.stream().collect(Collectors.toMap( |
|
|
|
key-> { |
|
|
|
key-> { |
|
|
|
|
|
|
|
if(key.getTs().contains(".0")){ |
|
|
|
Date dateTime = DateUtil.parse(key.getTs(), "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
Date dateTime = DateUtil.parse(key.getTs(), "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
return dateTime.getHours(); |
|
|
|
return dateTime.getHours(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Date dateTime = DateUtil.parse(key.getTs() + ".0", "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
|
|
|
|
return dateTime.getHours(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
value -> { |
|
|
|
value -> { |
|
|
|
if(StringUtil.isEmpty(value.getVal())){ |
|
|
|
if(StringUtil.isEmpty(value.getVal())){ |
|
|
@ -1404,7 +1425,12 @@ public class RealTargetServiceImpl implements RealTargetService { |
|
|
|
} |
|
|
|
} |
|
|
|
datas.addAll(records.stream().map(record -> { |
|
|
|
datas.addAll(records.stream().map(record -> { |
|
|
|
PowerMonthVo generate = new PowerMonthVo(); |
|
|
|
PowerMonthVo generate = new PowerMonthVo(); |
|
|
|
Date time = DateUtil.parse(record.get("ts"), "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
Date time; |
|
|
|
|
|
|
|
if(record.get("ts").contains(".0")){ |
|
|
|
|
|
|
|
time = DateUtil.parse(record.get("ts"), "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
time = DateUtil.parse(record.get("ts") + ".0", "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
|
|
|
|
} |
|
|
|
generate.setStrMonth(DateUtil.format(time,DateUtil.PATTERN_DATE)); |
|
|
|
generate.setStrMonth(DateUtil.format(time,DateUtil.PATTERN_DATE)); |
|
|
|
String val = record.get(HomePageConstant.HYDROPOWER_GENERATE_POWER); |
|
|
|
String val = record.get(HomePageConstant.HYDROPOWER_GENERATE_POWER); |
|
|
|
if(StringUtil.isEmpty(val)){ |
|
|
|
if(StringUtil.isEmpty(val)){ |
|
|
@ -1480,7 +1506,12 @@ public class RealTargetServiceImpl implements RealTargetService { |
|
|
|
} |
|
|
|
} |
|
|
|
return records.stream().map(record -> { |
|
|
|
return records.stream().map(record -> { |
|
|
|
ActivePowerVo load = new ActivePowerVo(); |
|
|
|
ActivePowerVo load = new ActivePowerVo(); |
|
|
|
Date time = DateUtil.parse(record.getTs(), "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
Date time; |
|
|
|
|
|
|
|
if(record.getTs().contains(".0")){ |
|
|
|
|
|
|
|
time = DateUtil.parse(record.getTs(), "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
time = DateUtil.parse(record.getTs() + ".0", "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
|
|
|
|
} |
|
|
|
load.setStrHour(DateUtil.format(time,"yyyy-MM-dd HH")); |
|
|
|
load.setStrHour(DateUtil.format(time,"yyyy-MM-dd HH")); |
|
|
|
load.setHour(time.getHours()); |
|
|
|
load.setHour(time.getHours()); |
|
|
|
if(StringUtil.isNotBlank(record.getVal())){ |
|
|
|
if(StringUtil.isNotBlank(record.getVal())){ |
|
|
@ -1508,7 +1539,12 @@ public class RealTargetServiceImpl implements RealTargetService { |
|
|
|
} |
|
|
|
} |
|
|
|
datas.addAll(records.stream().map(record -> { |
|
|
|
datas.addAll(records.stream().map(record -> { |
|
|
|
PowerMonthVo generate = new PowerMonthVo(); |
|
|
|
PowerMonthVo generate = new PowerMonthVo(); |
|
|
|
Date time = DateUtil.parse(record.getTs(), "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
Date time; |
|
|
|
|
|
|
|
if(record.getTs().contains(".0")){ |
|
|
|
|
|
|
|
time = DateUtil.parse(record.getTs(), "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
time = DateUtil.parse(record.getTs() + ".0", "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
|
|
|
|
} |
|
|
|
generate.setStrMonth(DateUtil.format(time,DateUtil.PATTERN_DATE)); |
|
|
|
generate.setStrMonth(DateUtil.format(time,DateUtil.PATTERN_DATE)); |
|
|
|
if(StringUtil.isEmpty(record.getVal())){ |
|
|
|
if(StringUtil.isEmpty(record.getVal())){ |
|
|
|
generate.setPower(0f); |
|
|
|
generate.setPower(0f); |
|
|
@ -1751,7 +1787,12 @@ public class RealTargetServiceImpl implements RealTargetService { |
|
|
|
} |
|
|
|
} |
|
|
|
return records.stream().map(record -> { |
|
|
|
return records.stream().map(record -> { |
|
|
|
PhotovoltaicPowerVo load = new PhotovoltaicPowerVo(); |
|
|
|
PhotovoltaicPowerVo load = new PhotovoltaicPowerVo(); |
|
|
|
Date time = DateUtil.parse(record.getTs(), "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
Date time; |
|
|
|
|
|
|
|
if(records.get(0).getTs().contains(".0")){ |
|
|
|
|
|
|
|
time = DateUtil.parse(records.get(0).getTs(), "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
time = DateUtil.parse(records.get(0).getTs() + ".0", "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
|
|
|
|
} |
|
|
|
load.setHour(time.getHours()); |
|
|
|
load.setHour(time.getHours()); |
|
|
|
load.setActivePower(Optional.ofNullable(record.getVal()).orElse("0")); |
|
|
|
load.setActivePower(Optional.ofNullable(record.getVal()).orElse("0")); |
|
|
|
return load; |
|
|
|
return load; |
|
|
@ -1778,7 +1819,12 @@ public class RealTargetServiceImpl implements RealTargetService { |
|
|
|
} |
|
|
|
} |
|
|
|
return records.stream().map(record -> { |
|
|
|
return records.stream().map(record -> { |
|
|
|
GenerationPowerVo generate = new GenerationPowerVo(); |
|
|
|
GenerationPowerVo generate = new GenerationPowerVo(); |
|
|
|
Date time = DateUtil.parse(record.getTs(), "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
Date time; |
|
|
|
|
|
|
|
if(record.getTs().contains(".0")){ |
|
|
|
|
|
|
|
time = DateUtil.parse(record.getTs(), "yyyy-MM-dd HH:mm:ss.s"); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
time = DateUtil.parse(record.getTs() + ".0", "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.valueOf(Optional.ofNullable(record.getVal()).orElse("0"))); |
|
|
|
generate.setGenerate(Float.valueOf(Optional.ofNullable(record.getVal()).orElse("0"))); |
|
|
|
return generate; |
|
|
|
return generate; |
|
|
|