|
|
@@ -25,8 +25,10 @@
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
t.id,
|
|
|
- t.line_id,
|
|
|
+ v.line_id,
|
|
|
+ v.line_name,
|
|
|
t.substation_id,
|
|
|
+ v.substation_name,
|
|
|
t.xingbie,
|
|
|
t.marker,
|
|
|
t.yylx,
|
|
|
@@ -45,9 +47,6 @@
|
|
|
</selectKey>
|
|
|
INSERT INTO base_jlgz
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test='null != lineId'>
|
|
|
- line_id,
|
|
|
- </if>
|
|
|
<if test='null != substationId'>
|
|
|
substation_id,
|
|
|
</if>
|
|
|
@@ -83,9 +82,6 @@
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test='null != lineId'>
|
|
|
- #{lineId},
|
|
|
- </if>
|
|
|
<if test='null != substationId'>
|
|
|
#{substationId},
|
|
|
</if>
|
|
|
@@ -131,7 +127,6 @@
|
|
|
<update id="update" parameterType="com.railway.business.catenary.domain.BusJlgz">
|
|
|
UPDATE base_jlgz
|
|
|
<set>
|
|
|
- <if test='null != lineId'>line_id = #{lineId},</if>
|
|
|
<if test='null != substationId'>substation_id = #{substationId},</if>
|
|
|
<if test='null != xingbie'>xingbie = #{xingbie},</if>
|
|
|
<if test='null != marker'>marker = #{marker},</if>
|
|
|
@@ -150,40 +145,34 @@
|
|
|
SELECT
|
|
|
DISTINCT
|
|
|
line.line_name,
|
|
|
- sub.substation_name,
|
|
|
+ v.substation_name,
|
|
|
dict1.dict_label as xingbie_text,
|
|
|
dict2.dict_label as yylx_text,
|
|
|
<include refid="Base_Column_List"/>
|
|
|
FROM
|
|
|
base_jlgz t
|
|
|
- LEFT JOIN base_line line ON a.line_id = line.line_id
|
|
|
- LEFT JOIN base_substation sub ON a.substation_id = sub.substation_id
|
|
|
+ LEFT JOIN v_substation v ON a.substation_id = v.substation_id
|
|
|
LEFT JOIN sys_dict_data dict1 ON (a.xingbie = dict1.dict_value AND dict1.dict_type = 'xingbie')
|
|
|
LEFT JOIN sys_dict_data dict2 ON (a.yylx = dict2.dict_value AND dict2.dict_type = 'gzyy')
|
|
|
WHERE
|
|
|
t.del_flag = '0'
|
|
|
- AND line.del_flag = '0'
|
|
|
- AND sub.del_flag = '0'
|
|
|
AND t.id = #{id}
|
|
|
</select>
|
|
|
|
|
|
<select id="getList" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
|
- line.line_name,
|
|
|
- sub.substation_name,
|
|
|
+ v.line_name,
|
|
|
+ v.substation_name,
|
|
|
dict1.dict_label as xingbie_text,
|
|
|
dict2.dict_label as yylx_text,
|
|
|
<include refid="Base_Column_List"/>
|
|
|
FROM
|
|
|
base_jlgz t
|
|
|
- LEFT JOIN base_line line ON t.line_id = line.line_id
|
|
|
- LEFT JOIN base_substation sub ON t.substation_id = sub.substation_id
|
|
|
+ LEFT JOIN base_substation v ON t.substation_id = v.substation_id
|
|
|
LEFT JOIN sys_dict_data dict1 ON (t.xingbie = dict1.dict_value AND dict1.dict_type = 'xingbie')
|
|
|
LEFT JOIN sys_dict_data dict2 ON (t.yylx = dict2.dict_value AND dict2.dict_type = 'gzyy')
|
|
|
<where>
|
|
|
t.del_flag = '0'
|
|
|
- AND line.del_flag = '0'
|
|
|
- AND sub.del_flag = '0'
|
|
|
AND dict1.status = '0'
|
|
|
AND dict2.status = '0'
|
|
|
<if test="lineId!=null and lineId!=''">
|
|
|
@@ -245,16 +234,15 @@
|
|
|
(
|
|
|
SELECT
|
|
|
v.line_name,
|
|
|
- sub.substation_name,
|
|
|
+ v.substation_name,
|
|
|
dict1.dict_label as xingbie_text,
|
|
|
dict2.dict_label as yylx_text,
|
|
|
<include refid="Base_Column_List"/>
|
|
|
FROM base_jlgz t
|
|
|
- LEFT JOIN v_substation sub ON t.substation_id = sub.substation_id
|
|
|
+ LEFT JOIN v_substation v ON t.substation_id = v.substation_id
|
|
|
LEFT JOIN sys_dict_data dict1 ON (t.xingbie = dict1.dict_value AND dict1.dict_type = 'xingbie')
|
|
|
LEFT JOIN sys_dict_data dict2 ON (t.yylx = dict2.dict_value AND dict2.dict_type = 'gzyy')
|
|
|
WHERE t.del_flag = '0'
|
|
|
- AND sub.del_flag = '0'
|
|
|
) D,
|
|
|
(
|
|
|
SELECT
|