Commit 4c048288 authored by caotao's avatar caotao

1.influxdb切换。2.完成情况辐照度为空。3.地图图钉装机容量为0.

parent 8fe9fdf2
......@@ -58,7 +58,7 @@ public class MonitoringMapController extends BaseController {
return ResponseHelper.buildResponse(monitoringServiceImpl.getCompletionOfPowerIndicatorsByProvinceName(current,size,provinceName));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@ApiOperation(value = "根据场站id动态获取tab页签")
@GetMapping("/getTabsByStationBasicId")
public ResponseModel<List<TabDto>> getTabsByStationBasicId(@RequestParam(required = true) String stationBasicId) {
......
......@@ -148,11 +148,10 @@ public class MonitoringServiceImpl {
regionNationWideDto.setStationCapacity(String.valueOf(getStationCaPACITYL(stationBasic.getStationNumber())));
if (stationBasic.getStationType().equals("FDZ")) {
speendOrirradiate = String.valueOf(commonServiceImpl.getAvgvalueByIndicatior(stationBasic.getFanGatewayId(), "30秒平均风速"));
regionNationWideDto.setSpeendOrirradiate(speendOrirradiate);
} else {
regionNationWideDto.setSpeendOrirradiate(String.valueOf(Math.random() * 100));
regionNationWideDto.setStationCapacity("0");
speendOrirradiate = String.valueOf(commonServiceImpl.getTotalByIndicatior(stationBasic.getBoosterGatewayId(), "WTX-801_25_WTX-801_总辐射"));
}
regionNationWideDto.setSpeendOrirradiate(speendOrirradiate);
StationCoordinate stationCoordinate = stationCoordinateList.stream().filter(stationCoordinate1 -> stationCoordinate1.getStationId().equals(stationBasic.getSequenceNbr())).collect(Collectors.toList()).get(0);
hashMap.put("lng", Double.valueOf(stationCoordinate.getLongitude()));
hashMap.put("lat", Double.valueOf(stationCoordinate.getLaitude()));
......@@ -201,6 +200,7 @@ public class MonitoringServiceImpl {
try {
List<Map<String,Object>> mapList;
List<Map<String,Object>> mapList1;
if(stationBasic.getStationType().equals("FDZ")){
mapList=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where (equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' or equipmentIndexName='有功功率' or equipmentIndexName='30秒平均风速' )");
completionOfPowerIndicatorsDto.setWindSpeedOrIrradiance(String.valueOf(commonServiceImpl.getAvgvalueByIndicatior(mapList, "30秒平均风速")));
......@@ -210,7 +210,8 @@ public class MonitoringServiceImpl {
completionOfPowerIndicatorsDto.setAnnualPower(String.valueOf(commonServiceImpl.getTotalByIndicatior(mapList, "年发电量")));
}else {
mapList=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where (equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' or equipmentIndexName='有功功率' or equipmentIndexName='30秒平均风速' )");
completionOfPowerIndicatorsDto.setWindSpeedOrIrradiance(String.valueOf(commonServiceImpl.getAvgvalueByIndicatior(mapList, "30秒平均风速")));
mapList1=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getBoosterGatewayId()+" where equipmentIndexName='WTX-801_25_WTX-801_总辐射'");
completionOfPowerIndicatorsDto.setWindSpeedOrIrradiance(String.valueOf(commonServiceImpl.getTotalByIndicatior(mapList1, "WTX-801_25_WTX-801_总辐射")));
completionOfPowerIndicatorsDto.setActivePower(String.valueOf(commonServiceImpl.getTotalByIndicatior(mapList, "有功功率")));
completionOfPowerIndicatorsDto.setDailyPower(String.valueOf(commonServiceImpl.getTotalByIndicatior(mapList, "日发电量")));
completionOfPowerIndicatorsDto.setMonthlyPower(String.valueOf(commonServiceImpl.getTotalByIndicatior(mapList, "月发电量")));
......
......@@ -73,10 +73,20 @@ emqx.max-inflight=1000
#spring.influx.actions=10000
#spring.influx.bufferLimit=20000
# influxDB
spring.influx.url= http://139.9.171.247:8086
spring.influx.password=Yeejoin@2023
spring.influx.user=admin
## influxDB
#spring.influx.url= http://139.9.171.247:8086
#spring.influx.password=Yeejoin@2023
#spring.influx.user=admin
#spring.influx.database=iot_platform
#spring.influx.retention_policy=default
#spring.influx.retention_policy_time=30d
#spring.influx.actions=10000
#spring.influx.bufferLimit=20000
spring.influx.url=http://139.9.173.44:18086
spring.influx.password=Yeejoin@2020
spring.influx.user=root
spring.influx.database=iot_platform
spring.influx.retention_policy=default
spring.influx.retention_policy_time=30d
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment