Commit 7916c56b authored by yuyanglei's avatar yuyanglei

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

parent 6c4568af
...@@ -4,14 +4,14 @@ ...@@ -4,14 +4,14 @@
<select id="complaintRate" resultType="com.changda.gjjapp.zhfwpt.dto.homepage.ComplaintRateDto"> <select id="complaintRate" resultType="com.changda.gjjapp.zhfwpt.dto.homepage.ComplaintRateDto">
select select
to_char( 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, ,'999990.9999') ||'%' tslzb,
to_char( 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, ,'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, 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 ftslsl
from dual from dual
</select> </select>
......
...@@ -34,11 +34,11 @@ ...@@ -34,11 +34,11 @@
<select id="duanXinZTSreach" resultType="map"> <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 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> </select>
<update id="updateDuanXinZT"> <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> </update>
<select id="qdkzInfo" resultType="map"> <select id="qdkzInfo" resultType="map">
......
...@@ -157,11 +157,11 @@ ...@@ -157,11 +157,11 @@
<select id="qdywblgnldTj" resultType="com.changda.gjjapp.zhfwpt.dto.qdxxgl.QdfwnldTjDto"> <select id="qdywblgnldTj" resultType="com.changda.gjjapp.zhfwpt.dto.qdxxgl.QdfwnldTjDto">
select 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,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,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,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,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,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,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,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,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; 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 from dual
</select> </select>
......
...@@ -295,7 +295,7 @@ ...@@ -295,7 +295,7 @@
</select> </select>
<select id="selectuserpd" parameterType="String" resultType="Integer"> <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> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "mybatis-3-mapper.dtd" >
<mapper namespace="com.changda.gjjapp.zhfwpt.dao.yhxxgl.YHXXGLDao"> <mapper namespace="com.changda.gjjapp.zhfwpt.dao.yhxxgl.YHXXGLDao">
<update id="updatePwd"> <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 where 1=1
<if test="zjhm != null and zjhm !=''">and hg2018.wxn_user.zjhm =#{zjhm}</if> <if test="zjhm != null and zjhm !=''">and gjj80..wxn_user.zjhm =#{zjhm}</if>
<if test="grzh != null and grzh !=''">and hg2018.wxn_user.grzh = #{grzh}</if> <if test="grzh != null and grzh !=''">and gjj80..wxn_user.grzh = #{grzh}</if>
</update> </update>
<select id="yongHuXinXiSearch" resultType="com.changda.gjjapp.db.entity.WXN_USER"> <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 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> <if test="yhlb != null and yhlb !=''">and iszx = #{yhlb}</if>
<choose> <choose>
<when test="zckssj != null and zckssj !='' and zcjssj != null and zcjssj !=''"> <when test="zckssj != null and zckssj !='' and zcjssj != null and zcjssj !=''">
...@@ -31,16 +31,16 @@ ...@@ -31,16 +31,16 @@
</select> </select>
<update id="userInfoUpdate"> <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} where a.grzh = #{grzh}
</update> </update>
<update id="iszx"> <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> </update>
<select id="zxzt" resultType="string"> <select id="zxzt" resultType="string">
select iszx from hg2018.wxn_user where grzh = #{grzh} select iszx from gjj80..wxn_user where grzh = #{grzh}
</select> </select>
<insert id="userLoginRecording"> <insert id="userLoginRecording">
......
...@@ -437,20 +437,42 @@ public class QuDaoQuanXianKZServiceImp implements QuDaoQuanXianKongZhiService { ...@@ -437,20 +437,42 @@ public class QuDaoQuanXianKZServiceImp implements QuDaoQuanXianKongZhiService {
public int qdztkzInterface(String ywbm,String qdid) { public int qdztkzInterface(String ywbm,String qdid) {
M_YWZTKZ_2 mYwztkz_2 = quDaoQuanXianGuanLiDao.qdztkzInterface(ywbm); M_YWZTKZ_2 mYwztkz_2 = quDaoQuanXianGuanLiDao.qdztkzInterface(ywbm);
String tstzr = mYwztkz_2.getTstzr(); String tstzr = mYwztkz_2.getTstzr();
//特殊时间停止 // 特殊时间停止
if (tstzr != null ) { if (tstzr != null) {
String[] tstzrs = tstzr.split(","); String[] tstzrs = tstzr.split(",");
for (int i = 0; i < tstzrs.length; i++) { for (int i = 0; i < tstzrs.length; i++) {
String tzr = tstzrs[i]; String tzr = tstzrs[i];
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(); Date dt = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("dd"); SimpleDateFormat sdf = new SimpleDateFormat("ddHHmm");
String nowday = sdf.format(dt); String nowdayhm = sdf.format(dt);
if (tzr.equals(nowday)) { 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; return 0;
} }
} }
} }
}
}
String temp_str = ""; String temp_str = "";
Date dt = new Date(); Date dt = new Date();
// 最后的aa表示“上午”或“下午” HH表示24小时制 如果换成hh表示12小时制 // 最后的aa表示“上午”或“下午” HH表示24小时制 如果换成hh表示12小时制
......
...@@ -24,7 +24,7 @@ public class YHXXGLServiceImp implements YHXXGLService { ...@@ -24,7 +24,7 @@ public class YHXXGLServiceImp implements YHXXGLService {
@Autowired @Autowired
private YHXXGLDao YHXXGLDao; private YHXXGLDao YHXXGLDao;
private String dbServer = "hg2018."; private String dbServer = "gjj80.";
//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