trunc((select sum(count(*)) from M_TSXQ a,s_tslx b where a.tslxid = b.tslxid <iftest="year != null and year !='' "> and to_char(a.tssj,'yyyy') = #{year} </if> and b.zlx = 1 group by grzh)/(select count(*) from SX2020.wxn_user) ,6)*100
trunc((select sum(count(*)) from M_TSXQ a,s_tslx b where a.tslxid = b.tslxid <iftest="year != null and year !='' "> and to_char(a.tssj,'yyyy') = #{year} </if> and b.zlx = 1 group by grzh)/(select count(*) from GJJ80.wxn_user) ,6)*100
,'999990.9999') ||'%' tslzb,
,'999990.9999') ||'%' tslzb,
to_char(
to_char(
1-trunc((select sum(count(*)) from M_TSXQ a,s_tslx b where a.tslxid = b.tslxid <iftest="year != null and year !='' "> and to_char(a.tssj,'yyyy') = #{year} </if> and b.zlx = 1 group by grzh)/(select count(*) from SX2020.wxn_user) ,6)*100
1-trunc((select sum(count(*)) from M_TSXQ a,s_tslx b where a.tslxid = b.tslxid <iftest="year != null and year !='' "> and to_char(a.tssj,'yyyy') = #{year} </if> and b.zlx = 1 group by grzh)/(select count(*) from GJJ80.wxn_user) ,6)*100
,'999990.9999') ||'%' ftslzb,
,'999990.9999') ||'%' ftslzb,
trunc((select sum(count(*)) from M_TSXQ a,s_tslx b where a.tslxid = b.tslxid <iftest="year != null and year !='' "> and to_char(a.tssj,'yyyy') = #{year} </if> and b.zlx = 1 group by grzh)/(select count(*) from SX2020.wxn_user) ,6)*100
trunc((select sum(count(*)) from M_TSXQ a,s_tslx b where a.tslxid = b.tslxid <iftest="year != null and year !='' "> and to_char(a.tssj,'yyyy') = #{year} </if> and b.zlx = 1 group by grzh)/(select count(*) from GJJ80.wxn_user) ,6)*100
tslsl,
tslsl,
1-trunc((select sum(count(*)) from M_TSXQ a,s_tslx b where a.tslxid = b.tslxid <iftest="year != null and year !='' "> and to_char(a.tssj,'yyyy') = #{year} </if> and b.zlx = 1 group by grzh)/(select count(*) from SX2020.wxn_user) ,6)*100
1-trunc((select sum(count(*)) from M_TSXQ a,s_tslx b where a.tslxid = b.tslxid <iftest="year != null and year !='' "> and to_char(a.tssj,'yyyy') = #{year} </if> and b.zlx = 1 group by grzh)/(select count(*) from GJJ80.wxn_user) ,6)*100
WHERE 1=1 <iftest="year != null and year !='' "> and TO_CHAR(SENDTIME,'YYYY') = #{year} </if>)
WHERE 1=1 <iftest="year != null and year !='' "> and TO_CHAR(SENDTIME,'YYYY') = #{year} </if>)
</select>
</select>
...
@@ -229,11 +229,11 @@ WHERE 1=1 <if test="year != null and year !='' "> and TO_CHAR(SENDTIME,'YYYY') =
...
@@ -229,11 +229,11 @@ WHERE 1=1 <if test="year != null and year !='' "> and TO_CHAR(SENDTIME,'YYYY') =
<selectid="qdyhtjfx"resultType="map">
<selectid="qdyhtjfx"resultType="map">
<![CDATA[
<![CDATA[
SELECT zcqdid AS QDID,qdmc,zcyh,round(zczb,4)*100||'%' zczb,hdyh,round(hdzb,4)*100||'%' hdzb,nvl(trunc((hdyh/(select count(*) from SX2020.wxn_user))*100,4),'0') hdyhzb1,nvl(trunc((hdyh/(select count(*) from SX2020.wxn_user))*100,4)||'%','0%') hdyhzb2 FROM(
SELECT zcqdid AS QDID,qdmc,zcyh,round(zczb,4)*100||'%' zczb,hdyh,round(hdzb,4)*100||'%' hdzb,nvl(trunc((hdyh/(select count(*) from GJJ80.wxn_user))*100,4),'0') hdyhzb1,nvl(trunc((hdyh/(select count(*) from GJJ80.wxn_user))*100,4)||'%','0%') hdyhzb2 FROM(
select zcqdid,zcyh,zcyh/(select count(*) as YHZS from SX2020.gj_grxx) AS ZCZB from (
select zcqdid,zcyh,zcyh/(select count(*) as YHZS from GJJ80.gj_grxx) AS ZCZB from (
select zcqdid,count(*) zcyh from SX2020.wxn_user group by zcqdid
select zcqdid,count(*) zcyh from GJJ80.wxn_user group by zcqdid
)) A,(
)) A,(
select zhdlqdid,hdyh,hdyh/(select count(*) from SX2020.wxn_user) AS HDZB from (
select zhdlqdid,hdyh,hdyh/(select count(*) from GJJ80.wxn_user) AS HDZB from (
select qdid as zhdlqdid, count(grzh) hdyh from (select qdid,grzh from m_ywblxq where qdid!='09' and blsj between add_months(sysdate,-6) and sysdate and grzh is not null group by qdid, grzh) group by qdid
select qdid as zhdlqdid, count(grzh) hdyh from (select qdid,grzh from m_ywblxq where qdid!='09' and blsj between add_months(sysdate,-6) and sysdate and grzh is not null group by qdid, grzh) group by qdid
)) B ,
)) B ,
(select qdmc,qdid from s_qdzd ) C
(select qdmc,qdid from s_qdzd ) C
...
@@ -246,11 +246,11 @@ WHERE 1=1 <if test="year != null and year !='' "> and TO_CHAR(SENDTIME,'YYYY') =
...
@@ -246,11 +246,11 @@ WHERE 1=1 <if test="year != null and year !='' "> and TO_CHAR(SENDTIME,'YYYY') =
(select count(*) from m_qdfwxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 18 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 30 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '02') age1830,
(select count(*) from m_qdfwxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 18 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 30 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '02') age1830,
(select count(*) from m_qdfwxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 30 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 40 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '02') age3040,
(select count(*) from m_qdfwxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 30 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 40 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '02') age3040,
(select count(*) from m_qdfwxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 40 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 50 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '02') age4050,
(select count(*) from m_qdfwxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 40 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 50 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '02') age4050,
(select count(*) from m_qdfwxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 50 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 65 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '02') age5065,
(select count(*) from m_qdfwxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 50 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 65 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '02') age5065,
(select count(*) from m_qdfwxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 65 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '02') age65
(select count(*) from m_qdfwxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 65 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '02') age65
from dual
from dual
union
union
select '05' qdid,
select '05' qdid,
(select count(*) from m_qdfwxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 18 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 30 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '05') age1830,
(select count(*) from m_qdfwxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 18 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 30 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '05') age1830,
(select count(*) from m_qdfwxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 30 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 40 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '05') age3040,
(select count(*) from m_qdfwxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 30 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 40 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '05') age3040,
(select count(*) from m_qdfwxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 40 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 50 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '05') age4050,
(select count(*) from m_qdfwxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 40 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 50 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '05') age4050,
(select count(*) from m_qdfwxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 50 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 65 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '05') age5065,
(select count(*) from m_qdfwxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 50 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 65 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '05') age5065,
(select count(*) from m_qdfwxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 65 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '05') age65
(select count(*) from m_qdfwxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 65 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '05') age65
from dual
from dual
union
union
select '06' qdid,
select '06' qdid,
(select count(*) from m_qdfwxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 18 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 30 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '06') age1830,
(select count(*) from m_qdfwxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 18 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 30 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '06') age1830,
(select count(*) from m_qdfwxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 30 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 40 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '06') age3040,
(select count(*) from m_qdfwxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 30 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 40 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '06') age3040,
(select count(*) from m_qdfwxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 40 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 50 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '06') age4050,
(select count(*) from m_qdfwxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 40 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 50 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '06') age4050,
(select count(*) from m_qdfwxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 50 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 65 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '06') age5065,
(select count(*) from m_qdfwxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 50 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 65 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '06') age5065,
(select count(*) from m_qdfwxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 65 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '06') age65
(select count(*) from m_qdfwxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 65 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '06') age65
from dual
from dual
union
union
select '07' qdid,
select '07' qdid,
(select count(*) from m_qdfwxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 18 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 30 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '07') age1830,
(select count(*) from m_qdfwxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 18 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 30 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '07') age1830,
(select count(*) from m_qdfwxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 30 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 40 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '07') age3040,
(select count(*) from m_qdfwxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 30 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 40 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '07') age3040,
(select count(*) from m_qdfwxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 40 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 50 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '07') age4050,
(select count(*) from m_qdfwxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 40 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 50 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '07') age4050,
(select count(*) from m_qdfwxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 50 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 65 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '07') age5065,
(select count(*) from m_qdfwxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 50 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 65 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '07') age5065,
(select count(*) from m_qdfwxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 65 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '07') age65
(select count(*) from m_qdfwxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 65 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '07') age65
(select count(*) from m_ywfwxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 18 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 30 <iftest="qssj != null and qssj !='' and zzsj != null and zzsj !=''">and to_char(a.fwsj,'yyyy-mm-dd') between #{qssj} and #{zzsj}</if> and a.ywlxbm = #{ywbm}) age1830,
(select count(*) from m_ywfwxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 18 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 30 <iftest="qssj != null and qssj !='' and zzsj != null and zzsj !=''">and to_char(a.fwsj,'yyyy-mm-dd') between #{qssj} and #{zzsj}</if> and a.ywlxbm = #{ywbm}) age1830,
(select count(*) from m_ywfwxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 30 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 40 <iftest="qssj != null and qssj !='' and zzsj != null and zzsj !=''">and to_char(a.fwsj,'yyyy-mm-dd') between #{qssj} and #{zzsj}</if> and a.ywlxbm = #{ywbm}) age3040,
(select count(*) from m_ywfwxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 30 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 40 <iftest="qssj != null and qssj !='' and zzsj != null and zzsj !=''">and to_char(a.fwsj,'yyyy-mm-dd') between #{qssj} and #{zzsj}</if> and a.ywlxbm = #{ywbm}) age3040,
(select count(*) from m_ywfwxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 40 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 50 <iftest="qssj != null and qssj !='' and zzsj != null and zzsj !=''">and to_char(a.fwsj,'yyyy-mm-dd') between #{qssj} and #{zzsj}</if> and a.ywlxbm = #{ywbm}) age4050,
(select count(*) from m_ywfwxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 40 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 50 <iftest="qssj != null and qssj !='' and zzsj != null and zzsj !=''">and to_char(a.fwsj,'yyyy-mm-dd') between #{qssj} and #{zzsj}</if> and a.ywlxbm = #{ywbm}) age4050,
(select count(*) from m_ywfwxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 50 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 65 <iftest="qssj != null and qssj !='' and zzsj != null and zzsj !=''">and to_char(a.fwsj,'yyyy-mm-dd') between #{qssj} and #{zzsj}</if> and a.ywlxbm = #{ywbm}) age5065,
(select count(*) from m_ywfwxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 50 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 65 <iftest="qssj != null and qssj !='' and zzsj != null and zzsj !=''">and to_char(a.fwsj,'yyyy-mm-dd') between #{qssj} and #{zzsj}</if> and a.ywlxbm = #{ywbm}) age5065,
(select count(*) from m_ywfwxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 65 <iftest="qssj != null and qssj !='' and zzsj != null and zzsj !=''"> and to_char(a.fwsj,'yyyy-mm-dd') between #{qssj} and #{zzsj}</if> and a.ywlxbm = #{ywbm}) age65
(select count(*) from m_ywfwxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 65 <iftest="qssj != null and qssj !='' and zzsj != null and zzsj !=''"> and to_char(a.fwsj,'yyyy-mm-dd') between #{qssj} and #{zzsj}</if> and a.ywlxbm = #{ywbm}) age65
from dual
from dual
</select>
</select>
...
@@ -415,7 +415,7 @@ union
...
@@ -415,7 +415,7 @@ union
(
(
SELECT LEVEL ID FROM DUAL CONNECT BY LEVEL <=12) T0,
SELECT LEVEL ID FROM DUAL CONNECT BY LEVEL <=12) T0,
(select count(*) from SX2020.wxn_user a where to_char(sysdate,'yyyy')-substr(a.csny,1,4) > 18 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) <= 30) age1830,
(select count(*) from GJJ80.wxn_user a where to_char(sysdate,'yyyy')-substr(a.csny,1,4) > 18 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) <= 30) age1830,
(select count(*) from SX2020.wxn_user a where to_char(sysdate,'yyyy')-substr(a.csny,1,4) > 30 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) <= 40) age3040,
(select count(*) from GJJ80.wxn_user a where to_char(sysdate,'yyyy')-substr(a.csny,1,4) > 30 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) <= 40) age3040,
(select count(*) from SX2020.wxn_user a where to_char(sysdate,'yyyy')-substr(a.csny,1,4) > 40 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) <= 50) age4050,
(select count(*) from GJJ80.wxn_user a where to_char(sysdate,'yyyy')-substr(a.csny,1,4) > 40 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) <= 50) age4050,
(select count(*) from SX2020.wxn_user a where to_char(sysdate,'yyyy')-substr(a.csny,1,4) > 50 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) <= 65) age5065,
(select count(*) from GJJ80.wxn_user a where to_char(sysdate,'yyyy')-substr(a.csny,1,4) > 50 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) <= 65) age5065,
(select count(*) from SX2020.wxn_user a where to_char(sysdate,'yyyy')-substr(a.csny,1,4) > 65)age65
(select count(*) from GJJ80.wxn_user a where to_char(sysdate,'yyyy')-substr(a.csny,1,4) > 65)age65
(select count(*) from SX2020.wxn_user a where a.denglurq between add_months(sysdate,-6) and sysdate and to_char(sysdate,'yyyy')-substr(a.csny,1,4) > 18 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) <= 30) age1830,
(select count(*) from GJJ80.wxn_user a where a.denglurq between add_months(sysdate,-6) and sysdate and to_char(sysdate,'yyyy')-substr(a.csny,1,4) > 18 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) <= 30) age1830,
(select count(*) from SX2020.wxn_user a where a.denglurq between add_months(sysdate,-6) and sysdate and to_char(sysdate,'yyyy')-substr(a.csny,1,4) > 30 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) <= 40) age3040,
(select count(*) from GJJ80.wxn_user a where a.denglurq between add_months(sysdate,-6) and sysdate and to_char(sysdate,'yyyy')-substr(a.csny,1,4) > 30 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) <= 40) age3040,
(select count(*) from SX2020.wxn_user a where a.denglurq between add_months(sysdate,-6) and sysdate and to_char(sysdate,'yyyy')-substr(a.csny,1,4) > 40 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) <= 50) age4050,
(select count(*) from GJJ80.wxn_user a where a.denglurq between add_months(sysdate,-6) and sysdate and to_char(sysdate,'yyyy')-substr(a.csny,1,4) > 40 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) <= 50) age4050,
(select count(*) from SX2020.wxn_user a where a.denglurq between add_months(sysdate,-6) and sysdate and to_char(sysdate,'yyyy')-substr(a.csny,1,4) > 50 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) <= 65) age5065,
(select count(*) from GJJ80.wxn_user a where a.denglurq between add_months(sysdate,-6) and sysdate and to_char(sysdate,'yyyy')-substr(a.csny,1,4) > 50 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) <= 65) age5065,
(select count(*) from SX2020.wxn_user a where a.denglurq between add_months(sysdate,-6) and sysdate and to_char(sysdate,'yyyy')-substr(a.csny,1,4) > 65)age65
(select count(*) from GJJ80.wxn_user a where a.denglurq between add_months(sysdate,-6) and sysdate and to_char(sysdate,'yyyy')-substr(a.csny,1,4) > 65)age65
from dual
from dual
</select>
</select>
...
@@ -614,8 +614,8 @@ from dual
...
@@ -614,8 +614,8 @@ from dual
select trunc((1-manhdyhzb)*100,2) womenhdyhzb,trunc(manhdyhzb*100,2) as manhdyhzb from (
select trunc((1-manhdyhzb)*100,2) womenhdyhzb,trunc(manhdyhzb*100,2) as manhdyhzb from (
select
select
(
(
(select hdyh from (select sum(case when denglurq between add_months(sysdate,-6) and sysdate then 1 else 0 end) hdyh from SX2020.wxn_user where zhdlqdid is not null and xingbie = '1'))/
(select hdyh from (select sum(case when denglurq between add_months(sysdate,-6) and sysdate then 1 else 0 end) hdyh from GJJ80.wxn_user where zhdlqdid is not null and xingbie = '1'))/
(select hdyh from (select sum(case when denglurq between add_months(sysdate,-6) and sysdate then 1 else 0 end) hdyh from SX2020.wxn_user where zhdlqdid is not null))) manhdyhzb
(select hdyh from (select sum(case when denglurq between add_months(sysdate,-6) and sysdate then 1 else 0 end) hdyh from GJJ80.wxn_user where zhdlqdid is not null))) manhdyhzb
from dual
from dual
)
)
</select>
</select>
...
@@ -626,8 +626,8 @@ from dual
...
@@ -626,8 +626,8 @@ from dual
from
from
(
(
select
select
((select count(*) zcyh from SX2020.wxn_user where xingbie = '1')/
((select count(*) zcyh from GJJ80.wxn_user where xingbie = '1')/
(select count(*) zcyh from SX2020.wxn_user)) manzcyhzb
(select count(*) zcyh from GJJ80.wxn_user)) manzcyhzb
from dual
from dual
)
)
</select>
</select>
...
@@ -672,7 +672,7 @@ dual) b
...
@@ -672,7 +672,7 @@ dual) b
(
(
select zs.zsl,ts.tssl from
select zs.zsl,ts.tssl from
(select count(*) tssl from M_TSXQ a ,s_tslx b where a.tslxid = b.tslxid and b.zlx = 1 <iftest="year != null and year !='' "> and to_char(a.tssj,'yyyy') = #{year}</if> ) ts,
(select count(*) tssl from M_TSXQ a ,s_tslx b where a.tslxid = b.tslxid and b.zlx = 1 <iftest="year != null and year !='' "> and to_char(a.tssj,'yyyy') = #{year}</if> ) ts,
(select count(*) from m_ywblxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 18 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 30 <iftest="qssj != null and qssj !='' and zzsj != null and zzsj !=''">and to_char(a.blsj,'yyyy-mm-dd') between #{qssj} and #{zzsj}</if> and a.ywlx = #{ywbm}) age1830,
(select count(*) from m_ywblxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 18 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 30 <iftest="qssj != null and qssj !='' and zzsj != null and zzsj !=''">and to_char(a.blsj,'yyyy-mm-dd') between #{qssj} and #{zzsj}</if> and a.ywlx = #{ywbm}) age1830,
(select count(*) from m_ywblxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 30 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 40 <iftest="qssj != null and qssj !='' and zzsj != null and zzsj !=''">and to_char(a.blsj,'yyyy-mm-dd') between #{qssj} and #{zzsj}</if> and a.ywlx = #{ywbm}) age3040,
(select count(*) from m_ywblxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 30 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 40 <iftest="qssj != null and qssj !='' and zzsj != null and zzsj !=''">and to_char(a.blsj,'yyyy-mm-dd') between #{qssj} and #{zzsj}</if> and a.ywlx = #{ywbm}) age3040,
(select count(*) from m_ywblxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 40 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 50 <iftest="qssj != null and qssj !='' and zzsj != null and zzsj !=''">and to_char(a.blsj,'yyyy-mm-dd') between #{qssj} and #{zzsj}</if> and a.ywlx = #{ywbm}) age4050,
(select count(*) from m_ywblxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 40 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 50 <iftest="qssj != null and qssj !='' and zzsj != null and zzsj !=''">and to_char(a.blsj,'yyyy-mm-dd') between #{qssj} and #{zzsj}</if> and a.ywlx = #{ywbm}) age4050,
(select count(*) from m_ywblxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 50 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 65 <iftest="qssj != null and qssj !='' and zzsj != null and zzsj !=''">and to_char(a.blsj,'yyyy-mm-dd') between #{qssj} and #{zzsj}</if> and a.ywlx = #{ywbm}) age5065,
(select count(*) from m_ywblxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 50 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) <= 65 <iftest="qssj != null and qssj !='' and zzsj != null and zzsj !=''">and to_char(a.blsj,'yyyy-mm-dd') between #{qssj} and #{zzsj}</if> and a.ywlx = #{ywbm}) age5065,
(select count(*) from m_ywblxq a,SX2020.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 65 <iftest="qssj != null and qssj !='' and zzsj != null and zzsj !=''"> and to_char(a.blsj,'yyyy-mm-dd') between #{qssj} and #{zzsj}</if> and a.ywlx = #{ywbm}) age65
(select count(*) from m_ywblxq a,GJJ80.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) > 65 <iftest="qssj != null and qssj !='' and zzsj != null and zzsj !=''"> and to_char(a.blsj,'yyyy-mm-dd') between #{qssj} and #{zzsj}</if> and a.ywlx = #{ywbm}) age65
from SX2020.wxn_user w inner join s_qdzd a on w.zcqdid = a.qdid inner join s_qdzd b on w.zhdlqdid = b.qdid and w.grzh is not null and (INSTR(w.ZJHM || ',' || w.XINGMING || ',' || w.GRZH, #{data}) > 0 OR #{data} IS NULL)
from GJJ80.wxn_user w inner join s_qdzd a on w.zcqdid = a.qdid inner join s_qdzd b on w.zhdlqdid = b.qdid and w.grzh is not null and (INSTR(w.ZJHM || ',' || w.XINGMING || ',' || w.GRZH, #{data}) > 0 OR #{data} IS NULL)
<iftest="yhlb != null and yhlb !=''">and iszx = #{yhlb}</if>
<iftest="yhlb != null and yhlb !=''">and iszx = #{yhlb}</if>
<choose>
<choose>
<whentest="zckssj != null and zckssj !='' and zcjssj != null and zcjssj !=''">
<whentest="zckssj != null and zckssj !='' and zcjssj != null and zcjssj !=''">
...
@@ -31,16 +31,16 @@
...
@@ -31,16 +31,16 @@
</select>
</select>
<updateid="userInfoUpdate">
<updateid="userInfoUpdate">
update SX2020.wxn_user a set a.grzh = a.grzh <iftest="xingbie != null and xingbie !=''">,a.xingbie = #{xingbie}</if><iftest="xmqp != null and xmqp !=''">,a.xmqp =#{xmqp}</if><iftest="csny != null and csny !=''">,a.csny = #{csny}</if>
update GJJ80.wxn_user a set a.grzh = a.grzh <iftest="xingbie != null and xingbie !=''">,a.xingbie = #{xingbie}</if><iftest="xmqp != null and xmqp !=''">,a.xmqp =#{xmqp}</if><iftest="csny != null and csny !=''">,a.csny = #{csny}</if>
where a.grzh = #{grzh}
where a.grzh = #{grzh}
</update>
</update>
<updateid="iszx">
<updateid="iszx">
update SX2020.wxn_user a set a.iszx = #{iszx},a.zxbz=#{zxbz} where a.grzh = #{grzh}
update GJJ80.wxn_user a set a.iszx = #{iszx},a.zxbz=#{zxbz} where a.grzh = #{grzh}
</update>
</update>
<selectid="zxzt"resultType="string">
<selectid="zxzt"resultType="string">
select iszx from SX2020.wxn_user where grzh = #{grzh}
select iszx from GJJ80.wxn_user where grzh = #{grzh}