re_flow_now_test.jsp
8.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
<%@ page import="com.engine.kq.biz.KQFlowActiontBiz" %>
<%@ page import="java.util.HashMap" %>
<%@ page import="java.util.Map" %>
<%@ page import="weaver.conn.RecordSet" %>
<%@ page import="weaver.general.Util" %>
<%@ page import="com.engine.kq.enums.KqSplitFlowTypeEnum" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%
try {
String requestids = "111270"
+ ",115154"
+ ",115222"
+ ",115305"
+ ",125163"
+ ",125171"
+ ",126154"
+ ",126161"
+ ",126170"
+ ",126182"
+ ",126254"
+ ",126271"
+ ",126277"
+ ",135174"
+ ",135206"
+ ",135264"
+ ",135299"
+ ",135332"
+ ",135334"
+ ",135424"
+ ",135439"
+ ",135468"
+ ",135473"
+ ",135506"
+ ",135588"
+ ",135589"
+ ",135595"
+ ",135651"
+ ",135785"
+ ",135814"
+ ",136160"
+ ",136162"
+ ",136164"
+ ",136171"
+ ",136173"
+ ",136174"
+ ",136175"
+ ",136244"
+ ",136285"
+ ",136286"
+ ",141170"
+ ",141308"
+ ",141309"
+ ",144224"
+ ",144266"
+ ",144275"
+ ",144297"
+ ",144365"
+ ",144380"
+ ",144385"
+ ",144386"
+ ",144417"
+ ",144494"
+ ",144531"
+ ",144542"
+ ",144583"
+ ",144713"
+ ",144717"
+ ",144731"
+ ",144851"
+ ",146298"
+ ",146299"
+ ",146316"
+ ",146320"
+ ",146364"
+ ",146377"
+ ",146378"
+ ",160162"
+ ",160227"
+ ",160280"
+ ",162162"
+ ",162186"
+ ",162209"
+ ",162261"
+ ",162521"
+ ",162523"
+ ",166166"
+ ",170176"
+ ",170184"
+ ",170193"
+ ",170315"
+ ",170316"
+ ",170317"
+ ",170389"
+ ",170392"
+ ",170418"
+ ",170431"
+ ",170485"
+ ",170512"
+ ",170588"
+ ",170723"
+ ",180180"
+ ",180194"
+ ",180284"
+ ",180296"
+ ",180297"
+ ",180373"
+ ",180390"
+ ",180396"
+ ",180544"
+ ",180546"
+ ",182188"
+ ",184252"
+ ",184333"
+ ",184364"
+ ",184373"
+ ",188260"
+ ",189205"
+ ",190200"
+ ",190210"
+ ",192250"
+ ",192251"
+ ",192272"
+ ",192307"
+ ",192356"
+ ",193196"
+ ",193201"
+ ",194295"
+ ",196298"
+ ",196354"
+ ",198200"
+ ",198257"
+ ",198269"
+ ",202301"
+ ",202348"
+ ",202384"
+ ",202407"
+ ",203258"
+ ",205241"
+ ",205353"
+ ",205414"
+ ",205427"
+ ",205430"
+ ",205456"
+ ",205461"
+ ",205642"
+ ",205885"
+ ",205950"
+ ",205978"
+ ",206176"
+ ",206343"
+ ",206408"
+ ",88234";
String workflowid = Util.null2String(request.getParameter("workflowid"));
//是否是强制归档,true的话可以做带薪数据扣减和加班生成,默认false
String isForce = Util.null2String(request.getParameter("isForce"));
//是否是老考勤升级,true的话表示是老考勤升级,不需要考勤扣减和加班生成的问题。默认false
String isUpgrade = Util.null2String(request.getParameter("isUpgrade"));
boolean isForce1 = true;
boolean isUpgrade1 = false;
if("true".equalsIgnoreCase(isUpgrade)){
isUpgrade1 = true;
}
// if(requestid.length() == 0){
// out.println("param requestid is null:<br/>");
// return ;
// }
if(workflowid.length() == 0){
out.println("param workflowid is null:<br/>");
return ;
}
long start = System.currentTimeMillis();
KQFlowActiontBiz kqFlowActiontBiz = new KQFlowActiontBiz();
RecordSet rs = new RecordSet();
RecordSet rs1 = new RecordSet();
String[] requ = requestids.split(",");
for(int i = 0 ; i < requ.length ; i++){
String requestid = requ[i];
String proc_set_sql = "select * from kq_att_proc_set where field001 = ? ";
rs.executeQuery(proc_set_sql, workflowid);
if(rs.next()){
String proc_set_id = rs.getString("id");
//得到这个考勤流程设置是否使用明细
String usedetails = rs.getString("usedetail");
int kqtype = Util.getIntValue(rs.getString("field006"));
out.println("do action on kqtype:" + kqtype+"<br/>");
Map<String, String> map = new HashMap<String, String>();
if(Util.getIntValue(requestid) > 0){
map.put("requestId", "and t.requestId = " + requestid);
}
String tablename = "";
if(kqtype == KqSplitFlowTypeEnum.LEAVE.getFlowtype()){
tablename = KqSplitFlowTypeEnum.LEAVE.getTablename();
}else if(kqtype == KqSplitFlowTypeEnum.EVECTION.getFlowtype()){
tablename = KqSplitFlowTypeEnum.EVECTION.getTablename();
}else if(kqtype == KqSplitFlowTypeEnum.OUT.getFlowtype()){
tablename = KqSplitFlowTypeEnum.OUT.getTablename();;
}else if(kqtype == KqSplitFlowTypeEnum.OVERTIME.getFlowtype()){
tablename = KqSplitFlowTypeEnum.OVERTIME.getTablename();;
}else if(kqtype == KqSplitFlowTypeEnum.SHIFT.getFlowtype()){
tablename = KqSplitFlowTypeEnum.SHIFT.getTablename();;
}else if(kqtype == KqSplitFlowTypeEnum.OTHER.getFlowtype()){
tablename = KqSplitFlowTypeEnum.OTHER.getTablename();;
}else if(kqtype == KqSplitFlowTypeEnum.CARD.getFlowtype()){
tablename = KqSplitFlowTypeEnum.CARD.getTablename();;
}else if(kqtype == KqSplitFlowTypeEnum.LEAVEBACK.getFlowtype()){
tablename = KqSplitFlowTypeEnum.LEAVEBACK.getTablename();;
}else{
out.print("考勤流程没有找到对应类型##kqtype##"+kqtype);
return;
}
//先根据requestid删除中间表里的数据,再做啥插入操作
String delSql = "delete from "+tablename+" where requestid = "+requestid;
out.println("先删除中间表数据 : " + delSql+"<br/>");
rs1.executeUpdate(delSql);
Map<String,String> result = kqFlowActiontBiz.handleKQFlowAction(proc_set_id, usedetails, Util.getIntValue(requestid), kqtype, Util.getIntValue(workflowid), isForce1,isUpgrade1,map);
out.println("do action on kqtype result:" + result+"<br/>");
if(!result.isEmpty()){
out.println("do action on kqtype 失败:" + result+"<br/>");
}
}
}
long end = System.currentTimeMillis();
out.println((end-start)/1000+"秒");
}catch (Exception e){
e.printStackTrace();;
}
%>