(select name from code_gxs where code = CONCAT(left(asj.LADW_GAJGJGDM,4),'00000000')) as ladwGajgjgdm,
(select name from sys_dictitem where groupid='CODE_ZADJ' and code=zczj_zadjdm) as zczjZadjdm,
(select name from sys_dictitem where groupid='CODE_TSSD' and code=asj.TSSDDM) as tssddm,
asj.larq as larq
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
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 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>
group by rybh.asjbh having count(*) >=3) zdsw on asj.asjbh=zdsw.asjbh