Commit 6d7ec6a6 authored by ZWT's avatar ZWT

feat(能源管理系统): 测试问题修复

1.修改间开制度管理--长期间开优化模块详情接口,优化已优化时间列表查询逻辑;
2.修改间开制度管理--中短期间开优化模块详情接口,优化已优化时间列表查询逻辑;
3.修改间开制度管理--定期校准模块重新校准接口,增加时间限制,超过优化时间不能优化;
4.修改间开制度管理--长期/中短期间开优化离网型算法,优化数据结构;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent 94520344
......@@ -16,6 +16,11 @@ public class BusinessConstant {
*/
public static final String PARENT_OU_ID = "00000000-0000-0000-0000-000000000000";
/**
* 线路标志id
*/
public static final String LINE_FLAG_ID = "000";
/**
* 光伏电站
*/
......
......@@ -131,7 +131,7 @@ public class BaseDieselGeneratorService {
QueryWrapper<BaseDieselGeneratorEnt> queryWrapper = new QueryWrapper<>();
if (StringUtils.isNotEmpty(input.getLineId())) {
queryWrapper.lambda()
.notExists("SELECT 1 FROM base_power_line_diesel w WHERE base_diesel_generator.id = w.diesel_id AND w.is_deleted = 1 AND w.line_id <> {0}", input.getLineId())
.notExists(!StringUtils.equals(BusinessConstant.LINE_FLAG_ID, input.getLineId()), "SELECT 1 FROM base_power_line_diesel w WHERE base_diesel_generator.id = w.diesel_id AND w.is_deleted = 1 AND w.line_id <> {0}", input.getLineId())
.eq(BaseDieselGeneratorEnt::getOuId, input.getOuId());
} else {
List<String> allListByOuId = ServiceUtil.getOrgIdsByPath(context, input.getOuId());
......
......@@ -131,7 +131,7 @@ public class BaseEnergyStorageDeviceService {
QueryWrapper<BaseEnergyStorageDeviceEnt> queryWrapper = new QueryWrapper<>();
if (StringUtils.isNotEmpty(input.getLineId())) {
queryWrapper.lambda()
.notExists("SELECT 1 FROM base_power_line_storage w WHERE base_energy_storage_device.id = w.storage_id AND w.is_deleted = 1 AND w.line_id <> {0}", input.getLineId())
.notExists(!StringUtils.equals(BusinessConstant.LINE_FLAG_ID, input.getLineId()), "SELECT 1 FROM base_power_line_storage w WHERE base_energy_storage_device.id = w.storage_id AND w.is_deleted = 1 AND w.line_id <> {0}", input.getLineId())
.eq(BaseEnergyStorageDeviceEnt::getOuId, input.getOuId());
} else {
List<String> allListByOuId = ServiceUtil.getOrgIdsByPath(context, input.getOuId());
......
......@@ -185,7 +185,7 @@ public class BasePhotovoltaicPlantService {
QueryWrapper<BasePhotovoltaicPlantEnt> queryWrapper = new QueryWrapper<>();
if (StringUtils.isNotEmpty(input.getLineId())) {
queryWrapper.lambda()
.notExists("SELECT 1 FROM base_power_line_plant w WHERE base_photovoltaic_plant.id = w.plant_id AND w.is_deleted = 1 AND w.line_id <> {0}", input.getLineId())
.notExists(!StringUtils.equals(BusinessConstant.LINE_FLAG_ID, input.getLineId()), "SELECT 1 FROM base_power_line_plant w WHERE base_photovoltaic_plant.id = w.plant_id AND w.is_deleted = 1 AND w.line_id <> {0}", input.getLineId())
.eq(BasePhotovoltaicPlantEnt::getOuId, input.getOuId());
} else {
List<String> allListByOuId = ServiceUtil.getOrgIdsByPath(context, input.getOuId());
......
......@@ -134,7 +134,7 @@ public class BaseWellheadService {
QueryWrapper<BaseWellheadEnt> queryWrapper = new QueryWrapper<>();
if (StringUtils.isNotEmpty(input.getLineId())) {
queryWrapper.lambda()
.notExists("SELECT 1 FROM base_power_line_wellhead w WHERE base_wellhead.id = w.wellhead_id AND w.is_deleted = 1 AND w.line_id <> {0}", input.getLineId())
.notExists(!StringUtils.equals(BusinessConstant.LINE_FLAG_ID, input.getLineId()), "SELECT 1 FROM base_power_line_wellhead w WHERE base_wellhead.id = w.wellhead_id AND w.is_deleted = 1 AND w.line_id <> {0}", input.getLineId())
.eq(BaseWellheadEnt::getOuId, input.getOuId());
} else {
List<String> allListByOuId = ServiceUtil.getOrgIdsByPath(context, input.getOuId());
......
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