You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
119 lines
5.6 KiB
Plaintext
119 lines
5.6 KiB
Plaintext
<%@ page import="weaver.conn.RecordSetDataSource" %>
|
|
<%@ page import="weaver.conn.RecordSet" %>
|
|
<%@ page import="com.engine.custom.corn.util.ReportUtil" %>
|
|
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
|
|
|
|
<%
|
|
out.print("<br/>关键词更新开始执行");
|
|
String execute = execute();
|
|
out.print(execute);
|
|
out.print("<br/>关键词更新结束");
|
|
|
|
%>
|
|
<%!
|
|
public String execute() {
|
|
RecordSetDataSource em7rs = new RecordSetDataSource("em7");
|
|
RecordSetDataSource emprs = new RecordSetDataSource("emp_msg");
|
|
RecordSet rs = new RecordSet();
|
|
RecordSet rs2 = new RecordSet();
|
|
RecordSet rs3 = new RecordSet();
|
|
String roleMember = ReportUtil.getRoleMember(rs);
|
|
String out = "";
|
|
int i = updateRoleGjc(rs, roleMember);
|
|
out = out + "<br/>updateRoleGjc==>" + i;
|
|
int i1 = updateGjcOfficialWf(rs, 650);
|
|
out = out + "<br/>updateGjcOfficialWf==>" + i1;
|
|
int i2 = updateGjcAffairsWf(rs, 650);
|
|
out = out + "<br/>updateGjcAffairsWf==>" + i2;
|
|
int i3 = updateGjcBusinessWf(rs, 650);
|
|
out = out + "<br/>updateGjcBusinessWf==>" + i3;
|
|
int i4 = updateGjcShareDoc(rs, 650);
|
|
out = out + "<br/>updateGjcShareDoc==>" + i4;
|
|
int i5 = updateGjcMeeting(rs, 650);
|
|
out = out + "<br/>updateGjcMeeting==>" + i5;
|
|
int i6 = updateGjcLogin(rs, 650);
|
|
out = out + "<br/>updateGjcLogin==>" + i6;
|
|
int i7 = updateGjcMsg(rs, 650);
|
|
out = out + "<br/>updateGjcMsg==>" + i7;
|
|
int i8 = updateGjcNull(rs);
|
|
out = out + "<br/>updateGjcNull==>" + i8;
|
|
return out;
|
|
|
|
}
|
|
|
|
private int updateRoleGjc(RecordSet rs, String roleMember) {
|
|
rs.executeUpdate(" update uf_personreport set gjc = '统筹全局' where ry in ( " + roleMember + ")");
|
|
return rs.getUpdateCount();
|
|
}
|
|
|
|
//更新公文办理数前10%的人
|
|
private int updateGjcOfficialWf(RecordSet rs, int rownum) {
|
|
rs.executeUpdate(" update uf_personreport set gjc = '人形公文处理机' where id in( " +
|
|
" select rk.id from ( " +
|
|
" select ROW_NUMBER() OVER (ORDER BY qnljclgw DESC) AS rank , * from uf_personreport where qnljclgw is not null and qnljclgw != 0 and gjc is null" +
|
|
" ) rk where rk.rank < " + rownum + ")");
|
|
return rs.getUpdateCount();
|
|
}
|
|
|
|
//更新事务审批数前10%的人
|
|
private int updateGjcAffairsWf(RecordSet rs, int rownum) {
|
|
rs.executeUpdate(" update uf_personreport set gjc = '宝藏事务挖掘机' where id in( " +
|
|
" select rk.id from ( " +
|
|
" select ROW_NUMBER() OVER (ORDER BY grswsps DESC) AS rank , * from uf_personreport where grswsps is not null and grswsps != 0 and gjc is null" +
|
|
" ) rk where rk.rank < " + rownum + ")");
|
|
return rs.getUpdateCount();
|
|
}
|
|
|
|
//更新商旅使用数前10%的人
|
|
private int updateGjcBusinessWf(RecordSet rs, int rownum) {
|
|
rs.executeUpdate(" update uf_personreport set gjc = '走南闯北 遥遥领先' where id in( " +
|
|
" select rk.id from ( " +
|
|
" select ROW_NUMBER() OVER (ORDER BY ljsyslcs DESC) AS rank , * from uf_personreport where ljsyslcs is not null and ljsyslcs != 0 and gjc is null" +
|
|
" ) rk where rk.rank < " + rownum+ ")");
|
|
return rs.getUpdateCount();
|
|
}
|
|
|
|
|
|
//更新分享文档数前10%的人
|
|
private int updateGjcShareDoc(RecordSet rs, int rownum) {
|
|
rs.executeUpdate(" update uf_personreport set gjc = '知识分享之光' where id in( " +
|
|
" select rk.id from ( " +
|
|
" select ROW_NUMBER() OVER (ORDER BY grwdgx DESC) AS rank , * from uf_personreport where grwdgx is not null and grwdgx != 0 and gjc is null" +
|
|
" ) rk where rk.rank < " + rownum + ")");
|
|
return rs.getUpdateCount();
|
|
}
|
|
|
|
//更新创建会议数前10%的人
|
|
private int updateGjcMeeting(RecordSet rs, int rownum) {
|
|
rs.executeUpdate(" update uf_personreport set gjc = '会议守护者' where id in( " +
|
|
" select rk.id from ( " +
|
|
" select ROW_NUMBER() OVER (ORDER BY grhycycs DESC) AS rank , * from uf_personreport where grhycycs is not null and grhycycs != 0 and gjc is null" +
|
|
" ) rk where rk.rank < " + rownum + ")");
|
|
return rs.getUpdateCount();
|
|
}
|
|
|
|
//更新登录次数前10%的人
|
|
private int updateGjcLogin(RecordSet rs, int rownum) {
|
|
rs.executeUpdate(" update uf_personreport set gjc = '智慧OA最亲密的朋友' where id in( " +
|
|
" select rk.id from ( " +
|
|
" select ROW_NUMBER() OVER (ORDER BY ljdloacs DESC) AS rank , * from uf_personreport where ljdloacs is not null and ljdloacs != 0 and gjc is null" +
|
|
" ) rk where rk.rank < " + rownum + ")");
|
|
return rs.getUpdateCount();
|
|
}
|
|
|
|
//更新聊天次数前10%的人
|
|
private int updateGjcMsg(RecordSet rs, int rownum) {
|
|
rs.executeUpdate(" update uf_personreport set gjc = '社交天花板' where id in( " +
|
|
" select rk.id from ( " +
|
|
" select ROW_NUMBER() OVER (ORDER BY grcylts DESC) AS rank , * from uf_personreport where grcylts is not null and grcylts != 0 and gjc is null" +
|
|
" ) rk where rk.rank < " + rownum + ")");
|
|
return rs.getUpdateCount();
|
|
}
|
|
|
|
//无关键词的人
|
|
private int updateGjcNull(RecordSet rs) {
|
|
rs.executeUpdate(" update uf_personreport set gjc = '智慧OA探索家' where gjc = '' or gjc is null");
|
|
return rs.getUpdateCount();
|
|
}
|
|
|
|
%> |