(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'
<iftest="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>
<iftest="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>
<iftest="larqJssj!=null and larqJssj!=''">and asj.larq <![CDATA[<]]>DATE_ADD(#{larqJssj,jdbcType=VARCHAR},INTERVAL 1 DAY)</if>
group by rybh.asjbh having count(*) >=3) zdsw on asj.asjbh=zdsw.asjbh
</if>
<iftest="typeFlag=='jsb'">
inner join
(select asj.asjbh from tb_st_asj asj inner join tb_xw_zbfzxyr xyr on asj.asjbh=xyr.asjbh where asj.xxsc_pdbz='0' and xyr.xxsc_pdbz='0' and xyr.zhfzxyr_sfjsbr_pdbz='1'
<iftest="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>
<iftest="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>
<iftest="larqJssj!=null and larqJssj!=''">and asj.larq <![CDATA[<]]>DATE_ADD(#{larqJssj,jdbcType=VARCHAR},INTERVAL 1 DAY)</if>
) jsb on asj.asjbh=jsb.asjbh
</if>
where asj.xxsc_pdbz='0'
...
...
@@ -64,14 +64,14 @@
<iftest="typeFlag=='zdsw'">
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'
<iftest="larqQssj!=null and larqQssj!=''">and asj.larq <![CDATA[>=]]>(str_to_date(#{larqQssj, jdbcType=VARCHAR},'%Y-%m-%d %H:%i:%S'))</if>
<iftest="larqJssj!=null and larqJssj!=''">and asj.larq <![CDATA[<]]>(str_to_date(#{larqJssj, jdbcType=VARCHAR},'%Y-%m-%d %H:%i:%S')+1)</if>
<iftest="larqJssj!=null and larqJssj!=''">and asj.larq <![CDATA[<]]>DATE_ADD(#{larqJssj,jdbcType=VARCHAR},INTERVAL 1 DAY)</if>
group by rybh.asjbh having count(*) >=3) zdsw on asj.asjbh=zdsw.asjbh
</if>
<iftest="typeFlag=='jsb'"><!-- 精神病患案件 -->
inner join
(select asj.asjbh from tb_st_asj asj inner join tb_xw_zbfzxyr xyr on asj.asjbh=xyr.asjbh where asj.xxsc_pdbz='0' and xyr.xxsc_pdbz='0' and xyr.zhfzxyr_sfjsbr_pdbz='1'
<iftest="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>
<iftest="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>
<iftest="larqJssj!=null and larqJssj!=''">and asj.larq <![CDATA[<]]>DATE_ADD(#{larqJssj,jdbcType=VARCHAR},INTERVAL 1 DAY)</if>
) jsb on asj.asjbh=jsb.asjbh
</if>
where asj.xxsc_pdbz='0' and la.xxsc_pdbz='0' and zczj.xxsc_pdbz='0'
...
...
@@ -433,7 +433,7 @@
)
</if>
<iftest="larqQssj!=null and larqQssj!=''">and asj.larq <![CDATA[>=]]>(str_to_date(#{larqQssj, jdbcType=VARCHAR},'%Y-%m-%d %H:%i:%S'))</if>
<iftest="larqJssj!=null and larqJssj!=''">and asj.larq <![CDATA[<]]>(str_to_date(#{larqJssj, jdbcType=VARCHAR},'%Y-%m-%d %H:%i:%S')+1)</if>
<iftest="larqJssj!=null and larqJssj!=''">and asj.larq <![CDATA[<]]>DATE_ADD(#{larqJssj,jdbcType=VARCHAR},INTERVAL 1 DAY)</if>
<iftest="xxdjdwGajgjgdm!=null and xxdjdwGajgjgdm!=''">
and asj.xxdjdw_Gajgjgdm
in(
...
...
@@ -482,7 +482,10 @@
</if>
<iftest="typeFlag=='toZczj'"><!--侦查终结信息维护 -->
and asjcz.LAYWSJZT ='02'
<iftest="ajywztdm!=null and ajywztdm!=''">
<iftest="ajywztdm=='00'">
and (asjcz.zczjywsjzt is null or asjcz.zczjywsjzt ='' or asjcz.zczjywsjzt ='00')
</if>
<iftest="ajywztdm!=null and ajywztdm!='' and ajywztdm !='00'">
and asjcz.zczjywsjzt = #{ajywztdm, jdbcType=VARCHAR}
</if>
<!--侦查终结超期是指填写了侦查终结信息且五天内未提请侦查终结审批的案件信息-->
...
...
@@ -519,7 +522,7 @@
)
</if>
<iftest="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>
<iftest="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>
<iftest="larqJssj!=null and larqJssj!=''">and asj.larq <![CDATA[<]]>DATE_ADD(#{larqJssj,jdbcType=VARCHAR},INTERVAL 1 DAY)</if>
<iftest="xxdjdwGajgjgdm!=null and xxdjdwGajgjgdm!=''">
and asj.xxdjdw_Gajgjgdm
in(
...
...
@@ -534,7 +537,7 @@
<iftest="spsjQssj!=null and spsjQssj!=''">and la.spsj <![CDATA[>=]]>(str_to_date(#{spsjQssj, jdbcType=VARCHAR},'%Y-%m-%d %H:%i:%S'))</if>
<iftest="spsjJssj!=null and spsjJssj!=''">and la.spsj <![CDATA[<]]>(str_to_date(#{spsjJssj, jdbcType=VARCHAR},'%Y-%m-%d %H:%i:%S')+1)</if>
<iftest="laywsjzt!=null and laywsjzt!=''">
<!--<if test="laywsjzt!=null and laywsjzt!=''">
<if test="laywsjzt=='00'">
and (asjcz.laywsjzt = '00' or asjcz.laywsjzt is NULL or asjcz.laywsjzt ='' or asjcz.laywsjzt='')
</if>
...
...
@@ -550,7 +553,7 @@
<if test="zczjywsjzt!='00'">
and asjcz.zczjywsjzt = #{zczjywsjzt, jdbcType=VARCHAR}
</if>
</if>
</if>-->
<iftest="sfhgpdbz!=null and sfhgpdbz!=''"> and asj.SFHGPDBZ =#{sfhgpdbz, jdbcType=VARCHAR}</if>
<iftest="larqQssj!=null and larqQssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND DATE_FORMAT(ASJ.LARQ ,'%Y%m%d')<![CDATA[>=]]> DATE_FORMAT(#{larqQssj,jdbcType=VARCHAR},'%Y%m%d')
AND ASJ.LARQ<![CDATA[>=]]> DATE_FORMAT(#{larqQssj,jdbcType=VARCHAR},'%Y%m%d')
</if>
<iftest="larqJssj!=null and larqJssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND DATE_FORMAT(ASJ.LARQ ,'%Y%m%d')<![CDATA[<=]]> DATE_FORMAT(#{larqJssj,jdbcType=VARCHAR},'%Y%m%d')
AND ASJ.LARQ<![CDATA[<=]]> DATE_FORMAT(#{larqJssj,jdbcType=VARCHAR},'%Y%m%d')
</if>
<iftest="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})
...
...
@@ -86,7 +86,7 @@
<if test="larqQssj!=null and larqQssj!=''">and DATE_FORMAT(asj.larq,'%Y-%m-%d %H:%i:%S') <![CDATA[>=]]>
<iftest="larqQssj!=null and larqQssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND DATE_FORMAT(ASJ.LARQ,'%Y%m%d')<![CDATA[>=]]> DATE_FORMAT(#{larqQssj,jdbcType=VARCHAR},'%Y%m%d')
AND ASJ.LARQ<![CDATA[>=]]> DATE_FORMAT(#{larqQssj,jdbcType=VARCHAR},'%Y%m%d')
</if>
<iftest="larqJssj!=null and larqJssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND DATE_FORMAT(ASJ.LARQ,'%Y%m%d') <![CDATA[<=]]> (DATE_FORMAT(#{larqJssj,jdbcType=VARCHAR},'%Y%m%d'))
AND ASJ.LARQ <![CDATA[<]]> DATE_ADD(#{larqJssj,jdbcType=VARCHAR},INTERVAL 1 DAY)
</if>
<iftest="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})
...
...
@@ -29,7 +29,7 @@
AND DATE_FORMAT(ASJ.ZCZJ_ZXSJ01,'%Y%m%d') <![CDATA[>=]]> DATE_FORMAT(#{larqQssj,jdbcType=VARCHAR},'%Y%m%d')
</if>
<iftest="larqJssj!=null and larqJssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND DATE_FORMAT(ASJ.ZCZJ_ZXSJ01,'%Y%m%d') <![CDATA[<=]]> (DATE_FORMAT(#{larqJssj,jdbcType=VARCHAR},'%Y%m%d'))
AND ASJ.ZCZJ_ZXSJ01 <![CDATA[<]]> DATE_ADD(#{larqJssj,jdbcType=VARCHAR},INTERVAL 1 DAY)
</if>
</sql>
...
...
@@ -328,8 +328,8 @@
where asj.xxsc_pdbz='0' and rybh.xxsc_pdbz='0' and rybh.RSSHCDDM='1'
<iftest="larqQssj!=null and larqQssj!=''">and DATE_FORMAT(asj.larq,'%Y-%m-%d %H:%i:%S') <![CDATA[>=]]>
group by rybh.asjbh having count(*) >=3) zdsw on asj.asjbh=zdsw.asjbh
</if>
<includerefid="common-condition"/>
...
...
@@ -349,7 +349,7 @@
(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'
<iftest="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>
<iftest="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>
<iftest="larqJssj!=null and larqJssj!=''">and asj.larq <![CDATA[<]]>DATE_ADD(#{larqJssj,jdbcType=VARCHAR},INTERVAL 1 DAY)</if>
group by rybh.asjbh having count(*) >=3) zdsw on asj.asjbh=zdsw.asjbh
</if>
<includerefid="pa-condition"/>
...
...
@@ -370,7 +370,7 @@
(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>
<if test="larqJssj!=null and larqJssj!=''">and DATE_FORMAT(asj.larq,'%Y-%m-%d %H:%i:%S') <![CDATA[<=]]>DATE_ADD(#{lasjJssj,jdbcType=VARCHAR},INTERVAL 1 DAY)</if>
group by rybh.asjbh having count(*) >=3) zdsw on asj.asjbh=zdsw.asjbh
</if>
<include refid="pa-condition"/>
...
...
@@ -403,10 +403,10 @@
where asj.xxsc_pdbz='0' and asj.sfma_pdbz = '1'
and asjcz.laywsjzt='02' AND xyr.xxsc_pdbz = '0'
<if test="lasjQssj!=null and lasjQssj!=''"><!–时间不为空 根据立案日期选择查询–>
AND DATE_FORMAT(ASJ.LARQ,'%Y%m%d') <![CDATA[>=]]> DATE_FORMAT(#{lasjQssj,jdbcType=VARCHAR},'%Y%m%d')
AND ASJ.LARQ <![CDATA[>=]]> DATE_FORMAT(#{lasjQssj,jdbcType=VARCHAR},'%Y%m%d')
</if>
<if test="lasjJssj!=null and lasjJssj!=''"><!–时间不为空 根据立案日期选择查询–>
AND DATE_FORMAT(ASJ.LARQ,'%Y%m%d') <![CDATA[<=]]> (DATE_FORMAT(#{lasjJssj,jdbcType=VARCHAR},'%Y%m%d'))
AND ASJ.LARQ <![CDATA[<=]]> (DATE_FORMAT(#{lasjJssj,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})
...
...
@@ -428,10 +428,10 @@
where asj.xxsc_pdbz='0' and asj.sfma_pdbz = '1'
and asjcz.laywsjzt='02' AND xyr.xxsc_pdbz = '0'
<if test="lasjQssj!=null and lasjQssj!=''"><!–时间不为空 根据立案日期选择查询–>
AND DATE_FORMAT(ASJ.LARQ,'%Y%m%d') <![CDATA[>=]]> DATE_FORMAT(#{lasjQssj,jdbcType=VARCHAR},'%Y%m%d')
AND ASJ.LARQ <![CDATA[>=]]> DATE_FORMAT(#{lasjQssj,jdbcType=VARCHAR},'%Y%m%d')
</if>
<if test="lasjJssj!=null and lasjJssj!=''"><!–时间不为空 根据立案日期选择查询–>
AND DATE_FORMAT(ASJ.LARQ,'%Y%m%d') <![CDATA[<=]]> (DATE_FORMAT(#{lasjJssj,jdbcType=VARCHAR},'%Y%m%d'))
AND ASJ.LARQ <![CDATA[<=]]> (DATE_FORMAT(#{lasjJssj,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})
...
...
@@ -455,10 +455,10 @@
where asj.xxsc_pdbz='0' and asj.sfma_pdbz = '1'
and asjcz.laywsjzt='02'
<if test="lasjQssj!=null and lasjQssj!=''"><!–时间不为空 根据立案日期选择查询–>
AND DATE_FORMAT(ASJ.LARQ,'%Y%m%d') <![CDATA[>=]]> DATE_FORMAT(#{lasjQssj,jdbcType=VARCHAR},'%Y%m%d')
AND ASJ.LARQ <![CDATA[>=]]> DATE_FORMAT(#{lasjQssj,jdbcType=VARCHAR},'%Y%m%d')
</if>
<if test="lasjJssj!=null and lasjJssj!=''"><!–时间不为空 根据立案日期选择查询–>
AND DATE_FORMAT(ASJ.LARQ,'%Y%m%d') <![CDATA[<=]]> (DATE_FORMAT(#{lasjJssj,jdbcType=VARCHAR},'%Y%m%d'))
AND ASJ.LARQ <![CDATA[<=]]> (DATE_FORMAT(#{lasjJssj,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})
...
...
@@ -524,8 +524,8 @@
where asj.xxsc_pdbz='0' and rybh.xxsc_pdbz='0' and rybh.RSSHCDDM='1'
<iftest="larqQssj!=null and larqQssj!=''">and DATE_FORMAT(asj.larq,'%Y-%m-%d %H:%i:%S') <![CDATA[>=]]>
select count(*) from tb_st_asj asj inner join tb_xw_asjcz asjcz on asj.asjbh=asjcz.asjbh where asj.xxsc_pdbz='0' and asj.sfma_pdbz = '1'
and DATE_FORMAT(asj.ZCZJ_ZXSJ01,'%Y%m%d') <![CDATA[>=]]> DATE_FORMAT(#{lasjQssj,jdbcType=VARCHAR},'%Y%m%d') and DATE_FORMAT(asj.ZCZJ_ZXSJ01,'%Y%m%d') <![CDATA[<=]]> DATE_FORMAT(#{lasjJssj,jdbcType=VARCHAR},'%Y%m%d')
and DATE_FORMAT(asj.ZCZJ_ZXSJ01,'%Y%m%d') <![CDATA[>=]]> DATE_FORMAT(#{lasjQssj,jdbcType=VARCHAR},'%Y%m%d') and DATE_FORMAT(asj.ZCZJ_ZXSJ01,'%Y%m%d') <![CDATA[<]]> DATE_ADD(#{lasjJssj,jdbcType=VARCHAR},INTERVAL 1 DAY)
and YEAR(asj.larq) <![CDATA[<]]> #{year, jdbcType=VARCHAR}
and asjcz.laywsjzt='02' and asjcz.zczjywsjzt='02'
<iftest="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>
select count(*) from tb_st_asj asj inner join tb_xw_asjcz asjcz on asj.asjbh=asjcz.asjbh where asj.xxsc_pdbz='0' and asj.sfma_pdbz = '1'
and (asj.ZCZJ_ZXSJ01 is null or asj.ZCZJ_ZXSJ01 = '' or DATE_FORMAT(asj.ZCZJ_ZXSJ01,'%Y%m%d') <![CDATA[>]]> DATE_FORMAT(#{lasjJssj,jdbcType=VARCHAR},'%Y%m%d'))
and (asj.ZCZJ_ZXSJ01 is null or asj.ZCZJ_ZXSJ01 = '' or asj.ZCZJ_ZXSJ01 <![CDATA[>]]> DATE_ADD(#{lasjJssj,jdbcType=VARCHAR},INTERVAL 1 DAY)
and YEAR(asj.larq) <![CDATA[<]]> #{year, jdbcType=VARCHAR} and
( asjcz.zczjywsjzt <![CDATA[<>]]>'02' or asjcz.zczjywsjzt is null or asjcz.zczjywsjzt = '')
<iftest="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 ASJ.LARQ <![CDATA[>=]]> DATE_FORMAT(#{lasjQssj,jdbcType=VARCHAR},'%Y%m%d')
</if>
<iftest="larqJssj!=null and larqJssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND DATE_FORMAT(ASJ.LARQ,'%Y%m%d')<![CDATA[<=]]> DATE_FORMAT(#{larqJssj,jdbcType=VARCHAR},'%Y%m%d')
AND ASJ.LARQ<![CDATA[<=]]> DATE_FORMAT(#{larqJssj,jdbcType=VARCHAR},'%Y%m%d')
</if>
<iftest="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})