Commit 27e22cfb by yanru

修改默认查询条件中日期格式

parent a32f9345
......@@ -21,7 +21,7 @@
AND DATE_FORMAT(ASJ.ZCZJ_ZXSJ01 ,'%Y%m%d') <![CDATA[>=]]> DATE_FORMAT(#{larqQssj,jdbcType=VARCHAR},'%Y%m%d')
</if>
<if test="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>
and asjcz.zczjywsjzt='02'
</sql>
......
......@@ -746,23 +746,8 @@
(CASE zczj.zczj_zadjdm WHEN '0101' THEN '0101' WHEN '0102' THEN'0102' WHEN '0104' THEN '0104' WHEN '0105' THEN'0105' WHEN '0111' THEN '0111' ELSE '9900' END) as ZADJDM,
(select count(1) from tb_xw_rybh bhr where asj.asjbh = bhr.asjbh and bhr.xxsc_pdbz='0' and bhr.RSSHCDDM='1' ) as bhrCount
from tb_st_asj asj inner join tb_xw_asjcz asjcz on asj.asjbh=asjcz.asjbh INNER JOIN tb_xw_zczj zczj on asj.asjbh=zczj.asjbh
where asj.xxsc_pdbz='0'
and asjcz.laywsjzt ='02'
and asj.sfma_pdbz = '1'
<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>
<if test="larqQssj!=null and larqQssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND ASJ.LARQ <![CDATA[>=]]> DATE_FORMAT(#{larqQssj,jdbcType=VARCHAR},'%Y%m%d')
</if>
<if test="larqJssj!=null and larqJssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND ASJ.LARQ <![CDATA[<]]> DATE_ADD(#{larqJssj,jdbcType=VARCHAR},INTERVAL 1 DAY)
</if>
<include refid="common-condition"/>
and zczj.xxsc_pdbz='0'
) a where a.bhrCount <![CDATA[>]]> 2
) b
GROUP BY b.ZADJDM
......
......@@ -18,10 +18,10 @@
<sql id="pa-condition">
<include refid="common-condition"/>
<if test="larqQssj!=null and larqQssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND DATE_FORMAT(ASJ.ZCZJ_ZXSJ01 ,'%Y%m%d') <![CDATA[>=]]> DATE_FORMAT(#{larqQssj,jdbcType=VARCHAR},'%Y%m%d')
AND ASJ.ZCZJ_ZXSJ01 <![CDATA[>=]]> DATE_FORMAT(#{larqQssj,jdbcType=VARCHAR},'%Y%m%d')
</if>
<if test="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>
and asjcz.zczjywsjzt='02'
</sql>
......@@ -581,6 +581,7 @@
<if test="type=='zadj'">
INNER JOIN TB_XW_ZCZJ ZCZJ ON asj.asjbh=zczj.asjbh
<include refid="pa-condition"/>
and zczj.xxsc_pdbz='0'
<if test="code == '999'">
and (zczj.zczj_zadjdm='9900' or (SELECT CODE FROM SYS_DICTITEM WHERE GROUPID='CODE_ZADJ' AND CODE=zczj.zczj_zadjdm) IS NULL or (SELECT CODE FROM SYS_DICTITEM WHERE GROUPID='CODE_ZADJ' AND CODE=zczj.zczj_zadjdm) ='')
</if>
......
......@@ -622,7 +622,7 @@
AND ASJ.ZCZJ_ZXSJ01 <![CDATA[>=]]> DATE_FORMAT(#{larqQssj,jdbcType=VARCHAR},'%Y%m%d')
</if>
<if test="larqJssj!=null and larqJssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND ASJ.ZCZJ_ZXSJ01 <![CDATA[<]]> DATE_FORMAT(#{larqJssj,jdbcType=VARCHAR},'%Y%m%d')
AND ASJ.ZCZJ_ZXSJ01 <![CDATA[<]]> DATE_ADD(#{larqJssj,jdbcType=VARCHAR},INTERVAL 1 DAY)
</if>
and asjcz.zczjywsjzt='02'
</sql>
......
......@@ -157,6 +157,7 @@
group by rybh.asjbh having count(*) >=3) zdsw on asj.asjbh=zdsw.asjbh
</if>
<include refid="common-condition"/>
and zczj.xxsc_pdbz='0'
group by zczjzadjmc
HAVING zczjzadjmc is not null and zczjzadjmc !=''
ORDER BY num desc
......@@ -335,6 +336,7 @@
<if test="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
<include refid="common-condition"/>
and zczj.xxsc_pdbz='0'
order by larq asc
</select>
......
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