Commit 222cf873 by yanru

修改重大伤亡透视方法

parent cfd1610d
......@@ -629,22 +629,21 @@
<select id="getMaZdswCountNew" resultType="java.lang.Integer">
select count(*)
from (select count(*)
from tb_st_asj asj inner join tb_xw_asjcz asjcz on asj.asjbh=asjcz.asjbh inner join tb_xw_rybh rybh on asj.asjbh=rybh.asjbh
where asj.xxsc_pdbz='0' and asj.sfma_pdbz = '1'
and asjcz.laywsjzt='02'
<if test="larqQssj!=null and larqQssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND DATE_FORMAT(ASJ.LARQ,'%Y%m%d') <![CDATA[>=]]> DATE_FORMAT(#{larqQssj,jdbcType=VARCHAR},'%Y%m%d')
</if>
<if test="larqJssj!=null and larqJssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND DATE_FORMAT(ASJ.LARQ,'%Y%m%d') <![CDATA[<=]]> (DATE_FORMAT(#{larqJssj,jdbcType=VARCHAR},'%Y%m%d'))
</if>
<if test="unitcode != null and unitcode !=''">
and asj.LADW_GAJGJGDM in (SELECT code FROM code_gxs WHERE CODE_LEV1 =#{unitcode, jdbcType=VARCHAR} or CODE_LEV2 =#{unitcode, jdbcType=VARCHAR} or CODE_LEV3 =#{unitcode, jdbcType=VARCHAR} or CODE_LEV4 =#{unitcode, jdbcType=VARCHAR} or CODE_LEV5 =#{unitcode, jdbcType=VARCHAR})
</if>
and rybh.xxsc_pdbz='0'
and rybh.RSSHCDDM='1'
group by asj.asjbh having count(asj.asjbh)>=3) a
from (select count(1) from tb_st_asj asj inner join tb_xw_asjcz asjcz on asj.asjbh=asjcz.asjbh inner join
(
select asj.asjbh from tb_st_asj asj inner join tb_xw_rybh rybh on asj.asjbh=rybh.asjbh
where asj.xxsc_pdbz='0' and rybh.xxsc_pdbz='0' and rybh.RSSHCDDM='1'
<if test="larqQssj!=null and larqQssj!=''">
and DATE_FORMAT(asj.larq,'%Y-%m-%d %H:%i:%S') <![CDATA[>=]]>(str_to_date(#{larqQssj, jdbcType=VARCHAR},'%Y-%m-%d %H:%i:%S'))
</if>
<if test="larqJssj!=null and larqJssj!=''">
and DATE_FORMAT(asj.larq,'%Y-%m-%d %H:%i:%S') <![CDATA[<=]]>(str_to_date(#{larqJssj, jdbcType=VARCHAR},'%Y-%m-%d %H:%i:%S'))
</if>
group by rybh.asjbh having count(*) >=3
) zdsw
on asj.asjbh=zdsw.asjbh
<include refid="common-condition"/>
) a
</select>
<select id="getMaZdswBhrCount" resultType="java.lang.Integer">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment