|
@@ -56,8 +56,6 @@ import com.ufo.project.forecast.shortterm.power.domain.DataShortTermPowerForecas
|
|
|
import com.ufo.project.forecast.shortterm.power.service.IDataShortTermPowerForecastIssuedService;
|
|
import com.ufo.project.forecast.shortterm.power.service.IDataShortTermPowerForecastIssuedService;
|
|
|
import com.ufo.project.forecast.shortterm.weather.domain.DataShortTermWeatherForecastIssued;
|
|
import com.ufo.project.forecast.shortterm.weather.domain.DataShortTermWeatherForecastIssued;
|
|
|
import com.ufo.project.forecast.shortterm.weather.service.IDataShortTermWeatherForecastIssuedService;
|
|
import com.ufo.project.forecast.shortterm.weather.service.IDataShortTermWeatherForecastIssuedService;
|
|
|
-import com.ufo.project.config.domain.ConfigStation;
|
|
|
|
|
-import com.ufo.project.config.service.IConfigStationService;
|
|
|
|
|
import com.ufo.project.model.domain.DataElectricityLocal;
|
|
import com.ufo.project.model.domain.DataElectricityLocal;
|
|
|
import com.ufo.project.model.service.IDataElectricityLocalService;
|
|
import com.ufo.project.model.service.IDataElectricityLocalService;
|
|
|
import com.ufo.project.weather.domain.DataWeatherLocal;
|
|
import com.ufo.project.weather.domain.DataWeatherLocal;
|
|
@@ -102,9 +100,6 @@ public class DataController extends BaseController
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private IPowerErrorStatService powerErrorStatService;
|
|
private IPowerErrorStatService powerErrorStatService;
|
|
|
|
|
|
|
|
- @Autowired
|
|
|
|
|
- private IConfigStationService configStationService;
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* 辐照度功率对比
|
|
* 辐照度功率对比
|
|
|
*/
|
|
*/
|
|
@@ -314,7 +309,7 @@ public class DataController extends BaseController
|
|
|
public TableDataInfo powerFrequencyDistribution(@RequestBody PowerFrequencyDistributionQuery query)
|
|
public TableDataInfo powerFrequencyDistribution(@RequestBody PowerFrequencyDistributionQuery query)
|
|
|
{
|
|
{
|
|
|
List<PowerFrequencyDistributionVO> list = buildFrequencyDistributionList(
|
|
List<PowerFrequencyDistributionVO> list = buildFrequencyDistributionList(
|
|
|
- query.getStationCode(), query.getStartDay(), query.getEndDay());
|
|
|
|
|
|
|
+ query.getStationId(), query.getStartDay(), query.getEndDay());
|
|
|
return getDataTable(list);
|
|
return getDataTable(list);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -327,7 +322,7 @@ public class DataController extends BaseController
|
|
|
public void powerFrequencyDistributionExport(HttpServletResponse response, @RequestBody PowerFrequencyDistributionQuery query)
|
|
public void powerFrequencyDistributionExport(HttpServletResponse response, @RequestBody PowerFrequencyDistributionQuery query)
|
|
|
{
|
|
{
|
|
|
List<PowerFrequencyDistributionVO> list = buildFrequencyDistributionList(
|
|
List<PowerFrequencyDistributionVO> list = buildFrequencyDistributionList(
|
|
|
- query.getStationCode(), query.getStartDay(), query.getEndDay());
|
|
|
|
|
|
|
+ query.getStationId(), query.getStartDay(), query.getEndDay());
|
|
|
ExcelUtil<PowerFrequencyDistributionVO> util = new ExcelUtil<>(PowerFrequencyDistributionVO.class);
|
|
ExcelUtil<PowerFrequencyDistributionVO> util = new ExcelUtil<>(PowerFrequencyDistributionVO.class);
|
|
|
util.exportExcel(response, list, "日功率频率分布统计");
|
|
util.exportExcel(response, list, "日功率频率分布统计");
|
|
|
}
|
|
}
|
|
@@ -399,9 +394,8 @@ public class DataController extends BaseController
|
|
|
* 构建日功率频率分布统计列表(按日分组,无数据的日期补零)
|
|
* 构建日功率频率分布统计列表(按日分组,无数据的日期补零)
|
|
|
* <p>取数区间左闭右开: tm >= startDay 00:00(+08:00), tm < endDay 00:00(+08:00)。</p>
|
|
* <p>取数区间左闭右开: tm >= startDay 00:00(+08:00), tm < endDay 00:00(+08:00)。</p>
|
|
|
*/
|
|
*/
|
|
|
- private List<PowerFrequencyDistributionVO> buildFrequencyDistributionList(String stationCode, String startDay, String endDay)
|
|
|
|
|
|
|
+ private List<PowerFrequencyDistributionVO> buildFrequencyDistributionList(Long stationId, String startDay, String endDay)
|
|
|
{
|
|
{
|
|
|
- Long stationId = resolveStationId(stationCode);
|
|
|
|
|
List<DataElectricityLocal> rows = stationId == null
|
|
List<DataElectricityLocal> rows = stationId == null
|
|
|
? new ArrayList<>()
|
|
? new ArrayList<>()
|
|
|
: electricityLocalService.selectActualPowerRange(stationId, startDay, endDay);
|
|
: electricityLocalService.selectActualPowerRange(stationId, startDay, endDay);
|
|
@@ -432,21 +426,6 @@ public class DataController extends BaseController
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * 场站编码解析为场站id,未匹配返回 null
|
|
|
|
|
- */
|
|
|
|
|
- private Long resolveStationId(String stationCode)
|
|
|
|
|
- {
|
|
|
|
|
- ConfigStation condition = new ConfigStation();
|
|
|
|
|
- condition.setStationCode(stationCode);
|
|
|
|
|
- List<ConfigStation> list = configStationService.selectConfigStationList(condition);
|
|
|
|
|
- if (list == null || list.isEmpty())
|
|
|
|
|
- {
|
|
|
|
|
- return null;
|
|
|
|
|
- }
|
|
|
|
|
- return list.get(0).getId();
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
/*
|
|
/*
|
|
|
* 辐照度累计值报表
|
|
* 辐照度累计值报表
|
|
|
*/
|
|
*/
|