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='年发电量' )");
mapList=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where frontModule=~/逆变器/ and (equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' )");
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_总辐射'");
@@ -638,11 +523,19 @@ public class MonitoringServiceImpl {
StringfinalIndicator="年发电量";
Doubletotal1=0.00;
if(!stationBasic.getStationType().equals("FDZ")){
mapListData=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where frontModule=~/逆变器/ and (equipmentIndexName='"+finalIndicator+"' )");
@@ -664,19 +557,26 @@ public class MonitoringServiceImpl {
Doubletotal=0.00;
StringfinalIndicator="月发电量";
if(!stationBasic.getStationType().equals("FDZ")){
mapListData=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where frontModule=~/逆变器/ and (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='年发电量' )");
@@ -755,18 +658,26 @@ public class MonitoringServiceImpl {
StringfinalIndicator="月发电量";
Doubletotal=0.00;
if(!stationBasic.getStationType().equals("FDZ")){
mapListData=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where frontModule=~/逆变器/ and (equipmentIndexName='"+finalIndicator+"' )");
mapListData=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where frontModule=~/逆变器/ and (equipmentIndexName='"+finalIndicator+"' )");
mapListData=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where frontModule=~/逆变器/ and (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='年发电量' )");
@@ -1017,11 +950,19 @@ public class MonitoringServiceImpl {
stationBasicListAll.forEach(stationBasic->{
List<Map<String,Object>>mapList;
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);