(select count(*) ycs from TB_RY_RYCJ where (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and (tbbz = '1' or tbbz = '2')
select * from
(select count(*) ycs from TB_RY_RYCJ where (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and (tbbz = '1' or tbbz = '2')
<iftest="lrdwdm != null and lrdwdm != ''"> and lrdwdm like #{lrdwdm , jdbcType=VARCHAR }||'%'</if>
<iftest="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
<iftest="minccsj != null and minccsj != ''"> and lrsj <![CDATA[>=]]> to_date(#{minccsj , jdbcType=VARCHAR },'YYYY-MM-DD')</if>
<iftest="sqlwhere != null and sqlwhere != ''"> and ${sqlwhere}</if>
)t1,
(select count(*) zwcjs from TB_RY_RYCJ where (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and (tbbz = '1' or tbbz = '2') and szzwbh is not null
)t1,
(select count(*) zwcjs from TB_RY_RYCJ where (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and (tbbz = '1' or tbbz = '2') and szzwbh is not null
<iftest="lrdwdm != null and lrdwdm != ''"> and lrdwdm like #{lrdwdm , jdbcType=VARCHAR }||'%'</if>
<iftest="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
<iftest="minccsj != null and minccsj != ''"> and lrsj <![CDATA[>=]]> to_date(#{minccsj , jdbcType=VARCHAR },'YYYY-MM-DD')</if>
<iftest="sqlwhere != null and sqlwhere != ''"> and ${sqlwhere}</if>
)t2,
(select count(*) zwxzcjs from TB_RY_RYCJ where (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and tbbz = '0' and szzwbh is not null
)t2,
(select count(*) zwxzcjs from TB_RY_RYCJ where (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and tbbz = '0' and szzwbh is not null
<iftest="lrdwdm != null and lrdwdm != ''"> and lrdwdm like #{lrdwdm , jdbcType=VARCHAR }||'%'</if>
<iftest="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
<iftest="minccsj != null and minccsj != ''"> and lrsj <![CDATA[>=]]> to_date(#{minccsj , jdbcType=VARCHAR },'YYYY-MM-DD')</if>
<iftest="sqlwhere != null and sqlwhere != ''"> and ${sqlwhere}</if>
)t21,
(select count(*) zwwcjs from TB_RY_RYCJ where (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and szzwbh is null
)t21,
(select count(*) zwwcjs from TB_RY_RYCJ where (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and szzwbh is null
<iftest="lrdwdm != null and lrdwdm != ''"> and lrdwdm like #{lrdwdm , jdbcType=VARCHAR }||'%'</if>
<iftest="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
<iftest="minccsj != null and minccsj != ''"> and lrsj <![CDATA[>=]]> to_date(#{minccsj , jdbcType=VARCHAR },'YYYY-MM-DD')</if>
<iftest="sqlwhere != null and sqlwhere != ''"> and ${sqlwhere}</if>
)t22,
(select count(*) rxcjs from TB_RY_RYCJ
where (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and (tbbz = '1' or tbbz = '2') and ZMZPXXBH is not null
and CMZPXXBH is not null
and YCMZPXXBH is not null
)t22,
(select count(*) rxcjs from TB_RY_RYCJ
where (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and (tbbz = '1' or tbbz = '2') and ZMZPXXBH is not null
and CMZPXXBH is not null
and YCMZPXXBH is not null
<iftest="lrdwdm != null and lrdwdm != ''"> and lrdwdm like #{lrdwdm , jdbcType=VARCHAR }||'%'</if>
<iftest="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
<iftest="minccsj != null and minccsj != ''"> and lrsj <![CDATA[>=]]> to_date(#{minccsj , jdbcType=VARCHAR },'YYYY-MM-DD')</if>
<iftest="sqlwhere != null and sqlwhere != ''"> and ${sqlwhere}</if>
)t3,
(select count(*) rxxzcjs from TB_RY_RYCJ
where (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and tbbz = '0' and ZMZPXXBH is not null
and CMZPXXBH is not null
and YCMZPXXBH is not null
)t3,
(select count(*) rxxzcjs from TB_RY_RYCJ
where (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and tbbz = '0' and ZMZPXXBH is not null
and CMZPXXBH is not null
and YCMZPXXBH is not null
<iftest="lrdwdm != null and lrdwdm != ''"> and lrdwdm like #{lrdwdm , jdbcType=VARCHAR }||'%'</if>
<iftest="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
<iftest="minccsj != null and minccsj != ''"> and lrsj <![CDATA[>=]]> to_date(#{minccsj , jdbcType=VARCHAR },'YYYY-MM-DD')</if>
<iftest="sqlwhere != null and sqlwhere != ''"> and ${sqlwhere}</if>
)t31,
(select count(*) rxwcjs from TB_RY_RYCJ
where (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and (ZMZPXXBH is null or CMZPXXBH is null or YCMZPXXBH is null)
)t31,
(select count(*) rxwcjs from TB_RY_RYCJ
where (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and (ZMZPXXBH is null or CMZPXXBH is null or YCMZPXXBH is null)
<iftest="lrdwdm != null and lrdwdm != ''"> and lrdwdm like #{lrdwdm , jdbcType=VARCHAR }||'%'</if>
<iftest="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
<iftest="minccsj != null and minccsj != ''"> and lrsj <![CDATA[>=]]> to_date(#{minccsj , jdbcType=VARCHAR },'YYYY-MM-DD')</if>
<iftest="sqlwhere != null and sqlwhere != ''"> and ${sqlwhere}</if>
)t32,
(select count(*) swcjs from TB_RY_RYCJ p,(select rybh swrybh from tb_xw_ythcj_sw group by rybh) s where p.rybh=s.swrybh(+) and (SCBZ='0' or SCBZ is null) and (p.ifhb is null or p.ifhb<![CDATA[<>]]>'1') and (p.tbbz = '1' or p.tbbz = '2') and s.swrybh is not null
)t32,
(select count(*) swcjs from TB_RY_RYCJ p,(select rybh swrybh from tb_xw_ythcj_sw group by rybh) s where p.rybh=s.swrybh(+) and (SCBZ='0' or SCBZ is null) and (p.ifhb is null or p.ifhb<![CDATA[<>]]>'1') and (p.tbbz = '1' or p.tbbz = '2') and s.swrybh is not null
<iftest="lrdwdm != null and lrdwdm != ''"> and lrdwdm like #{lrdwdm , jdbcType=VARCHAR }||'%'</if>
<iftest="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
<iftest="minccsj != null and minccsj != ''"> and lrsj <![CDATA[>=]]> to_date(#{minccsj , jdbcType=VARCHAR },'YYYY-MM-DD')</if>
<iftest="sqlwhere != null and sqlwhere != ''"> and ${sqlwhere}</if>
)t4,
(select count(*) swxzcjs from TB_RY_RYCJ p,(select rybh swrybh from tb_xw_ythcj_sw group by rybh) s where p.rybh=s.swrybh(+) and (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and tbbz = '0' and s.swrybh is not null
)t4,
(select count(*) swxzcjs from TB_RY_RYCJ p,(select rybh swrybh from tb_xw_ythcj_sw group by rybh) s where p.rybh=s.swrybh(+) and (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and tbbz = '0' and s.swrybh is not null
<iftest="lrdwdm != null and lrdwdm != ''"> and lrdwdm like #{lrdwdm , jdbcType=VARCHAR }||'%'</if>
<iftest="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
<iftest="minccsj != null and minccsj != ''"> and lrsj <![CDATA[>=]]> to_date(#{minccsj , jdbcType=VARCHAR },'YYYY-MM-DD')</if>
<iftest="sqlwhere != null and sqlwhere != ''"> and ${sqlwhere}</if>
)t41,
(select count(*) swwcjs from TB_RY_RYCJ p,(select rybh swrybh from tb_xw_ythcj_sw group by rybh) s where p.rybh=s.swrybh(+) and (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and s.swrybh is null
)t41,
(select count(*) swwcjs from TB_RY_RYCJ p,(select rybh swrybh from tb_xw_ythcj_sw group by rybh) s where p.rybh=s.swrybh(+) and (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and s.swrybh is null
<iftest="lrdwdm != null and lrdwdm != ''"> and lrdwdm like #{lrdwdm , jdbcType=VARCHAR }||'%'</if>
<iftest="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
<iftest="minccsj != null and minccsj != ''"> and lrsj <![CDATA[>=]]> to_date(#{minccsj , jdbcType=VARCHAR },'YYYY-MM-DD')</if>
<iftest="sqlwhere != null and sqlwhere != ''"> and ${sqlwhere}</if>
)t42,
(select count(*) zjcjs from TB_RY_RYCJ p,(select rybh swrybh from tb_xw_ythcj_zj group by rybh) s where p.rybh=s.swrybh(+) and (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and (tbbz = '1' or tbbz = '2') and s.swrybh is not null
)t42,
(select count(*) zjcjs from TB_RY_RYCJ p,(select rybh swrybh from tb_xw_ythcj_zj group by rybh) s where p.rybh=s.swrybh(+) and (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and (tbbz = '1' or tbbz = '2') and s.swrybh is not null
<iftest="lrdwdm != null and lrdwdm != ''"> and lrdwdm like #{lrdwdm , jdbcType=VARCHAR }||'%'</if>
<iftest="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
<iftest="minccsj != null and minccsj != ''"> and lrsj <![CDATA[>=]]> to_date(#{minccsj , jdbcType=VARCHAR },'YYYY-MM-DD')</if>
<iftest="sqlwhere != null and sqlwhere != ''"> and ${sqlwhere}</if>
)t5,
(select count(*) zjxzcjs from TB_RY_RYCJ p,(select rybh swrybh from tb_xw_ythcj_zj group by rybh) s where p.rybh=s.swrybh(+) and (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and tbbz = '0' and s.swrybh is not null
)t5,
(select count(*) zjxzcjs from TB_RY_RYCJ p,(select rybh swrybh from tb_xw_ythcj_zj group by rybh) s where p.rybh=s.swrybh(+) and (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and tbbz = '0' and s.swrybh is not null
<iftest="lrdwdm != null and lrdwdm != ''"> and lrdwdm like #{lrdwdm , jdbcType=VARCHAR }||'%'</if>
<iftest="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
<iftest="minccsj != null and minccsj != ''"> and lrsj <![CDATA[>=]]> to_date(#{minccsj , jdbcType=VARCHAR },'YYYY-MM-DD')</if>
<iftest="sqlwhere != null and sqlwhere != ''"> and ${sqlwhere}</if>
)t51,
(select count(*) zjwcjs from TB_RY_RYCJ p,(select rybh swrybh from tb_xw_ythcj_zj group by rybh) s where p.rybh=s.swrybh(+) and (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and s.swrybh is null
)t51,
(select count(*) zjwcjs from TB_RY_RYCJ p,(select rybh swrybh from tb_xw_ythcj_zj group by rybh) s where p.rybh=s.swrybh(+) and (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and s.swrybh is null
<iftest="lrdwdm != null and lrdwdm != ''"> and lrdwdm like #{lrdwdm , jdbcType=VARCHAR }||'%'</if>
<iftest="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
<iftest="minccsj != null and minccsj != ''"> and lrsj <![CDATA[>=]]> to_date(#{minccsj , jdbcType=VARCHAR },'YYYY-MM-DD')</if>
<iftest="sqlwhere != null and sqlwhere != ''"> and ${sqlwhere}</if>
)t52,
)t52,
(select count(*) hmcjs from TB_RY_RYCJ p,(select rybh swrybh from tb_xw_ythcj_hm group by rybh) s where p.rybh=s.swrybh(+) and (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and (tbbz = '1' or tbbz = '2') and s.swrybh is not null
<iftest="lrdwdm != null and lrdwdm != ''"> and lrdwdm like #{lrdwdm , jdbcType=VARCHAR }||'%'</if>
<iftest="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
...
...
@@ -220,24 +220,24 @@
<iftest="minccsj != null and minccsj != ''"> and lrsj <![CDATA[>=]]> to_date(#{minccsj , jdbcType=VARCHAR },'YYYY-MM-DD')</if>
<iftest="sqlwhere != null and sqlwhere != ''"> and ${sqlwhere}</if>
)t62,
(select count(*) dnacjs from TB_RY_RYCJ where (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and (tbbz = '1' or tbbz = '2') and dnabh is not null
(select count(*) dnacjs from TB_RY_RYCJ where (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and (tbbz = '1' or tbbz = '2') and dnabh is not null
<iftest="lrdwdm != null and lrdwdm != ''"> and lrdwdm like #{lrdwdm , jdbcType=VARCHAR }||'%'</if>
<iftest="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
<iftest="minccsj != null and minccsj != ''"> and lrsj <![CDATA[>=]]> to_date(#{minccsj , jdbcType=VARCHAR },'YYYY-MM-DD')</if>
<iftest="sqlwhere != null and sqlwhere != ''"> and ${sqlwhere}</if>
)t7,
(select count(*) dnaxzcjs from TB_RY_RYCJ where (SCBZ='0' or SCBZ is null) and tbbz = '0' and (ifhb is null or ifhb<![CDATA[<>]]>'1') and dnabh is not null
)t7,
(select count(*) dnaxzcjs from TB_RY_RYCJ where (SCBZ='0' or SCBZ is null) and tbbz = '0' and (ifhb is null or ifhb<![CDATA[<>]]>'1') and dnabh is not null
<iftest="lrdwdm != null and lrdwdm != ''"> and lrdwdm like #{lrdwdm , jdbcType=VARCHAR }||'%'</if>
<iftest="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
<iftest="minccsj != null and minccsj != ''"> and lrsj <![CDATA[>=]]> to_date(#{minccsj , jdbcType=VARCHAR },'YYYY-MM-DD')</if>
<iftest="sqlwhere != null and sqlwhere != ''"> and ${sqlwhere}</if>
)t71,
(select count(*) dnawcjs from TB_RY_RYCJ where (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and dnabh is null
)t71,
(select count(*) dnawcjs from TB_RY_RYCJ where (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and dnabh is null
<iftest="lrdwdm != null and lrdwdm != ''"> and lrdwdm like #{lrdwdm , jdbcType=VARCHAR }||'%'</if>
<iftest="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
<iftest="minccsj != null and minccsj != ''"> and lrsj <![CDATA[>=]]> to_date(#{minccsj , jdbcType=VARCHAR },'YYYY-MM-DD')</if>
<iftest="sqlwhere != null and sqlwhere != ''"> and ${sqlwhere}</if>
select substr(substr(lrdwdm,1,${unitgrade})||'000000000000',1,12) code,count(*) zwcjs from TB_RY_RYCJ where (SCBZ='0' or SCBZ is null) and szzwbh is not null
select substr(substr(lrdwdm,1,${unitgrade})||'000000000000',1,12) code,count(*) zwcjs from TB_RY_RYCJ where (SCBZ='0' or SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and (tbbz = '1' or tbbz = '2') and szzwbh is not null
<iftest="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
<iftest="minccsj != null and minccsj != ''"> and lrsj <![CDATA[>=]]> to_date(#{minccsj , jdbcType=VARCHAR },'YYYY-MM-DD')</if>
<iftest="sqlwhere != null and sqlwhere != ''"> and ${sqlwhere}</if>
select substr(substr(lrdwdm,1,${unitgrade})||'000000000000',1,12) code,count(*) zjcjs from TB_RY_RYCJ p,(select rybh swrybh from tb_xw_ythcj_zj group by rybh) s where p.rybh=s.swrybh(+) and (p.SCBZ='0' or p.SCBZ is null) and s.swrybh is not null
select substr(substr(lrdwdm,1,${unitgrade})||'000000000000',1,12) code,count(*) zjcjs from TB_RY_RYCJ p,(select rybh swrybh from tb_xw_ythcj_zj group by rybh) s where p.rybh=s.swrybh(+) and (p.SCBZ='0' or p.SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and (tbbz = '1' or tbbz = '2') and s.swrybh is not null
<iftest="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
<iftest="minccsj != null and minccsj != ''"> and lrsj <![CDATA[>=]]> to_date(#{minccsj , jdbcType=VARCHAR },'YYYY-MM-DD')</if>
<iftest="sqlwhere != null and sqlwhere != ''"> and ${sqlwhere}</if>
select substr(substr(lrdwdm,1,${unitgrade})||'000000000000',1,12) code,count(*) hmcjs from TB_RY_RYCJ p,(select rybh swrybh from tb_xw_ythcj_hm group by rybh) s where p.rybh=s.swrybh(+) and (p.SCBZ='0' or p.SCBZ is null) and s.swrybh is not null
select substr(substr(lrdwdm,1,${unitgrade})||'000000000000',1,12) code,count(*) hmcjs from TB_RY_RYCJ p,(select rybh swrybh from tb_xw_ythcj_hm group by rybh) s where p.rybh=s.swrybh(+) and (p.SCBZ='0' or p.SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and (tbbz = '1' or tbbz = '2') and s.swrybh is not null
<iftest="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
<iftest="minccsj != null and minccsj != ''"> and lrsj <![CDATA[>=]]> to_date(#{minccsj , jdbcType=VARCHAR },'YYYY-MM-DD')</if>
<iftest="sqlwhere != null and sqlwhere != ''"> and ${sqlwhere}</if>
select substr(substr(lrdwdm,1,${unitgrade})||'000000000000',1,12) code,count(*) swcjs from TB_RY_RYCJ p,(select rybh swrybh from tb_xw_ythcj_sw group by rybh) s where p.rybh=s.swrybh(+) and (p.SCBZ='0' or p.SCBZ is null) and s.swrybh is not null
select substr(substr(lrdwdm,1,${unitgrade})||'000000000000',1,12) code,count(*) swcjs from TB_RY_RYCJ p,(select rybh swrybh from tb_xw_ythcj_sw group by rybh) s where p.rybh=s.swrybh(+) and (p.SCBZ='0' or p.SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and (tbbz = '1' or tbbz = '2') and s.swrybh is not null
<iftest="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
<iftest="minccsj != null and minccsj != ''"> and lrsj <![CDATA[>=]]> to_date(#{minccsj , jdbcType=VARCHAR },'YYYY-MM-DD')</if>
<iftest="sqlwhere != null and sqlwhere != ''"> and ${sqlwhere}</if>
select substr(substr(substr(lrdwdm,1,${unitgrade})||'000000000000',1,12)||'000000000000',1,12) code,count(*) sjycs from TB_RY_RYCJ where (TB_RY_RYCJ.SCBZ='0' or TB_RY_RYCJ.SCBZ is null)
select substr(substr(substr(lrdwdm,1,${unitgrade})||'000000000000',1,12)||'000000000000',1,12) code,count(*) sjycs from TB_RY_RYCJ where (TB_RY_RYCJ.SCBZ='0' or TB_RY_RYCJ.SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and (tbbz = '1' or tbbz = '2') and (sjbs<![CDATA[<>]]>'0' or sjbs is null)
<iftest="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
<iftest="minccsj != null and minccsj != ''"> and lrsj <![CDATA[>=]]> to_date(#{minccsj , jdbcType=VARCHAR },'YYYY-MM-DD')</if>
<iftest="sqlwhere != null and sqlwhere != ''"> and ${sqlwhere}</if>
select substr(substr(p.lrdwdm,1,${unitgrade})||'000000000000',1,12) code,count(*) sjcjs from TB_RY_RYCJ p,(select sjcj.xyrbh rybh, count(*) iftxlcj from TB_PH_LXRXX sjcj where sjcj.SCBZ = '0' group by sjcj.xyrbh) rt,
(select sjcj.xyrbh rybh, count(*) iftxlcj from TB_PH_FZXYRSJGL sjcj where sjcj.SCBZ = '0' group by sjcj.xyrbh) sj
where p.rybh = rt.rybh(+) and p.rybh = sj.rybh(+) and (rt.rybh is not null or sj.rybh is not null) and (p.SCBZ='0' or p.SCBZ is null)
where p.rybh = rt.rybh(+) and p.rybh = sj.rybh(+) and (rt.rybh is not null and sj.rybh is not null) and (p.SCBZ='0' or p.SCBZ is null) and (p.ifhb is null or p.ifhb<![CDATA[<>]]>'1') and (p.tbbz = '1' or p.tbbz = '2') and (p.sjbs<![CDATA[<>]]>'0' or p.sjbs is null)
<iftest="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
<iftest="minccsj != null and minccsj != ''"> and lrsj <![CDATA[>=]]> to_date(#{minccsj , jdbcType=VARCHAR },'YYYY-MM-DD')</if>
<iftest="sqlwhere != null and sqlwhere != ''"> and ${sqlwhere}</if>
...
...
@@ -441,7 +441,7 @@
and p.rybh=lxrxx.xyrbh(+)
and p.rybh=dxjl.xyrbh(+)
and p.rybh=thjl.xyrbh(+)
and (p.SCBZ='0' or p.SCBZ is null)
and (p.SCBZ='0' or p.SCBZ is null) and (p.ifhb is null or p.ifhb<![CDATA[<>]]>'1') and (p.tbbz = '1' or p.tbbz = '2') and (p.sjbs<![CDATA[<>]]>'0' or p.sjbs is null)
and sj.xyrbh is not null
and lxrxx.xyrbh is not null and dxjl.xyrbh is not null and thjl.xyrbh is not null
<iftest="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
select substr(substr(lrdwdm,1,${unitgrade})||'000000000000',1,12) code,count(*) dnacjs from TB_RY_RYCJ where (TB_RY_RYCJ.SCBZ='0' or TB_RY_RYCJ.SCBZ is null) and dnabh is not null
select substr(substr(lrdwdm,1,${unitgrade})||'000000000000',1,12) code,count(*) dnacjs from TB_RY_RYCJ where (TB_RY_RYCJ.SCBZ='0' or TB_RY_RYCJ.SCBZ is null) and (ifhb is null or ifhb<![CDATA[<>]]>'1') and (tbbz = '1' or tbbz = '2') and dnabh is not null
<iftest="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
<iftest="minccsj != null and minccsj != ''"> and lrsj <![CDATA[>=]]> to_date(#{minccsj , jdbcType=VARCHAR },'YYYY-MM-DD')</if>
<iftest="sqlwhere != null and sqlwhere != ''"> and ${sqlwhere}</if>