// 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_总辐射'");
// AtomicReference<Double> installCapacity = new AtomicReference<>(0.0);
stationBasicList.forEach(stationBasic->{
// stationBasicList.forEach(stationBasic -> {
List<Map<String,Object>>mapList=newArrayList<>();
// List<Map<String, Object>> mapList = new ArrayList<>();
if(stationBasic.getStationType().equals("FDZ")){
// 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 (equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' )");
}else{
// } else {
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 frontModule=~/逆变器/ and (equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' )");
// List<Map<String, Object>> mapListData = new ArrayList<>();
StringfinalIndicator="年发电量";
// String finalIndicator = "年发电量";
if(stationBasic.getStationType().equals("FDZ")){
// 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 + "' )");
}else{
// } else {
mapListData=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where (equipmentIndexName='"+finalIndicator+"' )");
// mapListData = influxdbUtil.query("SELECT * FROM indicators_" + stationBasic.getFanGatewayId() + " where (equipmentIndexName='" + finalIndicator + "' )");
// List<Map<String, Object>> mapListData = new ArrayList<>();
StringfinalIndicator="月发电量";
// String finalIndicator = "月发电量";
if(stationBasic.getStationType().equals("FDZ")){
// 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 + "' )");
}else{
// } else {
mapListData=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where (equipmentIndexName='"+finalIndicator+"' )");
// mapListData = influxdbUtil.query("SELECT * FROM indicators_" + stationBasic.getFanGatewayId() + " where (equipmentIndexName='" + finalIndicator + "' )");
// AtomicReference<Double> annualPower = new AtomicReference<>(0.0);
stationBasicList.forEach(stationBasic->{
// stationBasicList.forEach(stationBasic -> {
List<Map<String,Object>>mapList=newArrayList<>();
// List<Map<String, Object>> mapList = new ArrayList<>();
if(stationBasic.getStationType().equals("FDZ")){
// 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 (equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' )");
}else{
// } else {
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 frontModule=~/逆变器/ and (equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' )");
// List<Map<String, Object>> mapListData = new ArrayList<>();
StringfinalIndicator="月发电量";
// String finalIndicator = "月发电量";
if(!stationBasic.getStationType().equals("FDZ")){
// 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 + "' )");
}else{
// } else {
mapListData=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where (equipmentIndexName='"+finalIndicator+"' )");
// mapListData = influxdbUtil.query("SELECT * FROM indicators_" + stationBasic.getFanGatewayId() + " where (equipmentIndexName='" + finalIndicator + "' )");
// List<Map<String, Object>> mapListData = new ArrayList<>();
if(!stationBasic.getStationType().equals("FDZ")){
// 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 + "' )");
}else{
// } else {
mapListData=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where (equipmentIndexName='"+finalIndicator+"' )");
// mapListData = influxdbUtil.query("SELECT * FROM indicators_" + stationBasic.getFanGatewayId() + " where (equipmentIndexName='" + finalIndicator + "' )");
// List<Map<String, Object>> mapListData = new ArrayList<>();
if(!stationBasic.getStationType().equals("FDZ")){
// 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 + "' )");
}else{
// } else {
mapListData=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where (equipmentIndexName='"+finalIndicator+"' )");
// mapListData = influxdbUtil.query("SELECT * FROM indicators_" + stationBasic.getFanGatewayId() + " where (equipmentIndexName='" + finalIndicator + "' )");
// 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 (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 frontModule=~/逆变器/ and (equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' )");
// public List<IndexDto> getlast(String gatewayId, String value,String daty){
IndexDtoindexDto=null;
// IndexDto indexDto=null;
//
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";
// 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){
IndexDtoindexDto=null;
// IndexDto indexDto=null;
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";
// 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";
// public List<IndexDto> getIndexDto(DeviceDto deviceDto) {
Stringquerysql="SELECT createdTime ,gatewayId,address,valueLabel ,equipmentsIdx FROM iot_data WHERE equipmentSpecificName=~/.*"+deviceDto.getNumberName()+"风机"+".*/ and gatewayId='"+deviceDto.getGateway()+"' ORDER BY time desc LIMIT 600";
// 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";