update M_QDZTKZ set M_QDZTKZ.sszt = #{status}<iftest="tzsj != null and tzsj !=''">, M_QDZTKZ.tzsj =
update M_QDZTKZ set M_QDZTKZ.sszt = #{status}
to_date(#{tzsj},'yyyy-mm-dd hh24:mi:ss')
<iftest="tzsj != null and tzsj !=''">, M_QDZTKZ.tzsj = to_date(#{tzsj},'yyyy-mm-dd hh24:mi:ss')</if>
</if> where qdid = #{qdid}
where qdid = #{qdid}
</update>
</update>
<updateid="updateOnlineUsers">
<updateid="updateOnlineUsers">
...
@@ -50,37 +50,61 @@
...
@@ -50,37 +50,61 @@
</select>
</select>
<updateid="updateOnlineUsers2">
<updateid="updateOnlineUsers2">
update m_userloginrecord set istc = 1 where istc = 0 and zhczsj is not null and to_char(sysdate-#{djsj}/24/60,'yyyy-mm-dd HH24:MI:SS') > to_char(zhczsj,'yyyy-mm-dd HH24:MI:SS') and qdid = #{qdid}
update m_userloginrecord set istc = 1
where istc = 0 and zhczsj is not null
and to_char(sysdate-#{djsj}/24/60,'yyyy-mm-dd HH24:MI:SS') > to_char(zhczsj,'yyyy-mm-dd HH24:MI:SS')
and qdid = #{qdid}
</update>
</update>
<updateid="updateQDZT">
<updateid="updateQDZT">
update m_qdztkz a set qdid = qdid <iftest="qdzt != null and qdzt !=''">,a.qdzt = #{qdzt}</if><iftest="fz != null and fz !=''">,a.fz = #{fz} </if><iftest="djsj != null and djsj !=''">, djsj = #{djsj}</if> where qdid = #{qdid}
update m_qdztkz a set qdid = qdid
<iftest="qdzt != null and qdzt !=''">,a.qdzt = #{qdzt}</if>
<iftest="fz != null and fz !=''">,a.fz = #{fz} </if>
<iftest="djsj != null and djsj !=''">, djsj = #{djsj}</if>
select b.ywczlx_2 as ywczlx,a.primaryid,a.ywbm,a.ywmc,a.issh,substr(a.qykssj,1,2) kshh,substr(a.qykssj,3,2) ksmm,substr(a.qyjssj,1,2) jshh,substr(a.qyjssj,3,2) jsmm,a.qyksrq,a.qyjsrq,a.shwtzt,a.shappzt,a.shwxzt,a.shznzdzt
select b.ywczlx_2 as ywczlx,a.primaryid,a.ywbm,a.ywmc,a.issh,substr(a.qykssj,1,2) kshh,substr(a.qykssj,3,2) ksmm,substr(a.qyjssj,1,2) jshh,substr(a.qyjssj,3,2) jsmm,
,a.shqyksrq||'日'||substr(a.shqykssj,1,2)||'时'||substr(a.shqykssj,3,2)||'分至'||a.shqyjsrq||'日'||substr(a.shqyjssj,1,2)||'时'||substr(a.shqyjssj,3,2)||'分' as dqzxsjd,a.wtzt,a.wxzt,a.znzdzt,a.appzt,
(case b.ywczlx_2 when 1 then '查询业务' when 2 then '申请业务' when 3 then '其他业务' end) czlx
a.shqyksrq||'日'||substr(a.shqykssj,1,2)||'时'||substr(a.shqykssj,3,2)||'分至'||a.shqyjsrq||'日'||substr(a.shqyjssj,1,2)||'时'||substr(a.shqyjssj,3,2)||'分' as dqzxsjd,
from m_ywztkz_2 a,s_ywzd b where a.ywbm = b.bm
a.wtzt,a.wxzt,a.znzdzt,a.zh308zt,a.sjzt,a.appzt,
<iftest="ywczlx_2 != null and ywczlx_2 !=''"> and b.ywczlx_2 = #{ywczlx_2}</if>
(case b.ywczlx_2 when 1 then '查询业务' when 2 then '申请业务' when 3 then '其他业务' end) czlx
<iftest="ywmc != null and ywmc !=''"> and b.ywmc like '%${ywmc}%'</if>
from m_ywztkz_2 a,s_ywzd b
<iftest="issh != null and issh !=''"> and a.issh = #{issh}</if>
where a.ywbm = b.bm
<iftest="ywbm != null and ywbm !=''"> and a.ywbm = #{ywbm}</if>
<iftest="ywczlx_2 != null and ywczlx_2 !=''"> and b.ywczlx_2 = #{ywczlx_2}</if>
order by b.sort
<iftest="ywmc != null and ywmc !=''"> and b.ywmc like '%${ywmc}%'</if>
<iftest="issh != null and issh !=''"> and a.issh = #{issh}</if>
<iftest="ywbm != null and ywbm !=''"> and a.ywbm = #{ywbm}</if>
order by b.sort
</select>
</select>
<updateid="updateM_YWZTKZ_2State">
<updateid="updateM_YWZTKZ_2State">
update M_YWZTKZ_2 a set a.primaryid = a.primaryid <iftest="qykssj != null and qykssj !='' and qyjssj != null and qyjssj !='' and qyksrq != null and qyksrq !='' and qyjsrq != null and qyjsrq !=''">,a.qykssj = #{qykssj},a.qyjssj=#{qyjssj},a.qyksrq = #{qyksrq},a.qyjsrq =#{qyjsrq}</if>,a.wxzt = #{wxzt},a.appzt = #{appzt},a.wtzt = #{wtzt},a.znzdzt = #{znzdzt}
update M_YWZTKZ_2 a set a.primaryid = a.primaryid
where 1=1 <iftest="primaryid != null and primaryid !=''">and a.primaryid = #{primaryid}</if><iftest="czlx != null and czlx !=''">and a.ywbm in (select b.bm from s_ywzd b where b.ywczlx_2 = #{czlx})</if>
<iftest="qykssj != null and qykssj !='' and qyjssj != null and qyjssj !='' and qyksrq != null and qyksrq !='' and qyjsrq != null and qyjsrq !=''">
select b.qdmc,a.fz,(case when a.qdzt=1 then '开启' when a.qdzt=0 then '关闭' end) qdzt,a.djsj,a.czsj,a.czr,(case when a.czzt=0 then '保存' when a.czzt=1 then '修改' when a.czzt=2 then '删除' when a.czzt = 3 then '审核' end) czzt from m_logging_qdzk a,s_qdzd b where a.qdid = b.qdid and a.qdid = #{qdid} <iftest="czsj != null and czsj !=''">and to_char(a.czsj,'yyyy-mm-dd') = #{czsj}</if> order by a.czsj desc
select b.qdmc,a.fz,(case when a.qdzt=1 then '开启' when a.qdzt=0 then '关闭' end) qdzt,a.djsj,a.czsj,a.czr,
(case when a.czzt=0 then '保存' when a.czzt=1 then '修改' when a.czzt=2 then '删除' when a.czzt = 3 then '审核' end) czzt
from m_logging_qdzk a,s_qdzd b
where a.qdid = b.qdid and a.qdid = #{qdid}
<iftest="czsj != null and czsj !=''">and to_char(a.czsj,'yyyy-mm-dd') = #{czsj}</if>
order by a.czsj desc
</select>
</select>
<insertid="qdzkLogging">
<insertid="qdzkLogging">
...
@@ -93,8 +117,11 @@ order by b.sort
...
@@ -93,8 +117,11 @@ order by b.sort
</update>
</update>
<updateid="updateSHState">
<updateid="updateSHState">
update M_YWZTKZ_2 a set a.shqykssj = a.qykssj,a.shqyjssj=a.qyjssj,a.shqyksrq = a.qyksrq,a.shqyjsrq =a.qyjsrq,a.shwtzt = a.wtzt,a.shwxzt = a.wxzt,a.shappzt = a.appzt,a.shznzdzt = a.znzdzt
update M_YWZTKZ_2 a set a.shqykssj = a.qykssj,a.shqyjssj=a.qyjssj,a.shqyksrq = a.qyksrq,a.shqyjsrq =a.qyjsrq,
where 1=1 <iftest="primaryid != null and primaryid !=''">and a.primaryid = #{primaryid}</if><iftest="czlx != null and czlx !=''">and a.ywbm in (select b.bm from s_ywzd b where b.ywczlx_2 = #{czlx})</if>
insert into m_logging_fwkz(ywlb,ywbm,qysjd,czr,wxzt,appzt,wtzt,znzdzt,czzt,czsj) values(#{ywlb},#{ywbm},#{qysjd},#{czr},#{wxzt},#{appzt},#{wtzt},#{znzdzt},#{czzt},sysdate)
insert into m_logging_fwkz(ywlb,ywbm,qysjd,czr,wxzt,appzt,wtzt,znzdzt,zh308zt,sjzt,czzt,czsj)
select a.primaryid,(case when a.ywlb=1 then '查询业务类' when a.ywlb=2 then '申请业务类' when a.ywlb=3 then '其他业务类' end) ywlb,b.ywmc,a.wtzt,a.appzt,a.znzdzt,a.wxzt,a.qysjd,a.czr,a.czsj,(case when a.czzt=0 then '保存' when a.czzt=1 then '修改' when a.czzt=2 then '删除' when a.czzt = 3 then '审核' end) czzt from m_logging_fwkz a,s_ywzd b where a.ywbm = b.bm and a.ywbm = #{ywbm} order by a.czsj desc
select a.primaryid,(case when a.ywlb=1 then '查询业务类' when a.ywlb=2 then '申请业务类' when a.ywlb=3 then '其他业务类' end) ywlb,