// public ResponseModel<IPage<Map<String, Object>>> solarPowerOperation(@RequestParam(value = "stationId")String stationId,@RequestParam(value = "current") int current, int size) {
mapList=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where (equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' or equipmentIndexName='有功功率' or equipmentIndexName='30秒平均风速' )");
mapList=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where frontModule=~/逆变器/ and(equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' or equipmentIndexName='有功功率')");
mapList1=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getBoosterGatewayId()+" where equipmentIndexName='WTX-801_25_WTX-801_总辐射'");
// if (stationBasic.getStationType().equals("FDZ")) {
// mapList = influxdbUtil.query("SELECT * FROM indicators_" + stationBasic.getFanGatewayId() + " where (equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' or equipmentIndexName='有功功率' or equipmentIndexName='30秒平均风速' )");
// mapList = influxdbUtil.query("SELECT * FROM indicators_" + stationBasic.getFanGatewayId() + " where frontModule=~/逆变器/ and(equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' or equipmentIndexName='有功功率')");
// mapList1 = influxdbUtil.query("SELECT * FROM indicators_" + stationBasic.getBoosterGatewayId() + " where equipmentIndexName='WTX-801_25_WTX-801_总辐射'");
mapList=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where (equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' )");
}else{
mapList=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where frontModule=~/逆变器/ and (equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' )");
// List<SocialContributionDto> socialContributionDtoList = new ArrayList<>();
// //日发电量
// AtomicReference<Double> dailyPower = new AtomicReference<>(0.0);
// //月发电量
// AtomicReference<Double> monthlyPower = new AtomicReference<>(0.0);
// //年发电量
// AtomicReference<Double> annualPower = new AtomicReference<>(0.0);
// //年发电量完成比例
// String completionRatio = "0.00";
// //年利用小时数
// AtomicReference<Double> useHours = new AtomicReference<>(0.0);
// AtomicReference<Double> installCapacity = new AtomicReference<>(0.0);
// stationBasicList.forEach(stationBasic -> {
// List<Map<String, Object>> mapList = new ArrayList<>();
// if (stationBasic.getStationType().equals("FDZ")) {
// mapList = influxdbUtil.query("SELECT * FROM indicators_" + stationBasic.getFanGatewayId() + " where (equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' )");
// } else {
// mapList = influxdbUtil.query("SELECT * FROM indicators_" + stationBasic.getFanGatewayId() + " where frontModule=~/逆变器/ and (equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' )");
mapListData=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where frontModule=~/逆变器/ and (equipmentIndexName='"+finalIndicator+"' )");
}else{
mapListData=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where (equipmentIndexName='"+finalIndicator+"' )");
mapListData=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where frontModule=~/逆变器/ and (equipmentIndexName='"+finalIndicator+"' )");
}else{
mapListData=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where (equipmentIndexName='"+finalIndicator+"' )");
mapList=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where (equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' )");
}else{
mapList=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where frontModule=~/逆变器/ and (equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' )");
// AtomicReference<Double> dailyPower = new AtomicReference<>(0.0);
// //月发电量
// AtomicReference<Double> monthlyPower = new AtomicReference<>(0.0);
// //年发电量
// AtomicReference<Double> annualPower = new AtomicReference<>(0.0);
// stationBasicList.forEach(stationBasic -> {
// List<Map<String, Object>> mapList = new ArrayList<>();
// if (stationBasic.getStationType().equals("FDZ")) {
// mapList = influxdbUtil.query("SELECT * FROM indicators_" + stationBasic.getFanGatewayId() + " where (equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' )");
// } else {
// mapList = influxdbUtil.query("SELECT * FROM indicators_" + stationBasic.getFanGatewayId() + " where frontModule=~/逆变器/ and (equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' )");
mapListData=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where frontModule=~/逆变器/ and (equipmentIndexName='"+finalIndicator+"' )");
}else{
mapListData=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where (equipmentIndexName='"+finalIndicator+"' )");
mapListData=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where frontModule=~/逆变器/ and (equipmentIndexName='"+finalIndicator+"' )");
}else{
mapListData=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where (equipmentIndexName='"+finalIndicator+"' )");
mapListData=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where frontModule=~/逆变器/ and (equipmentIndexName='"+finalIndicator+"' )");
}else{
mapListData=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where (equipmentIndexName='"+finalIndicator+"' )");
mapList=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where (equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' )");
mapList=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where frontModule=~/逆变器/ and (equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' )");
// if (stationBasic.getStationType().equals("FDZ")) {
// mapList = influxdbUtil.query("SELECT * FROM indicators_" + stationBasic.getFanGatewayId() + " where (equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' )");
// mapList = influxdbUtil.query("SELECT * FROM indicators_" + stationBasic.getFanGatewayId() + " where frontModule=~/逆变器/ and (equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' )");
StringquerySql=" SELECT * FROM iot_data_%s WHERE equipmentIndexName='%s' and time >='%sT00:55:00Z' AND time < '%sT23:59:59Z' group by equipmentsIdx order by time desc LIMIT 1";
StringquerySql=" SELECT * FROM iot_data_%s WHERE equipmentIndexName='%s' and equipmentSpecificName =~/.*逆变器.*/ and time >='%sT00:55:00Z' AND time < '%sT23:59:59Z' group by equipmentsIdx order by time desc LIMIT 1";
// public List<IndexDto> getlast(String gatewayId, String value,String daty){
// IndexDto indexDto=null;
//
// String querySql = " SELECT * FROM iot_data_%s WHERE equipmentIndexName='%s' and time >='%sT00:55:00Z' AND time < '%sT23:59:59Z' group by equipmentsIdx order by time desc LIMIT 1";
// public List<IndexDto> getlastgf(String gatewayId, String value,String daty){
// IndexDto indexDto=null;
// String querySql = " SELECT * FROM iot_data_%s WHERE equipmentIndexName='%s' and equipmentSpecificName =~/.*逆变器.*/ and time >='%sT00:55:00Z' AND time < '%sT23:59:59Z' group by equipmentsIdx order by time desc LIMIT 1";
Stringquerysql="SELECT createdTime ,gatewayId,address,valueLabel ,equipmentsIdx FROM iot_data WHERE equipmentSpecificName=~/.*"+deviceDto.getNumberName()+"风机"+".*/ and gatewayId='"+deviceDto.getGateway()+"' ORDER BY time desc LIMIT 600";
// public List<IndexDto> getIndexDto(DeviceDto deviceDto) {
// String querysql ="SELECT createdTime ,gatewayId,address,valueLabel ,equipmentsIdx FROM iot_data WHERE equipmentSpecificName=~/.*"+deviceDto.getNumberName()+"风机"+".*/ and gatewayId='"+deviceDto.getGateway()+"' ORDER BY time desc LIMIT 600";
// //每个分机的指标数据
// List<IndexDto> list = influxDButils.getListData(querysql,IndexDto.class);