|
@@ -15,7 +15,8 @@
|
|
case when is_gzdx = 'Y' then '是' else '否' end is_gzdx,
|
|
case when is_gzdx = 'Y' then '是' else '否' end is_gzdx,
|
|
case when last_is_xjcg = 'Y' then '是' else '否' end last_is_xjcg,
|
|
case when last_is_xjcg = 'Y' then '是' else '否' end last_is_xjcg,
|
|
gjwhxms, zyrj, kzrq, sxrq, yxq, sxyy, qgzfh, zsltbqk,
|
|
gjwhxms, zyrj, kzrq, sxrq, yxq, sxyy, qgzfh, zsltbqk,
|
|
- d.unitname dwmc, c.blockname dymc
|
|
|
|
|
|
+ d.unitname dwmc, c.blockname dymc,
|
|
|
|
+ rownum xh
|
|
from
|
|
from
|
|
water_failure_reason a
|
|
water_failure_reason a
|
|
left join sys_flag b on a.gylx = b.flag_code
|
|
left join sys_flag b on a.gylx = b.flag_code
|
|
@@ -33,50 +34,58 @@
|
|
|
|
|
|
<select id="selectListGroupGylx" resultType="cn.com.victorysoft.business.cyyzs.entity.FailureReason">
|
|
<select id="selectListGroupGylx" resultType="cn.com.victorysoft.business.cyyzs.entity.FailureReason">
|
|
select
|
|
select
|
|
- a.gylx,
|
|
|
|
- (select flag_name from sys_flag where flag_code = a.gylx) gylx_name,
|
|
|
|
- sum(case when a.fsyz_ck = 'Y' then 1 else 0 end ) fsyz_ck,
|
|
|
|
- sum(case when a.jgyz = 'Y' then 1 else 0 end ) jgyz,
|
|
|
|
- sum(case when a.fgq = 'Y' then 1 else 0 end ) fgq,
|
|
|
|
- sum(case when a.psq = 'Y' then 1 else 0 end ) psq,
|
|
|
|
- sum(case when a.xjf = 'Y' then 1 else 0 end ) xjf,
|
|
|
|
- sum(case when a.mdgj = 'Y' then 1 else 0 end ) mdgj,
|
|
|
|
- sum(case when a.mgz = 'Y' then 1 else 0 end ) mgz
|
|
|
|
- from
|
|
|
|
- water_failure_reason a
|
|
|
|
- left join water_well_basic b on a.jh = b.jh
|
|
|
|
- where
|
|
|
|
- 1 = 1
|
|
|
|
- <if test="gylx != null and gylx != ''"> and a.gylx = #{gylx}</if>
|
|
|
|
- <if test="yclx != null and yclx != ''"> and b.yclx = #{yclx}</if>
|
|
|
|
- <if test="dydm != null and dydm != ''"> and a.dydm = #{dydm}</if>
|
|
|
|
- <if test="dwdm != null and dwdm != ''"> and a.dwdm in (select unitcode from sys_unitinfo start with unitcode = #{dwdm} connect by p_unitcode = prior unitcode) </if>
|
|
|
|
- group by
|
|
|
|
- a.gylx
|
|
|
|
|
|
+ a.*, rownum xh
|
|
|
|
+ from (
|
|
|
|
+ select
|
|
|
|
+ a.gylx,
|
|
|
|
+ (select flag_name from sys_flag where flag_code = a.gylx) gylx_name,
|
|
|
|
+ sum(case when a.fsyz_ck = 'Y' then 1 else 0 end ) fsyz_ck,
|
|
|
|
+ sum(case when a.jgyz = 'Y' then 1 else 0 end ) jgyz,
|
|
|
|
+ sum(case when a.fgq = 'Y' then 1 else 0 end ) fgq,
|
|
|
|
+ sum(case when a.psq = 'Y' then 1 else 0 end ) psq,
|
|
|
|
+ sum(case when a.xjf = 'Y' then 1 else 0 end ) xjf,
|
|
|
|
+ sum(case when a.mdgj = 'Y' then 1 else 0 end ) mdgj,
|
|
|
|
+ sum(case when a.mgz = 'Y' then 1 else 0 end ) mgz
|
|
|
|
+ from
|
|
|
|
+ water_failure_reason a
|
|
|
|
+ left join water_well_basic b on a.jh = b.jh
|
|
|
|
+ where
|
|
|
|
+ 1 = 1
|
|
|
|
+ <if test="gylx != null and gylx != ''"> and a.gylx = #{gylx}</if>
|
|
|
|
+ <if test="yclx != null and yclx != ''"> and b.yclx = #{yclx}</if>
|
|
|
|
+ <if test="dydm != null and dydm != ''"> and a.dydm = #{dydm}</if>
|
|
|
|
+ <if test="dwdm != null and dwdm != ''"> and a.dwdm in (select unitcode from sys_unitinfo start with unitcode = #{dwdm} connect by p_unitcode = prior unitcode) </if>
|
|
|
|
+ group by
|
|
|
|
+ a.gylx
|
|
|
|
+ ) a
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="selectListGroupYclx" resultType="cn.com.victorysoft.business.cyyzs.entity.FailureReason">
|
|
<select id="selectListGroupYclx" resultType="cn.com.victorysoft.business.cyyzs.entity.FailureReason">
|
|
select
|
|
select
|
|
- b.yclx,
|
|
|
|
- (select flag_name from sys_flag where flag_code = b.yclx) yclx_name,
|
|
|
|
- sum(case when fsyz_ck = 'Y' then 1 else 0 end ) fsyz_ck,
|
|
|
|
- sum(case when jgyz = 'Y' then 1 else 0 end ) jgyz,
|
|
|
|
- sum(case when fgq = 'Y' then 1 else 0 end ) fgq,
|
|
|
|
- sum(case when psq = 'Y' then 1 else 0 end ) psq,
|
|
|
|
- sum(case when xjf = 'Y' then 1 else 0 end ) xjf,
|
|
|
|
- sum(case when mdgj = 'Y' then 1 else 0 end ) mdgj,
|
|
|
|
- sum(case when mgz = 'Y' then 1 else 0 end ) mgz
|
|
|
|
- from
|
|
|
|
- water_failure_reason a
|
|
|
|
- left join water_well_basic b on a.jh = b.jh
|
|
|
|
- where
|
|
|
|
- 1 = 1
|
|
|
|
- <if test="gylx != null and gylx != ''"> and a.gylx = #{gylx}</if>
|
|
|
|
- <if test="yclx != null and yclx != ''"> and b.yclx = #{yclx}</if>
|
|
|
|
- <if test="dydm != null and dydm != ''"> and a.dydm = #{dydm}</if>
|
|
|
|
- <if test="dwdm != null and dwdm != ''"> and a.dwdm in (select unitcode from sys_unitinfo start with unitcode = #{dwdm} connect by p_unitcode = prior unitcode) </if>
|
|
|
|
- group by
|
|
|
|
- b.yclx
|
|
|
|
|
|
+ a.*, rownum xh
|
|
|
|
+ from (
|
|
|
|
+ select
|
|
|
|
+ b.yclx,
|
|
|
|
+ (select flag_name from sys_flag where flag_code = b.yclx) yclx_name,
|
|
|
|
+ sum(case when fsyz_ck = 'Y' then 1 else 0 end ) fsyz_ck,
|
|
|
|
+ sum(case when jgyz = 'Y' then 1 else 0 end ) jgyz,
|
|
|
|
+ sum(case when fgq = 'Y' then 1 else 0 end ) fgq,
|
|
|
|
+ sum(case when psq = 'Y' then 1 else 0 end ) psq,
|
|
|
|
+ sum(case when xjf = 'Y' then 1 else 0 end ) xjf,
|
|
|
|
+ sum(case when mdgj = 'Y' then 1 else 0 end ) mdgj,
|
|
|
|
+ sum(case when mgz = 'Y' then 1 else 0 end ) mgz
|
|
|
|
+ from
|
|
|
|
+ water_failure_reason a
|
|
|
|
+ left join water_well_basic b on a.jh = b.jh
|
|
|
|
+ where
|
|
|
|
+ 1 = 1
|
|
|
|
+ <if test="gylx != null and gylx != ''"> and a.gylx = #{gylx}</if>
|
|
|
|
+ <if test="yclx != null and yclx != ''"> and b.yclx = #{yclx}</if>
|
|
|
|
+ <if test="dydm != null and dydm != ''"> and a.dydm = #{dydm}</if>
|
|
|
|
+ <if test="dwdm != null and dwdm != ''"> and a.dwdm in (select unitcode from sys_unitinfo start with unitcode = #{dwdm} connect by p_unitcode = prior unitcode) </if>
|
|
|
|
+ group by
|
|
|
|
+ b.yclx
|
|
|
|
+ )
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getBarData" resultType="cn.com.victorysoft.business.cyyzs.entity.FailureReason">
|
|
<select id="getBarData" resultType="cn.com.victorysoft.business.cyyzs.entity.FailureReason">
|