|
@@ -161,16 +161,16 @@
|
|
|
|
|
|
|
|
<select id="getList" resultMap="BaseResultMap">
|
|
<select id="getList" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
SELECT
|
|
|
- v.dept_name,
|
|
|
|
|
- v.line_name,
|
|
|
|
|
- v.station_name,
|
|
|
|
|
- v.dept_id,
|
|
|
|
|
- v.line_id,
|
|
|
|
|
- dict1.dict_label as xingbie_text,
|
|
|
|
|
- dict2.dict_label as fjlx_text,
|
|
|
|
|
|
|
+ v.dept_name,
|
|
|
|
|
+ v.line_name,
|
|
|
|
|
+ v.station_name,
|
|
|
|
|
+ v.dept_id,
|
|
|
|
|
+ v.line_id,
|
|
|
|
|
+ dict1.dict_label as xingbie_text,
|
|
|
|
|
+ dict2.dict_label as fjlx_text,
|
|
|
<include refid="Base_Column_List"/>
|
|
<include refid="Base_Column_List"/>
|
|
|
FROM
|
|
FROM
|
|
|
- base_fjxgmd t
|
|
|
|
|
|
|
+ base_fjxgmd t
|
|
|
LEFT JOIN v_station v ON t.station_id = v.station_id
|
|
LEFT JOIN v_station v ON t.station_id = v.station_id
|
|
|
LEFT JOIN sys_dict_data dict1 ON (t.xingbie = dict1.dict_value AND dict1.dict_type = 'xingbie')
|
|
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.fjlx = dict2.dict_value AND dict2.dict_type = 'fjlx')
|
|
LEFT JOIN sys_dict_data dict2 ON (t.fjlx = dict2.dict_value AND dict2.dict_type = 'fjlx')
|
|
@@ -199,6 +199,9 @@
|
|
|
<if test="qsgh!=null and qsgh!=''">
|
|
<if test="qsgh!=null and qsgh!=''">
|
|
|
and t.qsgh=#{qsgh}
|
|
and t.qsgh=#{qsgh}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="pillarArea!=null and pillarArea!=''">
|
|
|
|
|
+ and t.qsglb BETWEEN (t.qsglb + 0.0) - (#{pillarArea} + 0.0) AND (t.qsglb + 0.0) + (#{pillarArea} + 0.0)
|
|
|
|
|
+ </if>
|
|
|
<if test="delFlag!=null and delFlag!=''">
|
|
<if test="delFlag!=null and delFlag!=''">
|
|
|
and t.del_flag=#{delFlag}
|
|
and t.del_flag=#{delFlag}
|
|
|
</if>
|
|
</if>
|
|
@@ -220,56 +223,56 @@
|
|
|
<select id="getListByZz" resultMap="BaseResultMap">
|
|
<select id="getListByZz" resultMap="BaseResultMap">
|
|
|
SELECT D.* FROM
|
|
SELECT D.* FROM
|
|
|
(
|
|
(
|
|
|
- SELECT a.id,
|
|
|
|
|
- a.qsgh,
|
|
|
|
|
- a.qsglb,
|
|
|
|
|
- v.dept_id,
|
|
|
|
|
- v.station_name,
|
|
|
|
|
- a.station_id,
|
|
|
|
|
- a.xingbie,
|
|
|
|
|
- a.fjlx,
|
|
|
|
|
- v.dept_name,
|
|
|
|
|
- v.line_name,
|
|
|
|
|
- dict1.dict_label AS xingbie_text,
|
|
|
|
|
- dict2.dict_label AS fjlx_text,
|
|
|
|
|
- ${query.pillarArea} AS pillar_area
|
|
|
|
|
- FROM base_fjxgmd a
|
|
|
|
|
- LEFT JOIN v_station v ON a.station_id = v.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'
|
|
|
|
|
|
|
+ SELECT a.id,
|
|
|
|
|
+ a.qsgh,
|
|
|
|
|
+ a.qsglb,
|
|
|
|
|
+ v.dept_id,
|
|
|
|
|
+ v.station_name,
|
|
|
|
|
+ a.station_id,
|
|
|
|
|
+ a.xingbie,
|
|
|
|
|
+ a.fjlx,
|
|
|
|
|
+ v.dept_name,
|
|
|
|
|
+ v.line_name,
|
|
|
|
|
+ dict1.dict_label AS xingbie_text,
|
|
|
|
|
+ dict2.dict_label AS fjlx_text,
|
|
|
|
|
+ ${query.pillarArea} AS pillar_area
|
|
|
|
|
+ FROM base_fjxgmd a
|
|
|
|
|
+ LEFT JOIN v_station v ON a.station_id = v.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'
|
|
|
) D ,
|
|
) D ,
|
|
|
(
|
|
(
|
|
|
- SELECT zzdzxx.pillar_code
|
|
|
|
|
- FROM base_pillar zzdzxx,
|
|
|
|
|
- (
|
|
|
|
|
- SELECT zz.id,
|
|
|
|
|
- zz.pillar_code,
|
|
|
|
|
- zz.marker
|
|
|
|
|
- FROM base_pillar zz
|
|
|
|
|
- LEFT JOIN v_station v ON zz.station_id = v.station_id
|
|
|
|
|
- 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 v.dept_id = #{query.deptId}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="query.lineId != null and query.lineId != ''">
|
|
|
|
|
- AND v.line_id = #{query.lineId}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="query.stationId != null and query.stationId != ''">
|
|
|
|
|
- AND v.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.pillarArea} + 0.0) AND (B.marker + 0.0) +
|
|
|
|
|
- (#{query.pillarArea} + 0.0)
|
|
|
|
|
|
|
+ SELECT zzdzxx.pillar_code
|
|
|
|
|
+ FROM base_pillar zzdzxx,
|
|
|
|
|
+ (
|
|
|
|
|
+ SELECT zz.id,
|
|
|
|
|
+ zz.pillar_code,
|
|
|
|
|
+ zz.marker
|
|
|
|
|
+ FROM base_pillar zz
|
|
|
|
|
+ LEFT JOIN v_station v ON zz.station_id = v.station_id
|
|
|
|
|
+ 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 v.dept_id = #{query.deptId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="query.lineId != null and query.lineId != ''">
|
|
|
|
|
+ AND v.line_id = #{query.lineId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="query.stationId != null and query.stationId != ''">
|
|
|
|
|
+ AND v.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.pillarArea} + 0.0) AND (B.marker + 0.0) +
|
|
|
|
|
+ (#{query.pillarArea} + 0.0)
|
|
|
) H
|
|
) H
|
|
|
WHERE D.qsgh = H.pillar_code
|
|
WHERE D.qsgh = H.pillar_code
|
|
|
ORDER BY (D.qsgh + 0)
|
|
ORDER BY (D.qsgh + 0)
|