|
@@ -62,13 +62,13 @@
|
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
|
|
<select id="getDeviceInfoById" resultType="com.hdkj.lt.modle.vo.svg.FeederBaseVO">
|
|
<select id="getDeviceInfoById" resultType="com.hdkj.lt.modle.vo.svg.FeederBaseVO">
|
|
|
- select f.psr_id, f.name, ifnull(s.LABEL,f.city) city, ifnull(s.BAK_2,f.city_name) city_name
|
|
|
|
|
|
|
+ select f.psr_id, f.name, ifnull(s.dict_label,f.city) city, ifnull(s.,f.city_name) city_name
|
|
|
from dwd_shb_ds_feeder_base f
|
|
from dwd_shb_ds_feeder_base f
|
|
|
inner join (select a.feeder, a.feeder_name from t_feeder_topo a
|
|
inner join (select a.feeder, a.feeder_name from t_feeder_topo a
|
|
|
join t_feeder_topo b on a.psr_id=b.psr_id where b.normal_open='true' and b.feeder=#{feederId}
|
|
join t_feeder_topo b on a.psr_id=b.psr_id where b.normal_open='true' and b.feeder=#{feederId}
|
|
|
union select psr_id, `name` from dwd_shb_ds_feeder_base t where psr_id = #{feederId}
|
|
union select psr_id, `name` from dwd_shb_ds_feeder_base t where psr_id = #{feederId}
|
|
|
- ) p on f.psr_id = p.feeder left join SYS_DICT_SINGLE s on f.city = s.VALUE
|
|
|
|
|
- left join SYS_DICT_TYPE t on s.TYPE_ID = t.TYPE_ID and t.TYPE_NAME = 'custom_storage'
|
|
|
|
|
|
|
+ ) p on f.psr_id = p.feeder left join sys_dict_data s on f.city = s.dict_value
|
|
|
|
|
+ left join sys_dict_type t on s.dict_type = t.dict_type and t.dict_type = 'custom_storage'
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="getSwitchInfoById" resultType="com.hdkj.lt.modle.dto.svg.AppendSwitchDTO">
|
|
<select id="getSwitchInfoById" resultType="com.hdkj.lt.modle.dto.svg.AppendSwitchDTO">
|
|
@@ -118,37 +118,37 @@
|
|
|
<choose>
|
|
<choose>
|
|
|
<!-- objType:5-调优事件,6-调优方案 -->
|
|
<!-- objType:5-调优事件,6-调优方案 -->
|
|
|
<when test='objType == "5"'>
|
|
<when test='objType == "5"'>
|
|
|
- SELECT f.psr_id, f.name, ifnull(s.LABEL,f.city) city, ifnull(s.BAK_2,f.city_name) city_name
|
|
|
|
|
|
|
+ SELECT f.psr_id, f.name, ifnull(s.dict_label,f.city) city, ifnull(s.bak2,f.city_name) city_name
|
|
|
from dwd_shb_ds_feeder_base f
|
|
from dwd_shb_ds_feeder_base f
|
|
|
join fhzg_operation_abnormality_line_loadfactor_loss x on f.psr_id = x.psr_id
|
|
join fhzg_operation_abnormality_line_loadfactor_loss x on f.psr_id = x.psr_id
|
|
|
- left join SYS_DICT_SINGLE s on f.city = s.VALUE
|
|
|
|
|
- left join SYS_DICT_TYPE t on s.TYPE_ID = t.TYPE_ID and t.TYPE_NAME = 'custom_storage'
|
|
|
|
|
|
|
+ left join sys_dict_data s on f.city = s.dict_value
|
|
|
|
|
+ left join sys_dict_type t on s.dict_type = t.dict_type and t.dict_type = 'custom_storage'
|
|
|
where x.oa_id = #{objId}
|
|
where x.oa_id = #{objId}
|
|
|
</when>
|
|
</when>
|
|
|
<when test='objType == "7"'>
|
|
<when test='objType == "7"'>
|
|
|
- SELECT distinct f.psr_id, f.name, ifnull(s.LABEL,f.city) city, ifnull(s.BAK_2,f.city_name) city_name
|
|
|
|
|
|
|
+ SELECT distinct f.psr_id, f.name, ifnull(s.dict_label,f.city) city, ifnull(s.bak2,f.city_name) city_name
|
|
|
from dwd_shb_ds_feeder_base f
|
|
from dwd_shb_ds_feeder_base f
|
|
|
join fhzg_voltage_limit_violation_transfer_scheme_detail x on f.psr_id = x.line_id
|
|
join fhzg_voltage_limit_violation_transfer_scheme_detail x on f.psr_id = x.line_id
|
|
|
- left join SYS_DICT_SINGLE s on f.city = s.VALUE
|
|
|
|
|
- left join SYS_DICT_TYPE t on s.TYPE_ID = t.TYPE_ID and t.TYPE_NAME = 'custom_storage'
|
|
|
|
|
|
|
+ left join sys_dict_data s on f.city = s.dict_value
|
|
|
|
|
+ left join sys_dict_type t on s.dict_type = t.dict_type and t.dict_type = 'custom_storage'
|
|
|
where x.limit_id = #{objId} and (x.line_tag = 1 or x.line_tag = 0)
|
|
where x.limit_id = #{objId} and (x.line_tag = 1 or x.line_tag = 0)
|
|
|
</when>
|
|
</when>
|
|
|
<when test='objType == "8"'>
|
|
<when test='objType == "8"'>
|
|
|
- SELECT distinct f.psr_id, f.name, ifnull(s.LABEL,f.city) city, ifnull(s.BAK_2,f.city_name) city_name
|
|
|
|
|
|
|
+ SELECT distinct f.psr_id, f.name, ifnull(s.dict_label,f.city) city, ifnull(s.bak2,f.city_name) city_name
|
|
|
from dwd_shb_ds_feeder_base f
|
|
from dwd_shb_ds_feeder_base f
|
|
|
join fhzg_voltage_limit_violation_transfer_scheme_detail x on f.psr_id = x.line_id
|
|
join fhzg_voltage_limit_violation_transfer_scheme_detail x on f.psr_id = x.line_id
|
|
|
join fhzg_info_limit_transfer_scheme y on x.limit_id = y.limit_id
|
|
join fhzg_info_limit_transfer_scheme y on x.limit_id = y.limit_id
|
|
|
- left join SYS_DICT_SINGLE s on f.city = s.VALUE
|
|
|
|
|
- left join SYS_DICT_TYPE t on s.TYPE_ID = t.TYPE_ID and t.TYPE_NAME = 'custom_storage'
|
|
|
|
|
|
|
+ left join sys_dict_data s on f.city = s.dict_value
|
|
|
|
|
+ left join sys_dict_type t on s.dict_type = t.dict_type and t.dict_type = 'custom_storage'
|
|
|
where y.id = #{objId} and (x.line_tag = 1 or x.line_tag = 0)
|
|
where y.id = #{objId} and (x.line_tag = 1 or x.line_tag = 0)
|
|
|
</when>
|
|
</when>
|
|
|
<otherwise>
|
|
<otherwise>
|
|
|
- SELECT f.psr_id, f.name, ifnull(s.LABEL,f.city) city, ifnull(s.BAK_2,f.city_name) city_name
|
|
|
|
|
|
|
+ SELECT f.psr_id, f.name, ifnull(s.dict_label,f.city) city, ifnull(s.bak2,f.city_name) city_name
|
|
|
from dwd_shb_ds_feeder_base f
|
|
from dwd_shb_ds_feeder_base f
|
|
|
join fhzg_operation_abnormality_line_loadfactor_loss x on f.psr_id = x.psr_id
|
|
join fhzg_operation_abnormality_line_loadfactor_loss x on f.psr_id = x.psr_id
|
|
|
join fhzg_operation_abnormality_transfer_scheme y on x.oa_id = y.oa_id
|
|
join fhzg_operation_abnormality_transfer_scheme y on x.oa_id = y.oa_id
|
|
|
- left join SYS_DICT_SINGLE s on f.city = s.VALUE
|
|
|
|
|
- left join SYS_DICT_TYPE t on s.TYPE_ID = t.TYPE_ID and t.TYPE_NAME = 'custom_storage'
|
|
|
|
|
|
|
+ left join sys_dict_data s on f.city = s.dict_value
|
|
|
|
|
+ left join sys_dict_type t on s.dict_type = t.dict_type and t.dict_type = 'custom_storage'
|
|
|
where y.id = #{objId}
|
|
where y.id = #{objId}
|
|
|
</otherwise>
|
|
</otherwise>
|
|
|
</choose>
|
|
</choose>
|
|
@@ -203,11 +203,11 @@
|
|
|
with station_feeder as (
|
|
with station_feeder as (
|
|
|
select f.start_station station, f.start_station_name station_name, f.ctime,
|
|
select f.start_station station, f.start_station_name station_name, f.ctime,
|
|
|
f.psr_id feeder, f.`name` feeder_name, tft.psr_id, tft.name psr_name,
|
|
f.psr_id feeder, f.`name` feeder_name, tft.psr_id, tft.name psr_name,
|
|
|
- ifnull(s.LABEL,f.city) city, ifnull(s.BAK_2,f.city_name) city_name
|
|
|
|
|
|
|
+ ifnull(s.dict_label,f.city) city, ifnull(s.bak2,f.city_name) city_name
|
|
|
from dwd_shb_ds_feeder_base f left join (select distinct feeder,psr_id,`name`
|
|
from dwd_shb_ds_feeder_base f left join (select distinct feeder,psr_id,`name`
|
|
|
from t_feeder_topo where normal_open = 'true') tft on f.psr_id = tft.feeder
|
|
from t_feeder_topo where normal_open = 'true') tft on f.psr_id = tft.feeder
|
|
|
- left join SYS_DICT_SINGLE s on f.city = s.VALUE
|
|
|
|
|
- left join SYS_DICT_TYPE t on s.TYPE_ID = t.TYPE_ID and t.TYPE_NAME = 'custom_storage'
|
|
|
|
|
|
|
+ left join sys_dict_data s on f.city = s.dict_value
|
|
|
|
|
+ left join sys_dict_type t on s.dict_type = t.dict_type and t.dict_type = 'custom_storage'
|
|
|
where f.psr_state = '20' and f.pub_priv_flag = '0'
|
|
where f.psr_state = '20' and f.pub_priv_flag = '0'
|
|
|
and f.start_station in <foreach collection="stationIds" open="(" item="station" separator="," close=")">#{station}</foreach>
|
|
and f.start_station in <foreach collection="stationIds" open="(" item="station" separator="," close=")">#{station}</foreach>
|
|
|
) select station,station_name,feeder,feeder_name,psr_id,psr_name,switch_state,city,city_name,station_type
|
|
) select station,station_name,feeder,feeder_name,psr_id,psr_name,switch_state,city,city_name,station_type
|