Commit 7916c56b authored by yuyanglei's avatar yuyanglei

切换数据库 hg2018. --》 gjj80.

parent 6c4568af
......@@ -4,14 +4,14 @@
<select id="complaintRate" resultType="com.changda.gjjapp.zhfwpt.dto.homepage.ComplaintRateDto">
select
to_char(
trunc((select sum(count(*)) from M_TSXQ a,s_tslx b where a.tslxid = b.tslxid <if test="year != null and year !='' "> and to_char(a.tssj,'yyyy') = #{year} </if> and b.zlx = 1 group by grzh)/(select count(*) from hg2018.wxn_user) ,6)*100
trunc((select sum(count(*)) from M_TSXQ a,s_tslx b where a.tslxid = b.tslxid <if test="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,
to_char(
1-trunc((select sum(count(*)) from M_TSXQ a,s_tslx b where a.tslxid = b.tslxid <if test="year != null and year !='' "> and to_char(a.tssj,'yyyy') = #{year} </if> and b.zlx = 1 group by grzh)/(select count(*) from hg2018.wxn_user) ,6)*100
1-trunc((select sum(count(*)) from M_TSXQ a,s_tslx b where a.tslxid = b.tslxid <if test="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,
trunc((select sum(count(*)) from M_TSXQ a,s_tslx b where a.tslxid = b.tslxid <if test="year != null and year !='' "> and to_char(a.tssj,'yyyy') = #{year} </if> and b.zlx = 1 group by grzh)/(select count(*) from hg2018.wxn_user) ,6)*100
trunc((select sum(count(*)) from M_TSXQ a,s_tslx b where a.tslxid = b.tslxid <if test="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,
1-trunc((select sum(count(*)) from M_TSXQ a,s_tslx b where a.tslxid = b.tslxid <if test="year != null and year !='' "> and to_char(a.tssj,'yyyy') = #{year} </if> and b.zlx = 1 group by grzh)/(select count(*) from hg2018.wxn_user) ,6)*100
1-trunc((select sum(count(*)) from M_TSXQ a,s_tslx b where a.tslxid = b.tslxid <if test="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
ftslsl
from dual
</select>
......
......@@ -34,11 +34,11 @@
<select id="duanXinZTSreach" resultType="map">
select z.zjzxdm ZJZXDM,z.zjzxjc ZJZXJC,(case when z.dxzt = '1' then '开启' when z.dxzt = '0' then '关闭' end ) ZT
,(case when z.dxzt = '1' then 'true' when z.dxzt = '0' then 'fales' end ) DXZT from hg2018.b_zjzx z
,(case when z.dxzt = '1' then 'true' when z.dxzt = '0' then 'fales' end ) DXZT from gjj80..b_zjzx z
</select>
<update id="updateDuanXinZT">
update hg2018.b_zjzx z set z.dxzt = #{dxzt} where z.zjzxdm = #{zjzxdm}
update gjj80..b_zjzx z set z.dxzt = #{dxzt} where z.zjzxdm = #{zjzxdm}
</update>
<select id="qdkzInfo" resultType="map">
......
......@@ -114,7 +114,7 @@
</select>
<select id="dxfsl" resultType="java.lang.Integer">
select count(*) from hg2018.SMS_MONTH_MT where STATE != '-10'
select count(*) from gjj80.SMS_MONTH_MT where STATE != '-10'
</select>
<select id="qdfwlZB" resultType="com.changda.gjjapp.zhfwpt.dto.qdxxgl.QuDaoFWLZBDto">
......@@ -132,7 +132,7 @@ select qd.qdid,qd.qdmc,count(mq.grzh) fwsl
union all
select * from (
SELECT '04' QDID,'12329短信' QDMC,COUNT(*) fwsl
FROM hg2018.SMS_MT
FROM gjj80.SMS_MT
WHERE 1=1 <if test="year != null and year !='' "> and TO_CHAR(SENDTIME,'YYYY') = #{year} </if>)
</select>
......@@ -229,11 +229,11 @@ WHERE 1=1 <if test="year != null and year !='' "> and TO_CHAR(SENDTIME,'YYYY') =
<select id="qdyhtjfx" resultType="map">
<![CDATA[
SELECT zcqdid AS QDID,qdmc,zcyh,round(zczb,4)*100||'%' zczb,hdyh,round(hdzb,4)*100||'%' hdzb,nvl(trunc((hdyh/(select count(*) from hg2018.wxn_user))*100,4),'0') hdyhzb1,nvl(trunc((hdyh/(select count(*) from hg2018.wxn_user))*100,4)||'%','0%') hdyhzb2 FROM(
select zcqdid,zcyh,zcyh/(select count(*) as YHZS from hg2018.gj_grxx) AS ZCZB from (
select zcqdid,count(*) zcyh from hg2018.wxn_user group by zcqdid
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 gjj80.gj_grxx) AS ZCZB from (
select zcqdid,count(*) zcyh from gjj80.wxn_user group by zcqdid
)) A,(
select zhdlqdid,hdyh,hdyh/(select count(*) from hg2018.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
)) B ,
(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') =
<select id="qdyhfxHDYH" resultType="java.lang.Integer">
select
nvl(sum(case when denglurq between add_months(to_date(#{year},'yyyy-mm'),-6) and to_date(#{year},'yyyy-mm') then 1 else 0 end),0) sl
from hg2018.wxn_user where zhdlqdid = #{qdid}
from gjj80.wxn_user where zhdlqdid = #{qdid}
</select>
<select id="qdyhfxZCS" resultType="java.lang.Integer">
select nvl(count(*),0) from hg2018.wxn_user where to_char(zhucerq,'yyyy-mm') = to_char(to_date(#{year},'yyyy-mm'),'yyyy-mm') and zcqdid = #{qdid}
select nvl(count(*),0) from gjj80.wxn_user where to_char(zhucerq,'yyyy-mm') = to_char(to_date(#{year},'yyyy-mm'),'yyyy-mm') and zcqdid = #{qdid}
</select>
<insert id="insertQDFWL">
......@@ -314,35 +314,35 @@ from dual
<select id="qdfwnldTj" resultType="com.changda.gjjapp.zhfwpt.dto.qdxxgl.QdfwnldTjDto">
<![CDATA[
select '02' qdid,
(select count(*) from m_qdfwxq a,hg2018.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,hg2018.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,hg2018.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,hg2018.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,hg2018.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) > 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) > 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) > 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) > 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) > 65 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '02') age65
from dual
union
select '05' qdid,
(select count(*) from m_qdfwxq a,hg2018.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,hg2018.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,hg2018.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,hg2018.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,hg2018.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) > 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) > 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) > 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) > 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) > 65 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '05') age65
from dual
union
select '06' qdid,
(select count(*) from m_qdfwxq a,hg2018.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,hg2018.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,hg2018.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,hg2018.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,hg2018.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) > 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) > 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) > 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) > 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) > 65 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '06') age65
from dual
union
select '07' qdid,
(select count(*) from m_qdfwxq a,hg2018.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,hg2018.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,hg2018.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,hg2018.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,hg2018.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) > 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) > 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) > 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) > 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) > 65 and to_char(a.fwsj,'yyyy') = #{year} and a.qdid = '07') age65
from dual
]]>
......@@ -351,11 +351,11 @@ from dual
<select id="qdywnldfwtj" resultType="com.changda.gjjapp.zhfwpt.dto.qdxxgl.QdfwnldTjDto">
select
(select count(*) from m_ywfwxq a,hg2018.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) &gt; 18 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) &lt;= 30 <if test="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,hg2018.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) &gt; 30 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) &lt;= 40 <if test="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,hg2018.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) &gt; 40 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) &lt;= 50 <if test="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,hg2018.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) &gt; 50 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) &lt;= 65 <if test="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,hg2018.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) &gt; 65 <if test="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) &gt; 18 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) &lt;= 30 <if test="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) &gt; 30 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) &lt;= 40 <if test="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) &gt; 40 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) &lt;= 50 <if test="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) &gt; 50 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) &lt;= 65 <if test="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) &gt; 65 <if test="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
</select>
......@@ -415,7 +415,7 @@ union
(
SELECT LEVEL ID FROM DUAL CONNECT BY LEVEL &lt;=12) T0,
(SELECT TO_NUMBER(SUBSTRB(TO_CHAR(SENDTIME,'YYYY-MM'),-2)) MT,COUNT(*) FSL
FROM hg2018.SMS_MT T1
FROM gjj80.SMS_MT T1
WHERE TO_CHAR(SENDTIME,'YYYY') = #{year}
GROUP BY SUBSTRB(TO_CHAR(SENDTIME,'YYYY-MM'),-2))T1
WHERE T0.ID = T1.MT(+)
......@@ -505,8 +505,8 @@ select
from
(
select
(select count(*) from hg2018.wxn_user b where b.zcqdid = '02' and b.xingbie = 1) wtmensl,
(select count(*) from hg2018.wxn_user b where b.zcqdid = '02' and b.xingbie = 2) wtwomensl
(select count(*) from gjj80.wxn_user b where b.zcqdid = '02' and b.xingbie = 1) wtmensl,
(select count(*) from gjj80.wxn_user b where b.zcqdid = '02' and b.xingbie = 2) wtwomensl
from dual
)
union all
......@@ -517,8 +517,8 @@ select
from
(
select
(select count(*) from hg2018.wxn_user b where b.zcqdid = '05' and b.xingbie = 1) wxmensl,
(select count(*) from hg2018.wxn_user b where b.zcqdid = '05' and b.xingbie = 2) wxwomensl
(select count(*) from gjj80.wxn_user b where b.zcqdid = '05' and b.xingbie = 1) wxmensl,
(select count(*) from gjj80.wxn_user b where b.zcqdid = '05' and b.xingbie = 2) wxwomensl
from dual
)
union all
......@@ -529,8 +529,8 @@ select
from
(
select
(select count(*) from hg2018.wxn_user b where b.zcqdid = '06' and b.xingbie = 1) appmensl,
(select count(*) from hg2018.wxn_user b where b.zcqdid = '06' and b.xingbie = 2) appwomensl
(select count(*) from gjj80.wxn_user b where b.zcqdid = '06' and b.xingbie = 1) appmensl,
(select count(*) from gjj80.wxn_user b where b.zcqdid = '06' and b.xingbie = 2) appwomensl
from dual
)
</select>
......@@ -566,14 +566,14 @@ select '十二月' month,count(*) cn from m_xxtx a where to_char(a.sj,'yyyy-mm')
</select>
<select id="userLogoutStatus" resultType="int">
select count(*) cn from hg2018.wxn_user where iszx = '1'
select count(*) cn from gjj80.wxn_user where iszx = '1'
</select>
<select id="wanWomanZB" resultType="com.changda.gjjapp.zhfwpt.dto.qdxxgl.WanWomanZBDto">
select nvl(trunc((man.mansl/zs.zs)*100,2)||'%','0') manzb,nvl(trunc((woman.womansl/zs.zs)*100,2)||'%','0') womanzb,man.mansl mansl,woman.womansl womansl from
(select count(*) zs from hg2018.wxn_user) zs,
(select count(*) mansl from hg2018.wxn_user a where a.xingbie = 1 ) man ,
(select count(*) womansl from hg2018.wxn_user a where a.xingbie = 2) woman
(select count(*) zs from gjj80.wxn_user) zs,
(select count(*) mansl from gjj80.wxn_user a where a.xingbie = 1 ) man ,
(select count(*) womansl from gjj80.wxn_user a where a.xingbie = 2) woman
</select>
<select id="qdywzb" resultType="com.changda.gjjapp.zhfwpt.dto.qdxxgl.QdywzbDto">
......@@ -592,21 +592,21 @@ from
<select id="zcyhnlFX" resultType="com.changda.gjjapp.zhfwpt.dto.qdxxgl.QdfwnldTjDto">
select
(select count(*) from hg2018.wxn_user a where to_char(sysdate,'yyyy')-substr(a.csny,1,4) &gt; 18 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) &lt;= 30) age1830,
(select count(*) from hg2018.wxn_user a where to_char(sysdate,'yyyy')-substr(a.csny,1,4) &gt; 30 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) &lt;= 40) age3040,
(select count(*) from hg2018.wxn_user a where to_char(sysdate,'yyyy')-substr(a.csny,1,4) &gt; 40 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) &lt;= 50) age4050,
(select count(*) from hg2018.wxn_user a where to_char(sysdate,'yyyy')-substr(a.csny,1,4) &gt; 50 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) &lt;= 65) age5065,
(select count(*) from hg2018.wxn_user a where to_char(sysdate,'yyyy')-substr(a.csny,1,4) &gt; 65)age65
(select count(*) from gjj80.wxn_user a where to_char(sysdate,'yyyy')-substr(a.csny,1,4) &gt; 18 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) &lt;= 30) age1830,
(select count(*) from gjj80.wxn_user a where to_char(sysdate,'yyyy')-substr(a.csny,1,4) &gt; 30 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) &lt;= 40) age3040,
(select count(*) from gjj80.wxn_user a where to_char(sysdate,'yyyy')-substr(a.csny,1,4) &gt; 40 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) &lt;= 50) age4050,
(select count(*) from gjj80.wxn_user a where to_char(sysdate,'yyyy')-substr(a.csny,1,4) &gt; 50 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) &lt;= 65) age5065,
(select count(*) from gjj80.wxn_user a where to_char(sysdate,'yyyy')-substr(a.csny,1,4) &gt; 65)age65
from dual
</select>
<select id="hdyhnlfx" resultType="com.changda.gjjapp.zhfwpt.dto.qdxxgl.QdfwnldTjDto">
select
(select count(*) from hg2018.wxn_user a where a.denglurq between add_months(sysdate,-6) and sysdate and to_char(sysdate,'yyyy')-substr(a.csny,1,4) &gt; 18 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) &lt;= 30) age1830,
(select count(*) from hg2018.wxn_user a where a.denglurq between add_months(sysdate,-6) and sysdate and to_char(sysdate,'yyyy')-substr(a.csny,1,4) &gt; 30 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) &lt;= 40) age3040,
(select count(*) from hg2018.wxn_user a where a.denglurq between add_months(sysdate,-6) and sysdate and to_char(sysdate,'yyyy')-substr(a.csny,1,4) &gt; 40 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) &lt;= 50) age4050,
(select count(*) from hg2018.wxn_user a where a.denglurq between add_months(sysdate,-6) and sysdate and to_char(sysdate,'yyyy')-substr(a.csny,1,4) &gt; 50 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) &lt;= 65) age5065,
(select count(*) from hg2018.wxn_user a where a.denglurq between add_months(sysdate,-6) and sysdate and to_char(sysdate,'yyyy')-substr(a.csny,1,4) &gt; 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) &gt; 18 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) &lt;= 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) &gt; 30 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) &lt;= 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) &gt; 40 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) &lt;= 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) &gt; 50 and to_char(sysdate,'yyyy')-substr(a.csny,1,4) &lt;= 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) &gt; 65)age65
from dual
</select>
......@@ -614,8 +614,8 @@ from dual
select trunc((1-manhdyhzb)*100,2) womenhdyhzb,trunc(manhdyhzb*100,2) as manhdyhzb from (
select
(
(select hdyh from (select sum(case when denglurq between add_months(sysdate,-6) and sysdate then 1 else 0 end) hdyh from hg2018.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 hg2018.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 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))) manhdyhzb
from dual
)
</select>
......@@ -626,8 +626,8 @@ from dual
from
(
select
((select count(*) zcyh from hg2018.wxn_user where xingbie = '1')/
(select count(*) zcyh from hg2018.wxn_user)) manzcyhzb
((select count(*) zcyh from gjj80.wxn_user where xingbie = '1')/
(select count(*) zcyh from gjj80.wxn_user)) manzcyhzb
from dual
)
</select>
......@@ -672,7 +672,7 @@ dual) b
(
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 <if test="year != null and year !='' "> and to_char(a.tssj,'yyyy') = #{year}</if> ) ts,
(select count(*) zsl from hg2018.wxn_user) zs
(select count(*) zsl from gjj80.wxn_user) zs
)
</select>
......
......@@ -157,11 +157,11 @@
<select id="qdywblgnldTj" resultType="com.changda.gjjapp.zhfwpt.dto.qdxxgl.QdfwnldTjDto">
select
(select count(*) from m_ywblxq a,hg2018.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) &gt; 18 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) &lt;= 30 <if test="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,hg2018.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) &gt; 30 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) &lt;= 40 <if test="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,hg2018.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) &gt; 40 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) &lt;= 50 <if test="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,hg2018.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) &gt; 50 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) &lt;= 65 <if test="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,hg2018.wxn_user b where a.grzh = b.grzh and to_char(sysdate,'yyyy') - substr(b.csny,1,4) &gt; 65 <if test="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) &gt; 18 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) &lt;= 30 <if test="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) &gt; 30 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) &lt;= 40 <if test="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) &gt; 40 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) &lt;= 50 <if test="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) &gt; 50 and to_char(sysdate,'yyyy') - substr(b.csny,1,4) &lt;= 65 <if test="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) &gt; 65 <if test="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 dual
</select>
......
......@@ -295,7 +295,7 @@
</select>
<select id="selectuserpd" parameterType="String" resultType="Integer">
select count(*) M_COUNT from hg2020.wxn_user where xingming=#{yhxm}
select count(*) M_COUNT from gjj80.wxn_user where xingming=#{yhxm}
</select>
</mapper>
\ No newline at end of file
......@@ -2,15 +2,15 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "mybatis-3-mapper.dtd" >
<mapper namespace="com.changda.gjjapp.zhfwpt.dao.yhxxgl.YHXXGLDao">
<update id="updatePwd">
update hg2018.wxn_user set hg2018.wxn_user.pswd = '888888'
update gjj80..wxn_user set gjj80..wxn_user.pswd = '888888'
where 1=1
<if test="zjhm != null and zjhm !=''">and hg2018.wxn_user.zjhm =#{zjhm}</if>
<if test="grzh != null and grzh !=''">and hg2018.wxn_user.grzh = #{grzh}</if>
<if test="zjhm != null and zjhm !=''">and gjj80..wxn_user.zjhm =#{zjhm}</if>
<if test="grzh != null and grzh !=''">and gjj80..wxn_user.grzh = #{grzh}</if>
</update>
<select id="yongHuXinXiSearch" resultType="com.changda.gjjapp.db.entity.WXN_USER">
select a.qdmc zcqdmc,b.qdmc zhdlqdmc,w.xingming,w.zjhm,w.pswd,w.sjhm,w.zhucerq,w.denglurq,w.grzh,w.zcqdid,w.zhdlqdid,w.xingbie,w.xmqp,w.csny,w.iszx,w.zxbz
from hg2018.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)
<if test="yhlb != null and yhlb !=''">and iszx = #{yhlb}</if>
<choose>
<when test="zckssj != null and zckssj !='' and zcjssj != null and zcjssj !=''">
......@@ -31,16 +31,16 @@
</select>
<update id="userInfoUpdate">
update hg2018.wxn_user a set a.grzh = a.grzh <if test="xingbie != null and xingbie !=''">,a.xingbie = #{xingbie}</if> <if test="xmqp != null and xmqp !=''">,a.xmqp =#{xmqp}</if> <if test="csny != null and csny !=''">,a.csny = #{csny}</if>
update gjj80..wxn_user a set a.grzh = a.grzh <if test="xingbie != null and xingbie !=''">,a.xingbie = #{xingbie}</if> <if test="xmqp != null and xmqp !=''">,a.xmqp =#{xmqp}</if> <if test="csny != null and csny !=''">,a.csny = #{csny}</if>
where a.grzh = #{grzh}
</update>
<update id="iszx">
update hg2018.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>
<select id="zxzt" resultType="string">
select iszx from hg2018.wxn_user where grzh = #{grzh}
select iszx from gjj80..wxn_user where grzh = #{grzh}
</select>
<insert id="userLoginRecording">
......
......@@ -437,17 +437,39 @@ public class QuDaoQuanXianKZServiceImp implements QuDaoQuanXianKongZhiService {
public int qdztkzInterface(String ywbm,String qdid) {
M_YWZTKZ_2 mYwztkz_2 = quDaoQuanXianGuanLiDao.qdztkzInterface(ywbm);
String tstzr = mYwztkz_2.getTstzr();
//特殊时间停止
if (tstzr != null ) {
// 特殊时间停止
if (tstzr != null) {
String[] tstzrs = tstzr.split(",");
for (int i = 0; i < tstzrs.length; i++) {
String tzr = tstzrs[i];
Date dt = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("dd");
String nowday = sdf.format(dt);
if (tzr.equals(nowday)) {
return 0;
String[] tstzsjs = tzr.split("-");
String kssj = tstzsjs[0];// 开始拒绝时间
String jssj = tstzsjs[0].substring(0, 2) + "2359";// 结束拒绝时间
if (tstzsjs.length > 1) {
jssj = tstzsjs[1];
}
if (kssj.length() == 6 && kssj.length() == 6) {
boolean kssj_f = false;
if (kssj.matches("^[0-3][0-9][0-2][0-9][0-5][0-9]$")) {
kssj_f = true;
}
boolean jssj_f = false;
if (jssj.matches("^[0-3][0-9][0-2][0-9][0-5][0-9]$")) {
jssj_f = true;
}
if (kssj_f && jssj_f) {
Date dt = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("ddHHmm");
String nowdayhm = sdf.format(dt);
int nowdayhm_i = Integer.parseInt(nowdayhm);
int kssj_i = Integer.parseInt(kssj);
int jssj_i = Integer.parseInt(jssj);
if (nowdayhm_i >= kssj_i && nowdayhm_i <= jssj_i) {
return 0;
}
}
}
}
}
......
......@@ -24,7 +24,7 @@ public class YHXXGLServiceImp implements YHXXGLService {
@Autowired
private YHXXGLDao YHXXGLDao;
private String dbServer = "hg2018.";
private String dbServer = "gjj80.";
//private String dbServer = "gjj80";
//用户密码重置
......
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