|
|
@@ -4,37 +4,78 @@
|
|
|
<mapper namespace="com.railway.business.baseinfo.mapper.BusFjxgmdMapper">
|
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.railway.business.baseinfo.domain.BusFjxgmd">
|
|
|
- <result column="id" property="id"/>
|
|
|
- <result column="db" property="db"/>
|
|
|
- <result column="bm" property="bm"/>
|
|
|
- <result column="xb" property="xb"/>
|
|
|
- <result column="qj" property="qj"/>
|
|
|
- <result column="hb" property="hb"/>
|
|
|
- <result column="fjlx" property="fjlx"/>
|
|
|
- <result column="qsglb" property="qsglb"/>
|
|
|
- <result column="qsgh" property="qsgh"/>
|
|
|
- <result column="del_flag" property="delFlag"/>
|
|
|
- <result column="create_by" property="createBy"/>
|
|
|
- <result column="create_time" property="createTime"/>
|
|
|
- <result column="update_by" property="updateBy"/>
|
|
|
- <result column="update_time" property="updateTime"/>
|
|
|
- <result column="dept_name" property="deptName"/>
|
|
|
- <result column="line_name" property="lineName"/>
|
|
|
- <result column="station_name" property="stationName"/>
|
|
|
- <result column="xingbie_text" property="xingbieText"/>
|
|
|
- <result column="fjlx_text" property="fjlxText"/>
|
|
|
+ <result column="id" property="id"/>
|
|
|
+ <result column="dept_id" property="deptId"/>
|
|
|
+ <result column="dept_name" property="deptName"/>
|
|
|
+ <result column="line_id" property="lineId"/>
|
|
|
+ <result column="line_name" property="lineName"/>
|
|
|
+ <result column="station_id" property="stationId"/>
|
|
|
+ <result column="station_name" property="stationName"/>
|
|
|
+ <result column="xingbie" property="xingbie"/>
|
|
|
+ <result column="station_track" property="stationTrack"/>
|
|
|
+ <result column="gxms" property="gxms"/>
|
|
|
+ <result column="fjlx" property="fjlx"/>
|
|
|
+ <result column="mdh" property="mdh"/>
|
|
|
+ <result column="mdcd" property="mdcd"/>
|
|
|
+ <result column="tyrq" property="tyrq"/>
|
|
|
+ <result column="qsglb" property="qsglb"/>
|
|
|
+ <result column="jsglb" property="jsglb"/>
|
|
|
+ <result column="qsgh" property="qsgh"/>
|
|
|
+ <result column="jzgh" property="jzgh"/>
|
|
|
+ <result column="xscz" property="xscz"/>
|
|
|
+ <result column="xsxh" property="xsxh"/>
|
|
|
+ <result column="xszl" property="xszl"/>
|
|
|
+ <result column="xscj" property="xscj"/>
|
|
|
+ <result column="jtsl" property="jtsl"/>
|
|
|
+ <result column="bqsl" property="bqsl"/>
|
|
|
+ <result column="afx" property="afx"/>
|
|
|
+ <result column="blx" property="blx"/>
|
|
|
+ <result column="qt" property="qt"/>
|
|
|
+ <result column="fj" property="fj"/>
|
|
|
+ <result column="sl" property="sl"/>
|
|
|
+ <result column="dw" property="dw"/>
|
|
|
+ <result column="slbh" property="slbh"/>
|
|
|
+ <result column="del_flag" property="delFlag"/>
|
|
|
+ <result column="create_by" property="createBy"/>
|
|
|
+ <result column="create_time" property="createTime"/>
|
|
|
+ <result column="update_by" property="updateBy"/>
|
|
|
+ <result column="update_time" property="updateTime"/>
|
|
|
+ <result column="xingbie_text" property="xingbieText"/>
|
|
|
+ <result column="fjlx_text" property="fjlxText"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
- id,
|
|
|
- db,
|
|
|
- bm,
|
|
|
- xb,
|
|
|
- qj,
|
|
|
- hb,
|
|
|
+ id,
|
|
|
+ dept_id,
|
|
|
+ dept_name,
|
|
|
+ line_id,
|
|
|
+ line_name,
|
|
|
+ station_id,
|
|
|
+ station_name,
|
|
|
+ xingbie,
|
|
|
+ station_track,
|
|
|
+ gxms,
|
|
|
fjlx,
|
|
|
+ mdh,
|
|
|
+ mdcd,
|
|
|
+ tyrq,
|
|
|
qsglb,
|
|
|
+ jsglb,
|
|
|
qsgh,
|
|
|
+ jzgh,
|
|
|
+ xscz,
|
|
|
+ xsxh,
|
|
|
+ xszl,
|
|
|
+ xscj,
|
|
|
+ jtsl,
|
|
|
+ bqsl,
|
|
|
+ afx,
|
|
|
+ blx,
|
|
|
+ qt,
|
|
|
+ fj,
|
|
|
+ sl,
|
|
|
+ dw,
|
|
|
+ slbh,
|
|
|
del_flag,
|
|
|
create_by,
|
|
|
create_time,
|
|
|
@@ -48,86 +89,218 @@
|
|
|
</selectKey>
|
|
|
INSERT INTO bus_fjxgmd
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test ='null != db'>
|
|
|
- db,
|
|
|
- </if>
|
|
|
- <if test ='null != bm'>
|
|
|
- bm,
|
|
|
- </if>
|
|
|
- <if test ='null != xb'>
|
|
|
- xb,
|
|
|
- </if>
|
|
|
- <if test ='null != qj'>
|
|
|
- qj,
|
|
|
- </if>
|
|
|
- <if test ='null != hb'>
|
|
|
- hb,
|
|
|
- </if>
|
|
|
- <if test ='null != fjlx'>
|
|
|
- fjlx,
|
|
|
- </if>
|
|
|
- <if test ='null != qsglb'>
|
|
|
- qsglb,
|
|
|
- </if>
|
|
|
- <if test ='null != qsgh'>
|
|
|
- qsgh,
|
|
|
- </if>
|
|
|
- <if test ='null != delFlag'>
|
|
|
- del_flag,
|
|
|
- </if>
|
|
|
- <if test ='null != createBy'>
|
|
|
- create_by,
|
|
|
- </if>
|
|
|
- <if test ='null != createTime'>
|
|
|
- create_time,
|
|
|
- </if>
|
|
|
- <if test ='null != updateBy'>
|
|
|
- update_by,
|
|
|
- </if>
|
|
|
- <if test ='null != updateTime'>
|
|
|
- update_time
|
|
|
- </if>
|
|
|
+ <if test ='null != deptId'>
|
|
|
+ dept_id,
|
|
|
+ </if>
|
|
|
+ <if test ='null != deptName'>
|
|
|
+ dept_name,
|
|
|
+ </if>
|
|
|
+ <if test ='null != lineId'>
|
|
|
+ line_id,
|
|
|
+ </if>
|
|
|
+ <if test ='null != lineName'>
|
|
|
+ line_name,
|
|
|
+ </if>
|
|
|
+ <if test ='null != stationId'>
|
|
|
+ station_id,
|
|
|
+ </if>
|
|
|
+ <if test ='null != stationName'>
|
|
|
+ station_name,
|
|
|
+ </if>
|
|
|
+ <if test ='null != xingbie'>
|
|
|
+ xingbie,
|
|
|
+ </if>
|
|
|
+ <if test ='null != stationTrack'>
|
|
|
+ station_track,
|
|
|
+ </if>
|
|
|
+ <if test ='null != gxms'>
|
|
|
+ gxms,
|
|
|
+ </if>
|
|
|
+ <if test ='null != fjlx'>
|
|
|
+ fjlx,
|
|
|
+ </if>
|
|
|
+ <if test ='null != mdh'>
|
|
|
+ mdh,
|
|
|
+ </if>
|
|
|
+ <if test ='null != mdcd'>
|
|
|
+ mdcd,
|
|
|
+ </if>
|
|
|
+ <if test ='null != tyrq'>
|
|
|
+ tyrq,
|
|
|
+ </if>
|
|
|
+ <if test ='null != qsglb'>
|
|
|
+ qsglb,
|
|
|
+ </if>
|
|
|
+ <if test ='null != jsglb'>
|
|
|
+ jsglb,
|
|
|
+ </if>
|
|
|
+ <if test ='null != qsgh'>
|
|
|
+ qsgh,
|
|
|
+ </if>
|
|
|
+ <if test ='null != jzgh'>
|
|
|
+ jzgh,
|
|
|
+ </if>
|
|
|
+ <if test ='null != xscz'>
|
|
|
+ xscz,
|
|
|
+ </if>
|
|
|
+ <if test ='null != xsxh'>
|
|
|
+ xsxh,
|
|
|
+ </if>
|
|
|
+ <if test ='null != xszl'>
|
|
|
+ xszl,
|
|
|
+ </if>
|
|
|
+ <if test ='null != xscj'>
|
|
|
+ xscj,
|
|
|
+ </if>
|
|
|
+ <if test ='null != jtsl'>
|
|
|
+ jtsl,
|
|
|
+ </if>
|
|
|
+ <if test ='null != bqsl'>
|
|
|
+ bqsl,
|
|
|
+ </if>
|
|
|
+ <if test ='null != afx'>
|
|
|
+ afx,
|
|
|
+ </if>
|
|
|
+ <if test ='null != blx'>
|
|
|
+ blx,
|
|
|
+ </if>
|
|
|
+ <if test ='null != qt'>
|
|
|
+ qt,
|
|
|
+ </if>
|
|
|
+ <if test ='null != fj'>
|
|
|
+ fj,
|
|
|
+ </if>
|
|
|
+ <if test ='null != sl'>
|
|
|
+ sl,
|
|
|
+ </if>
|
|
|
+ <if test ='null != dw'>
|
|
|
+ dw,
|
|
|
+ </if>
|
|
|
+ <if test ='null != slbh'>
|
|
|
+ slbh,
|
|
|
+ </if>
|
|
|
+ <if test ='null != delFlag'>
|
|
|
+ del_flag,
|
|
|
+ </if>
|
|
|
+ <if test ='null != createBy'>
|
|
|
+ create_by,
|
|
|
+ </if>
|
|
|
+ <if test ='null != createTime'>
|
|
|
+ create_time,
|
|
|
+ </if>
|
|
|
+ <if test ='null != updateBy'>
|
|
|
+ update_by,
|
|
|
+ </if>
|
|
|
+ <if test ='null != updateTime'>
|
|
|
+ update_time
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test ='null != db'>
|
|
|
- #{db},
|
|
|
- </if>
|
|
|
- <if test ='null != bm'>
|
|
|
- #{bm},
|
|
|
- </if>
|
|
|
- <if test ='null != xb'>
|
|
|
- #{xb},
|
|
|
- </if>
|
|
|
- <if test ='null != qj'>
|
|
|
- #{qj},
|
|
|
- </if>
|
|
|
- <if test ='null != hb'>
|
|
|
- #{hb},
|
|
|
- </if>
|
|
|
- <if test ='null != fjlx'>
|
|
|
- #{fjlx},
|
|
|
- </if>
|
|
|
- <if test ='null != qsglb'>
|
|
|
- #{qsglb},
|
|
|
- </if>
|
|
|
- <if test ='null != qsgh'>
|
|
|
- #{qsgh},
|
|
|
- </if>
|
|
|
- <if test ='null != delFlag'>
|
|
|
- #{delFlag},
|
|
|
- </if>
|
|
|
- <if test ='null != createBy'>
|
|
|
- #{createBy},
|
|
|
- </if>
|
|
|
- <if test ='null != createTime'>
|
|
|
- #{createTime},
|
|
|
- </if>
|
|
|
- <if test ='null != updateBy'>
|
|
|
- #{updateBy},
|
|
|
- </if>
|
|
|
- <if test ='null != updateTime'>
|
|
|
- #{updateTime}
|
|
|
- </if>
|
|
|
+ <if test ='null != deptId'>
|
|
|
+ #{deptId},
|
|
|
+ </if>
|
|
|
+ <if test ='null != deptName'>
|
|
|
+ #{deptName},
|
|
|
+ </if>
|
|
|
+ <if test ='null != lineId'>
|
|
|
+ #{lineId},
|
|
|
+ </if>
|
|
|
+ <if test ='null != lineName'>
|
|
|
+ #{lineName},
|
|
|
+ </if>
|
|
|
+ <if test ='null != stationId'>
|
|
|
+ #{stationId},
|
|
|
+ </if>
|
|
|
+ <if test ='null != stationName'>
|
|
|
+ #{stationName},
|
|
|
+ </if>
|
|
|
+ <if test ='null != xingbie'>
|
|
|
+ #{xingbie},
|
|
|
+ </if>
|
|
|
+ <if test ='null != stationTrack'>
|
|
|
+ #{stationTrack},
|
|
|
+ </if>
|
|
|
+ <if test ='null != gxms'>
|
|
|
+ #{gxms},
|
|
|
+ </if>
|
|
|
+ <if test ='null != fjlx'>
|
|
|
+ #{fjlx},
|
|
|
+ </if>
|
|
|
+ <if test ='null != mdh'>
|
|
|
+ #{mdh},
|
|
|
+ </if>
|
|
|
+ <if test ='null != mdcd'>
|
|
|
+ #{mdcd},
|
|
|
+ </if>
|
|
|
+ <if test ='null != tyrq'>
|
|
|
+ #{tyrq},
|
|
|
+ </if>
|
|
|
+ <if test ='null != qsglb'>
|
|
|
+ #{qsglb},
|
|
|
+ </if>
|
|
|
+ <if test ='null != jsglb'>
|
|
|
+ #{jsglb},
|
|
|
+ </if>
|
|
|
+ <if test ='null != qsgh'>
|
|
|
+ #{qsgh},
|
|
|
+ </if>
|
|
|
+ <if test ='null != jzgh'>
|
|
|
+ #{jzgh},
|
|
|
+ </if>
|
|
|
+ <if test ='null != xscz'>
|
|
|
+ #{xscz},
|
|
|
+ </if>
|
|
|
+ <if test ='null != xsxh'>
|
|
|
+ #{xsxh},
|
|
|
+ </if>
|
|
|
+ <if test ='null != xszl'>
|
|
|
+ #{xszl},
|
|
|
+ </if>
|
|
|
+ <if test ='null != xscj'>
|
|
|
+ #{xscj},
|
|
|
+ </if>
|
|
|
+ <if test ='null != jtsl'>
|
|
|
+ #{jtsl},
|
|
|
+ </if>
|
|
|
+ <if test ='null != bqsl'>
|
|
|
+ #{bqsl},
|
|
|
+ </if>
|
|
|
+ <if test ='null != afx'>
|
|
|
+ #{afx},
|
|
|
+ </if>
|
|
|
+ <if test ='null != blx'>
|
|
|
+ #{blx},
|
|
|
+ </if>
|
|
|
+ <if test ='null != qt'>
|
|
|
+ #{qt},
|
|
|
+ </if>
|
|
|
+ <if test ='null != fj'>
|
|
|
+ #{fj},
|
|
|
+ </if>
|
|
|
+ <if test ='null != sl'>
|
|
|
+ #{sl},
|
|
|
+ </if>
|
|
|
+ <if test ='null != dw'>
|
|
|
+ #{dw},
|
|
|
+ </if>
|
|
|
+ <if test ='null != slbh'>
|
|
|
+ #{slbh},
|
|
|
+ </if>
|
|
|
+ <if test ='null != delFlag'>
|
|
|
+ #{delFlag},
|
|
|
+ </if>
|
|
|
+ <if test ='null != createBy'>
|
|
|
+ #{createBy},
|
|
|
+ </if>
|
|
|
+ <if test ='null != createTime'>
|
|
|
+ #{createTime},
|
|
|
+ </if>
|
|
|
+ <if test ='null != updateBy'>
|
|
|
+ #{updateBy},
|
|
|
+ </if>
|
|
|
+ <if test ='null != updateTime'>
|
|
|
+ #{updateTime}
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
@@ -140,19 +313,41 @@
|
|
|
<update id="update" parameterType="com.railway.business.baseinfo.domain.BusFjxgmd">
|
|
|
UPDATE bus_fjxgmd
|
|
|
<set>
|
|
|
- <if test ='null != db'>db = #{db},</if>
|
|
|
- <if test ='null != bm'>bm = #{bm},</if>
|
|
|
- <if test ='null != xb'>xb = #{xb},</if>
|
|
|
- <if test ='null != qj'>qj = #{qj},</if>
|
|
|
- <if test ='null != hb'>hb = #{hb},</if>
|
|
|
- <if test ='null != fjlx'>fjlx = #{fjlx},</if>
|
|
|
- <if test ='null != qsglb'>qsglb = #{qsglb},</if>
|
|
|
- <if test ='null != qsgh'>qsgh = #{qsgh},</if>
|
|
|
- <if test ='null != delFlag'>del_flag = #{delFlag},</if>
|
|
|
- <if test ='null != createBy'>create_by = #{createBy},</if>
|
|
|
- <if test ='null != createTime'>create_time = #{createTime},</if>
|
|
|
- <if test ='null != updateBy'>update_by = #{updateBy},</if>
|
|
|
- <if test ='null != updateTime'>update_time = #{updateTime}</if>
|
|
|
+ <if test ='null != deptId'>dept_id = #{deptId},</if>
|
|
|
+ <if test ='null != deptName'>dept_name = #{deptName},</if>
|
|
|
+ <if test ='null != lineId'>line_id = #{lineId},</if>
|
|
|
+ <if test ='null != lineName'>line_name = #{lineName},</if>
|
|
|
+ <if test ='null != stationId'>station_id = #{stationId},</if>
|
|
|
+ <if test ='null != stationName'>station_name = #{stationName},</if>
|
|
|
+ <if test ='null != xingbie'>xingbie = #{xingbie},</if>
|
|
|
+ <if test ='null != stationTrack'>station_track = #{stationTrack},</if>
|
|
|
+ <if test ='null != gxms'>gxms = #{gxms},</if>
|
|
|
+ <if test ='null != fjlx'>fjlx = #{fjlx},</if>
|
|
|
+ <if test ='null != mdh'>mdh = #{mdh},</if>
|
|
|
+ <if test ='null != mdcd'>mdcd = #{mdcd},</if>
|
|
|
+ <if test ='null != tyrq'>tyrq = #{tyrq},</if>
|
|
|
+ <if test ='null != qsglb'>qsglb = #{qsglb},</if>
|
|
|
+ <if test ='null != jsglb'>jsglb = #{jsglb},</if>
|
|
|
+ <if test ='null != qsgh'>qsgh = #{qsgh},</if>
|
|
|
+ <if test ='null != jzgh'>jzgh = #{jzgh},</if>
|
|
|
+ <if test ='null != xscz'>xscz = #{xscz},</if>
|
|
|
+ <if test ='null != xsxh'>xsxh = #{xsxh},</if>
|
|
|
+ <if test ='null != xszl'>xszl = #{xszl},</if>
|
|
|
+ <if test ='null != xscj'>xscj = #{xscj},</if>
|
|
|
+ <if test ='null != jtsl'>jtsl = #{jtsl},</if>
|
|
|
+ <if test ='null != bqsl'>bqsl = #{bqsl},</if>
|
|
|
+ <if test ='null != afx'>afx = #{afx},</if>
|
|
|
+ <if test ='null != blx'>blx = #{blx},</if>
|
|
|
+ <if test ='null != qt'>qt = #{qt},</if>
|
|
|
+ <if test ='null != fj'>fj = #{fj},</if>
|
|
|
+ <if test ='null != sl'>sl = #{sl},</if>
|
|
|
+ <if test ='null != dw'>dw = #{dw},</if>
|
|
|
+ <if test ='null != slbh'>slbh = #{slbh},</if>
|
|
|
+ <if test ='null != delFlag'>del_flag = #{delFlag},</if>
|
|
|
+ <if test ='null != createBy'>create_by = #{createBy},</if>
|
|
|
+ <if test ='null != createTime'>create_time = #{createTime},</if>
|
|
|
+ <if test ='null != updateBy'>update_by = #{updateBy},</if>
|
|
|
+ <if test ='null != updateTime'>update_time = #{updateTime}</if>
|
|
|
</set>
|
|
|
WHERE id = #{id}
|
|
|
</update>
|
|
|
@@ -160,6 +355,7 @@
|
|
|
|
|
|
<select id="getInfo" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
|
+ distinct
|
|
|
dept.dept_name,
|
|
|
l.line_name,
|
|
|
s.station_name,
|
|
|
@@ -168,141 +364,207 @@
|
|
|
a.*
|
|
|
FROM
|
|
|
bus_fjxgmd a
|
|
|
- LEFT JOIN sys_dept dept ON a.bm = dept.dept_id
|
|
|
- LEFT JOIN bus_line l ON a.xb = l.line_id
|
|
|
- LEFT JOIN bus_station s ON a.qj = s.station_id
|
|
|
- LEFT JOIN sys_dict_data dict1 ON (a.hb = dict1.dict_value AND dict1.dict_type = 'xingbie')
|
|
|
- LEFT JOIN sys_dict_data dict2 ON (a.fjlx = dict2.dict_value AND dict2.dict_type = 'fjlx')
|
|
|
+ LEFT JOIN sys_dept dept ON a.dept_id = dept.dept_id
|
|
|
+ LEFT JOIN bus_line l ON a.line_id = l.line_id
|
|
|
+ LEFT JOIN bus_station s ON a.station_id = s.station_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.fjlx = dict2.dict_value AND dict2.dict_type = 'fjlx')
|
|
|
WHERE
|
|
|
a.del_flag = '0'
|
|
|
- AND dept.del_flag = '0'
|
|
|
- AND l.del_flag = '0'
|
|
|
- AND s.del_flag = '0'
|
|
|
- AND a.id = #{id}
|
|
|
+ AND dept.del_flag = '0'
|
|
|
+ AND l.del_flag = '0'
|
|
|
+ AND s.del_flag = '0'
|
|
|
+ AND a.id = #{id}
|
|
|
</select>
|
|
|
|
|
|
<select id="getList" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
|
- dept.dept_name,
|
|
|
- l.line_name,
|
|
|
- s.station_name,
|
|
|
- dict1.dict_label as xingbie_text,
|
|
|
- dict2.dict_label as fjlx_text,
|
|
|
- a.*
|
|
|
+ dept.dept_name,
|
|
|
+ l.line_name,
|
|
|
+ s.station_name,
|
|
|
+ dict1.dict_label as xingbie_text,
|
|
|
+ dict2.dict_label as fjlx_text,
|
|
|
+ a.*
|
|
|
FROM
|
|
|
- bus_fjxgmd a
|
|
|
- LEFT JOIN sys_dept dept ON a.bm = dept.dept_id
|
|
|
- LEFT JOIN bus_line l ON a.xb = l.line_id
|
|
|
- LEFT JOIN bus_station s ON a.qj = s.station_id
|
|
|
- LEFT JOIN sys_dict_data dict1 ON (a.hb = dict1.dict_value AND dict1.dict_type = 'xingbie')
|
|
|
+ bus_fjxgmd a
|
|
|
+ LEFT JOIN sys_dept dept ON a.dept_id = dept.dept_id
|
|
|
+ LEFT JOIN bus_line l ON a.line_id = l.line_id
|
|
|
+ LEFT JOIN bus_station s ON a.station_id = s.station_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.fjlx = dict2.dict_value AND dict2.dict_type = 'fjlx')
|
|
|
<where>
|
|
|
a.del_flag = '0'
|
|
|
AND dept.del_flag = '0'
|
|
|
AND l.del_flag = '0'
|
|
|
AND s.del_flag = '0'
|
|
|
- <if test="db!=null and db!=''">
|
|
|
- and a.db=#{db}
|
|
|
- </if>
|
|
|
- <if test="bm!=null and bm!=''">
|
|
|
- and a.bm=#{bm}
|
|
|
- </if>
|
|
|
- <if test="xb!=null and xb!=''">
|
|
|
- and a.xb=#{xb}
|
|
|
- </if>
|
|
|
- <if test="qj!=null and qj!=''">
|
|
|
- and a.qj=#{qj}
|
|
|
- </if>
|
|
|
- <if test="hb!=null and hb!=''">
|
|
|
- and a.hb=#{hb}
|
|
|
- </if>
|
|
|
- <if test="fjlx!=null and fjlx!=''">
|
|
|
- and a.fjlx=#{fjlx}
|
|
|
- </if>
|
|
|
- <if test="qsglb!=null and qsglb!=''">
|
|
|
- and a.qsglb=#{qsglb}
|
|
|
- </if>
|
|
|
- <if test="qsgh!=null and qsgh!=''">
|
|
|
- and a.qsgh=#{qsgh}
|
|
|
- </if>
|
|
|
- <if test="delFlag!=null and delFlag!=''">
|
|
|
- and a.del_flag=#{delFlag}
|
|
|
- </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="deptId!=null and deptId!=''">
|
|
|
+ and a.dept_id=#{deptId}
|
|
|
+ </if>
|
|
|
+ <if test="deptName!=null and deptName!=''">
|
|
|
+ and a.dept_name=#{deptName}
|
|
|
+ </if>
|
|
|
+ <if test="lineId!=null and lineId!=''">
|
|
|
+ and a.line_id=#{lineId}
|
|
|
+ </if>
|
|
|
+ <if test="lineName!=null and lineName!=''">
|
|
|
+ and a.line_name=#{lineName}
|
|
|
+ </if>
|
|
|
+ <if test="stationId!=null and stationId!=''">
|
|
|
+ and a.station_id=#{stationId}
|
|
|
+ </if>
|
|
|
+ <if test="stationName!=null and stationName!=''">
|
|
|
+ and a.station_name=#{stationName}
|
|
|
+ </if>
|
|
|
+ <if test="xingbie!=null and xingbie!=''">
|
|
|
+ and a.xingbie=#{xingbie}
|
|
|
+ </if>
|
|
|
+ <if test="stationTrack!=null and stationTrack!=''">
|
|
|
+ and a.station_track=#{stationTrack}
|
|
|
+ </if>
|
|
|
+ <if test="gxms!=null and gxms!=''">
|
|
|
+ and a.gxms=#{gxms}
|
|
|
+ </if>
|
|
|
+ <if test="fjlx!=null and fjlx!=''">
|
|
|
+ and a.fjlx=#{fjlx}
|
|
|
+ </if>
|
|
|
+ <if test="mdh!=null and mdh!=''">
|
|
|
+ and a.mdh=#{mdh}
|
|
|
+ </if>
|
|
|
+ <if test="mdcd!=null and mdcd!=''">
|
|
|
+ and a.mdcd=#{mdcd}
|
|
|
+ </if>
|
|
|
+ <if test="tyrq!=null and tyrq!=''">
|
|
|
+ and a.tyrq=#{tyrq}
|
|
|
+ </if>
|
|
|
+ <if test="qsglb!=null and qsglb!=''">
|
|
|
+ and a.qsglb=#{qsglb}
|
|
|
+ </if>
|
|
|
+ <if test="jsglb!=null and jsglb!=''">
|
|
|
+ and a.jsglb=#{jsglb}
|
|
|
+ </if>
|
|
|
+ <if test="qsgh!=null and qsgh!=''">
|
|
|
+ and a.qsgh=#{qsgh}
|
|
|
+ </if>
|
|
|
+ <if test="jzgh!=null and jzgh!=''">
|
|
|
+ and a.jzgh=#{jzgh}
|
|
|
+ </if>
|
|
|
+ <if test="xscz!=null and xscz!=''">
|
|
|
+ and a.xscz=#{xscz}
|
|
|
+ </if>
|
|
|
+ <if test="xsxh!=null and xsxh!=''">
|
|
|
+ and a.xsxh=#{xsxh}
|
|
|
+ </if>
|
|
|
+ <if test="xszl!=null and xszl!=''">
|
|
|
+ and a.xszl=#{xszl}
|
|
|
+ </if>
|
|
|
+ <if test="xscj!=null and xscj!=''">
|
|
|
+ and a.xscj=#{xscj}
|
|
|
+ </if>
|
|
|
+ <if test="jtsl!=null and jtsl!=''">
|
|
|
+ and a.jtsl=#{jtsl}
|
|
|
+ </if>
|
|
|
+ <if test="bqsl!=null and bqsl!=''">
|
|
|
+ and a.bqsl=#{bqsl}
|
|
|
+ </if>
|
|
|
+ <if test="afx!=null and afx!=''">
|
|
|
+ and a.afx=#{afx}
|
|
|
+ </if>
|
|
|
+ <if test="blx!=null and blx!=''">
|
|
|
+ and a.blx=#{blx}
|
|
|
+ </if>
|
|
|
+ <if test="qt!=null and qt!=''">
|
|
|
+ and a.qt=#{qt}
|
|
|
+ </if>
|
|
|
+ <if test="fj!=null and fj!=''">
|
|
|
+ and a.fj=#{fj}
|
|
|
+ </if>
|
|
|
+ <if test="sl!=null and sl!=''">
|
|
|
+ and a.sl=#{sl}
|
|
|
+ </if>
|
|
|
+ <if test="dw!=null and dw!=''">
|
|
|
+ and a.dw=#{dw}
|
|
|
+ </if>
|
|
|
+ <if test="slbh!=null and slbh!=''">
|
|
|
+ and a.slbh=#{slbh}
|
|
|
+ </if>
|
|
|
+ <if test="delFlag!=null and delFlag!=''">
|
|
|
+ and a.del_flag=#{delFlag}
|
|
|
+ </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>
|
|
|
</where>
|
|
|
+ order by a.dept_id, a.line_id, a.station_id
|
|
|
</select>
|
|
|
|
|
|
<select id="getListByZz" resultMap="BaseResultMap">
|
|
|
SELECT D.* FROM
|
|
|
- (
|
|
|
- SELECT a.id,
|
|
|
- a.qsgh,
|
|
|
- a.qsglb,
|
|
|
- a.db,
|
|
|
- a.bm,
|
|
|
- a.xb,
|
|
|
- a.qj,
|
|
|
- a.hb,
|
|
|
- a.fjlx,
|
|
|
- dept.dept_name,
|
|
|
- l.line_name,
|
|
|
- s.station_name,
|
|
|
- dict1.dict_label AS xingbie_text,
|
|
|
- dict2.dict_label AS fjlx_text,
|
|
|
- ${query.zzfw} AS zzfw
|
|
|
- FROM bus_fjxgmd a
|
|
|
- LEFT JOIN sys_dept dept ON a.bm = dept.dept_id
|
|
|
- LEFT JOIN bus_line l ON a.xb = l.line_id
|
|
|
- LEFT JOIN bus_station s ON a.qj = s.station_id
|
|
|
- LEFT JOIN sys_dict_data dict1 ON (a.hb = dict1.dict_value AND dict1.dict_type = 'xingbie')
|
|
|
- LEFT JOIN sys_dict_data dict2 ON (a.fjlx = dict2.dict_value AND dict2.dict_type = 'fjlx')
|
|
|
- WHERE a.del_flag = '0'
|
|
|
- AND dept.del_flag = '0'
|
|
|
- AND l.del_flag = '0'
|
|
|
- AND s.del_flag = '0'
|
|
|
- ) D ,
|
|
|
- (
|
|
|
- SELECT zzdzxx.zzh
|
|
|
- FROM bus_zzdzxx zzdzxx,
|
|
|
- (
|
|
|
- SELECT zz.id,
|
|
|
- zz.zzh,
|
|
|
- zz.glb
|
|
|
- FROM bus_zzdzxx zz
|
|
|
- WHERE 1 = 1
|
|
|
- <if test="query.qsgh != null and query.qsgh != ''">
|
|
|
- AND zz.zzh = #{query.qsgh}
|
|
|
- </if>
|
|
|
- <if test="query.qsglb != null and query.qsglb != ''">
|
|
|
- AND zz.qlb = #{query.qsglb}
|
|
|
- </if>
|
|
|
- <if test="query.bm != null and query.bm != ''">
|
|
|
- AND zz.bm = #{query.bm}
|
|
|
- </if>
|
|
|
- <if test="query.xb != null and query.xb != ''">
|
|
|
- AND zz.xb = #{query.xb}
|
|
|
- </if>
|
|
|
- <if test="query.qj != null and query.qj != ''">
|
|
|
- AND zz.qj = #{query.qj}
|
|
|
- </if>
|
|
|
- <if test="query.hb != null and query.hb != ''">
|
|
|
- AND zz.hb = #{query.hb}
|
|
|
- </if>
|
|
|
- ) B
|
|
|
- WHERE (zzdzxx.glb + 0.0) BETWEEN (B.glb + 0.0) - (#{query.zzfw} + 0.0) AND (B.glb + 0.0) + (#{query.zzfw} + 0.0)
|
|
|
- ) H
|
|
|
- WHERE D.qsgh = H.zzh
|
|
|
+ (
|
|
|
+ SELECT a.id,
|
|
|
+ a.qsgh,
|
|
|
+ a.qsglb,
|
|
|
+ a.dept_id,
|
|
|
+ a.line_id,
|
|
|
+ a.station_id,
|
|
|
+ a.xingbie,
|
|
|
+ a.fjlx,
|
|
|
+ dept.dept_name,
|
|
|
+ l.line_name,
|
|
|
+ s.station_name,
|
|
|
+ dict1.dict_label AS xingbie_text,
|
|
|
+ dict2.dict_label AS fjlx_text,
|
|
|
+ ${query.zzfw} AS zzfw
|
|
|
+ FROM bus_fjxgmd a
|
|
|
+ LEFT JOIN sys_dept dept ON a.dept_id = dept.dept_id
|
|
|
+ LEFT JOIN bus_line l ON a.line_id = l.line_id
|
|
|
+ LEFT JOIN bus_station s ON a.station_id = s.station_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.fjlx = dict2.dict_value AND dict2.dict_type = 'fjlx')
|
|
|
+ WHERE a.del_flag = '0'
|
|
|
+ AND dept.del_flag = '0'
|
|
|
+ AND l.del_flag = '0'
|
|
|
+ AND s.del_flag = '0'
|
|
|
+ ) D ,
|
|
|
+ (
|
|
|
+ SELECT zzdzxx.pillar_code
|
|
|
+ FROM bus_pillar zzdzxx,
|
|
|
+ (
|
|
|
+ SELECT zz.id,
|
|
|
+ zz.pillar_code,
|
|
|
+ zz.marker
|
|
|
+ FROM bus_pillar zz
|
|
|
+ WHERE 1 = 1
|
|
|
+ <if test="query.qsgh != null and query.qsgh != ''">
|
|
|
+ AND zz.pillar_code = #{query.qsgh}
|
|
|
+ </if>
|
|
|
+ <if test="query.qsglb != null and query.qsglb != ''">
|
|
|
+ AND zz.marker = #{query.qsglb}
|
|
|
+ </if>
|
|
|
+ <if test="query.deptId != null and query.deptId != ''">
|
|
|
+ AND zz.dept_id = #{query.deptId}
|
|
|
+ </if>
|
|
|
+ <if test="query.lineId != null and query.lineId != ''">
|
|
|
+ AND zz.line_id = #{query.lineId}
|
|
|
+ </if>
|
|
|
+ <if test="query.stationId != null and query.stationId != ''">
|
|
|
+ AND zz.station_id = #{query.stationId}
|
|
|
+ </if>
|
|
|
+ <if test="query.xingbie != null and query.xingbie != ''">
|
|
|
+ AND zz.xingbie = #{query.xingbie}
|
|
|
+ </if>
|
|
|
+ ) B
|
|
|
+ WHERE (zzdzxx.marker + 0.0) BETWEEN (B.marker + 0.0) - (#{query.zzfw} + 0.0) AND (B.marker + 0.0) + (#{query.zzfw} + 0.0)
|
|
|
+ ) H
|
|
|
+ WHERE D.qsgh = H.pillar_code
|
|
|
ORDER BY (D.qsgh + 0)
|
|
|
</select>
|
|
|
|