Commit 32d16d44 authored by caotao's avatar caotao

新增根据场站id动态获取场站tab页

parent 5b6cfe02
......@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.jxiop.api.service.IMapRegionService;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.RegionNationWideDto;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.ResultsData;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.SocialContributionDto;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.TabDto;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.Test;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.MonitoringServiceImpl;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.RegionServiceImpl;
......@@ -18,6 +19,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.TestServiceImpl;
import com.yeejoin.amos.component.influxdb.InfluxDbConnection;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import javafx.scene.control.Tab;
import org.aspectj.apache.bcel.classfile.Module;
import org.influxdb.dto.QueryResult;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -54,4 +56,11 @@ public class MonitoringMapController extends BaseController {
public ResponseModel<ResultsData> getCompletionOfPowerIndicatorsByProvinceName(@RequestParam(required = true) int current, @RequestParam(required = true) int size, @RequestParam(required = true) String provinceName) {
return ResponseHelper.buildResponse(monitoringServiceImpl.getCompletionOfPowerIndicatorsByProvinceName(current,size,provinceName));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "根据场站id动态获取tab页签")
@GetMapping("/getTabsByStationBasicId")
public ResponseModel<List<TabDto>> getTabsByStationBasicId(@RequestParam(required = true) String stationBasicId) {
return ResponseHelper.buildResponse(monitoringServiceImpl.getTabsByStationBasicId(stationBasicId));
}
}
package com.yeejoin.amos.boot.module.jxiop.biz.dto;
import lombok.Data;
@Data
public class TabDto {
String activeIcon;
String icon;
String text;
String value;
public TabDto(String text,String value){
this.activeIcon="";
this.icon="";
this.text=text;
this.value = value;
}
}
......@@ -107,10 +107,10 @@ public class MonitoringServiceImpl {
regionNationWideDtoList.add(regionNationWideDto);
}
} else {
if(provinceName.contains("%")){
if (provinceName.contains("%")) {
try {
provinceName = URLDecoder.decode(provinceName,"UTF-8");
}catch (Exception e){
provinceName = URLDecoder.decode(provinceName, "UTF-8");
} catch (Exception e) {
}
}
......@@ -168,16 +168,54 @@ public class MonitoringServiceImpl {
CompletionOfPowerIndicatorsDto completionOfPowerIndicatorsDto = new CompletionOfPowerIndicatorsDto();
completionOfPowerIndicatorsDto.setStationName(stationBasic.getStationName());
completionOfPowerIndicatorsDto.setInstallCapactity(String.valueOf(getStationCaPACITYL(stationBasic.getStationNumber())));
completionOfPowerIndicatorsDto.setWindSpeedOrIrradiance(String.valueOf(commonServiceImpl.getAvgvalueByIndicatior(stationBasic.getFanGatewayId(),"30秒平均风速")));
completionOfPowerIndicatorsDto.setActivePower(String.valueOf(commonServiceImpl.getTotalByIndicatior(stationBasic.getFanGatewayId(),"有功功率")));
completionOfPowerIndicatorsDto.setDailyPower(String.valueOf(commonServiceImpl.getTotalByIndicatior(stationBasic.getFanGatewayId(),"日发电量")));
completionOfPowerIndicatorsDto.setMonthlyPower(String.valueOf(commonServiceImpl.getTotalByIndicatior(stationBasic.getFanGatewayId(),"月发电量")));
completionOfPowerIndicatorsDto.setAnnualPower(String.valueOf(commonServiceImpl.getTotalByIndicatior(stationBasic.getFanGatewayId(),"年发电量")));
completionOfPowerIndicatorsDto.setWindSpeedOrIrradiance(String.valueOf(commonServiceImpl.getAvgvalueByIndicatior(stationBasic.getFanGatewayId(), "30秒平均风速")));
completionOfPowerIndicatorsDto.setActivePower(String.valueOf(commonServiceImpl.getTotalByIndicatior(stationBasic.getFanGatewayId(), "有功功率")));
completionOfPowerIndicatorsDto.setDailyPower(String.valueOf(commonServiceImpl.getTotalByIndicatior(stationBasic.getFanGatewayId(), "日发电量")));
completionOfPowerIndicatorsDto.setMonthlyPower(String.valueOf(commonServiceImpl.getTotalByIndicatior(stationBasic.getFanGatewayId(), "月发电量")));
completionOfPowerIndicatorsDto.setAnnualPower(String.valueOf(commonServiceImpl.getTotalByIndicatior(stationBasic.getFanGatewayId(), "年发电量")));
completionOfPowerIndicatorsDtoList.add(completionOfPowerIndicatorsDto);
});
Integer allsize = completionOfPowerIndicatorsDtoList.size();
DataGridMock dataGridMock = new DataGridMock(current, allsize, false, allsize/size+1,completionOfPowerIndicatorsDtoList);
DataGridMock dataGridMock = new DataGridMock(current, allsize, false, allsize / size + 1, completionOfPowerIndicatorsDtoList);
ResultsData resultsData = new ResultsData(dataGridMock, colModels);
return resultsData;
}
public List<TabDto> getTabsByStationBasicId(String stationBasicId) {
StationBasic stationBasic = stationBasicMapper.selectById(stationBasicId);
List<TabDto> tabDtoList = new ArrayList<>();
if (stationBasic.getStationType().contains("FDZ")) {
TabDto tab0 = new TabDto("风机布置图", "0");
TabDto tab1 = new TabDto("集电线路图", "1");
TabDto tab2 = new TabDto("运行列表", "2");
TabDto tab3 = new TabDto("升压站监控", "3");
TabDto tab4 = new TabDto("电量表记", "4");
TabDto tab5 = new TabDto("故障信息", "5");
tabDtoList.add(tab0);
tabDtoList.add(tab1);
tabDtoList.add(tab2);
tabDtoList.add(tab3);
tabDtoList.add(tab4);
tabDtoList.add(tab5);
} else {
TabDto tab6 = new TabDto("光伏区布置图", "6");
TabDto tab7 = new TabDto("集电线路图", "7");
TabDto tab8 = new TabDto("运行列表", "8");
TabDto tab9 = new TabDto("升压站监控", "9");
TabDto tab10 = new TabDto("电量表记", "10");
TabDto tab11 = new TabDto("故障信息", "11");
TabDto tab12 = new TabDto("集中式-离散率", "12");
TabDto tab13 = new TabDto("组串式-离散率", "13");
tabDtoList.add(tab6);
tabDtoList.add(tab7);
tabDtoList.add(tab8);
tabDtoList.add(tab9);
tabDtoList.add(tab10);
tabDtoList.add(tab11);
tabDtoList.add(tab12);
tabDtoList.add(tab13);
}
return tabDtoList;
}
}
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