|
|
@@ -17,6 +17,9 @@
|
|
|
<result column="update_by" property="updateBy"/>
|
|
|
<result column="update_time" property="updateTime"/>
|
|
|
<result column="del_flag" property="delFlag"/>
|
|
|
+ <result column="line_name" property="lineName"/>
|
|
|
+ <result column="substation_name" property="substationName"/>
|
|
|
+ <result column="yylx_text" property="yylxText"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
@@ -146,56 +149,77 @@
|
|
|
|
|
|
<select id="getInfo" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
|
- <include refid="Base_Column_List"/>
|
|
|
- FROM bus_jlgz
|
|
|
- WHERE del_flag='0' and id = #{id}
|
|
|
-
|
|
|
+ line.line_name,
|
|
|
+ sub.substation_name,
|
|
|
+ dict.dict_label as yylx_text,
|
|
|
+ a.*
|
|
|
+ FROM
|
|
|
+ bus_jlgz a
|
|
|
+ LEFT JOIN bus_line line ON a.xb = line.line_id
|
|
|
+ LEFT JOIN bus_substation sub ON a.sb = sub.substation_id
|
|
|
+ LEFT JOIN sys_dict_data dict on a.yylx = dict.dict_value
|
|
|
+ WHERE
|
|
|
+ a.del_flag = '0'
|
|
|
+ AND line.del_flag = '0'
|
|
|
+ AND sub.del_flag = '0'
|
|
|
+ AND dict.dict_type = 'gzyy'
|
|
|
+ AND a.id = #{id}
|
|
|
</select>
|
|
|
|
|
|
<select id="getList" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
|
- <include refid="Base_Column_List"/>
|
|
|
- FROM bus_jlgz
|
|
|
+ line.line_name,
|
|
|
+ sub.substation_name,
|
|
|
+ dict.dict_label as yylx_text,
|
|
|
+ a.*
|
|
|
+ FROM
|
|
|
+ bus_jlgz a
|
|
|
+ LEFT JOIN bus_line line ON a.xb = line.line_id
|
|
|
+ LEFT JOIN bus_substation sub ON a.sb = sub.substation_id
|
|
|
+ LEFT JOIN sys_dict_data dict on a.yylx = dict.dict_value
|
|
|
<where>
|
|
|
- del_flag='0'
|
|
|
- <if test="xb!=null and xb!=''">
|
|
|
- and xb=#{xb}
|
|
|
- </if>
|
|
|
- <if test="sb!=null and sb!=''">
|
|
|
- and sb=#{sb}
|
|
|
- </if>
|
|
|
- <if test="hb!=null and hb!=''">
|
|
|
- and hb=#{hb}
|
|
|
- </if>
|
|
|
- <if test="glb!=null and glb!=''">
|
|
|
- and glb=#{glb}
|
|
|
- </if>
|
|
|
- <if test="yylx!=null and yylx!=''">
|
|
|
- and yylx=#{yylx}
|
|
|
- </if>
|
|
|
- <if test="jlrq!=null and jlrq!=''">
|
|
|
- and jlrq=#{jlrq}
|
|
|
- </if>
|
|
|
- <if test="gzms!=null and gzms!=''">
|
|
|
- and gzms=#{gzms}
|
|
|
- </if>
|
|
|
- <if test="createBy!=null and createBy!=''">
|
|
|
- and create_by=#{createBy}
|
|
|
- </if>
|
|
|
- <if test="createTime!=null and createTime!=''">
|
|
|
- and create_time=#{createTime}
|
|
|
- </if>
|
|
|
- <if test="updateBy!=null and updateBy!=''">
|
|
|
- and update_by=#{updateBy}
|
|
|
- </if>
|
|
|
- <if test="updateTime!=null and updateTime!=''">
|
|
|
- and update_time=#{updateTime}
|
|
|
- </if>
|
|
|
- <if test="delFlag!=null and delFlag!=''">
|
|
|
- and del_flag=#{delFlag}
|
|
|
- </if>
|
|
|
+ a.del_flag = '0'
|
|
|
+ AND line.del_flag = '0'
|
|
|
+ AND sub.del_flag = '0'
|
|
|
+ AND dict.dict_type = 'gzyy'
|
|
|
+ <if test="xb!=null and xb!=''">
|
|
|
+ and a.xb=#{xb}
|
|
|
+ </if>
|
|
|
+ <if test="sb!=null and sb!=''">
|
|
|
+ and a.sb=#{sb}
|
|
|
+ </if>
|
|
|
+ <if test="hb!=null and hb!=''">
|
|
|
+ and a.hb=#{hb}
|
|
|
+ </if>
|
|
|
+ <if test="glb!=null and glb!=''">
|
|
|
+ and a.glb=#{glb}
|
|
|
+ </if>
|
|
|
+ <if test="yylx!=null and yylx!=''">
|
|
|
+ and a.yylx=#{yylx}
|
|
|
+ </if>
|
|
|
+ <if test="jlrq!=null and jlrq!=''">
|
|
|
+ and a.jlrq=#{jlrq}
|
|
|
+ </if>
|
|
|
+ <if test="gzms!=null and gzms!=''">
|
|
|
+ and a.gzms=#{gzms}
|
|
|
+ </if>
|
|
|
+ <if test="createBy!=null and createBy!=''">
|
|
|
+ and a.create_by=#{createBy}
|
|
|
+ </if>
|
|
|
+ <if test="createTime!=null and createTime!=''">
|
|
|
+ and a.create_time=#{createTime}
|
|
|
+ </if>
|
|
|
+ <if test="updateBy!=null and updateBy!=''">
|
|
|
+ and a.update_by=#{updateBy}
|
|
|
+ </if>
|
|
|
+ <if test="updateTime!=null and updateTime!=''">
|
|
|
+ and a.update_time=#{updateTime}
|
|
|
+ </if>
|
|
|
+ <if test="delFlag!=null and delFlag!=''">
|
|
|
+ and a.del_flag=#{delFlag}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
- order by jlrq desc
|
|
|
+ order by a.jlrq desc
|
|
|
</select>
|
|
|
|
|
|
</mapper>
|