|
@@ -239,52 +239,58 @@
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="getListByZz" resultType="com.railway.business.catenary.domain.vo.BusJlgzListByZzVo">
|
|
<select id="getListByZz" resultType="com.railway.business.catenary.domain.vo.BusJlgzListByZzVo">
|
|
|
- SELECT dictYylx.dict_value as yylx, dictYylx.dict_label as yylxText, ifnull(res.total,0) as
|
|
|
|
|
- total FROM (
|
|
|
|
|
- SELECT jlgz.yylx, jlgz.yylx_text as yylxText, count(1) as total FROM (
|
|
|
|
|
- SELECT D.* FROM (
|
|
|
|
|
- SELECT line.line_name,
|
|
|
|
|
- sub.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 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'
|
|
|
|
|
- ) D,
|
|
|
|
|
- (
|
|
|
|
|
- SELECT distinct zzdzxx.marker
|
|
|
|
|
- FROM base_pillar zzdzxx,
|
|
|
|
|
|
|
+ SELECT dictYylx.dict_value as yylx, dictYylx.dict_label as yylxText, ifnull(res.total,0) as total FROM
|
|
|
(
|
|
(
|
|
|
- SELECT zz.id,
|
|
|
|
|
- zz.pillar_code,
|
|
|
|
|
- zz.marker
|
|
|
|
|
- FROM base_pillar zz
|
|
|
|
|
- WHERE 1 = 1
|
|
|
|
|
- <if test="query.lineId != null and query.lineId != ''">
|
|
|
|
|
- AND zz.line_id = #{query.lineId}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="query.xingbie != null and query.xingbie != ''">
|
|
|
|
|
- AND zz.xingbie = #{query.xingbie}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="query.pillarCode != null and query.pillarCode != ''">
|
|
|
|
|
- AND zz.pillar_code = #{query.pillarCode}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="query.marker != null and query.marker != ''">
|
|
|
|
|
- AND zz.marker = #{query.marker}
|
|
|
|
|
- </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
|
|
|
|
|
- WHERE D.marker = H.marker
|
|
|
|
|
- ) jlgz
|
|
|
|
|
- GROUP BY jlgz.yylx
|
|
|
|
|
|
|
+ SELECT jlgz.yylx, jlgz.yylx_text as yylxText, count(1) as total FROM
|
|
|
|
|
+ (
|
|
|
|
|
+ SELECT D.* FROM
|
|
|
|
|
+ (
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ line.line_name,
|
|
|
|
|
+ sub.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 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'
|
|
|
|
|
+ ) D,
|
|
|
|
|
+ (
|
|
|
|
|
+ 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.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.xingbie != null and query.xingbie != ''">
|
|
|
|
|
+ AND zz.xingbie = #{query.xingbie}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="query.pillarCode != null and query.pillarCode != ''">
|
|
|
|
|
+ AND zz.pillar_code = #{query.pillarCode}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="query.marker != null and query.marker != ''">
|
|
|
|
|
+ AND zz.marker = #{query.marker}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ AND (zz.marker + 0.0) BETWEEN (zz.marker + 0.0) - (#{query.pillarArea} + 0.0)
|
|
|
|
|
+ AND (zz.marker + 0.0) + (#{query.pillarArea} + 0.0)
|
|
|
|
|
+ ) H
|
|
|
|
|
+ WHERE D.marker = H.marker
|
|
|
|
|
+ ) jlgz
|
|
|
|
|
+ GROUP BY jlgz.yylx
|
|
|
) res right join sys_dict_data dictYylx on res.yylx = dictYylx.dict_value
|
|
) res right join sys_dict_data dictYylx on res.yylx = dictYylx.dict_value
|
|
|
where dictYylx.dict_type = 'gzyy'
|
|
where dictYylx.dict_type = 'gzyy'
|
|
|
</select>
|
|
</select>
|