loadReportData.jsp
3.12 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
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="weaver.general.Util" %>
<%@ page import="com.api.report.service.RequestFlowTimeTask" %>
<%@ page import="com.api.report.service.CalculateFlowTimeEngine" %>
<%@ page import="com.api.report.service.CalculateRequestFlowTime" %>
<%@ page import="com.api.report.service.newCalculateEngine.CalculateFlowTimeThread" %>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page"/>
<%
String actionType = Util.null2String(request.getParameter("actionType"));
if ("1".equals(actionType)) {
rs.executeUpdate("delete from wf_flowtime_reporttask_log");
rs.executeUpdate("truncate table workflow_node_flowtime");
rs.executeUpdate("truncate table workflow_node_fix_flowtime");
rs.executeUpdate("truncate table workflow_request_flowtime");
rs.executeUpdate("truncate table workflow_request_fix_flowtime");
} else if ("2".equals(actionType)) {
//CalculateFlowTimeEngine calEngine = new CalculateFlowTimeEngine("2017-05-01","2017-05-31",0);
//calEngine.calculate();
String startDate = Util.null2String(request.getParameter("startDate"));
CalculateRequestFlowTime crft = new CalculateRequestFlowTime();
crft.calculate(startDate);
} else if ("3".equals(actionType)) {
String startDate = Util.null2String(request.getParameter("startDate"));
String endDate = Util.null2String(request.getParameter("endDate"));
//isCalculateRange 1:计算归档流程 2:计算待办流程 0:计算所有的数据
int isCalculateRange = Util.getIntValue(request.getParameter("isCalculateRange"), 0);
CalculateRequestFlowTime crft = new CalculateRequestFlowTime();
crft.executeDateRangeFlowTime(startDate, endDate, isCalculateRange);
} else if ("4".equals(actionType)) {
rs.executeQuery("select * from wf_flowtime_reporttask_log where taskstatus = '0'");
if (rs.next()) {
out.println("starttime:" + rs.getString("startdate") + " " + rs.getString("taskstarttime"));
out.println("<br/>");
}
rs.executeQuery("select count(1) from workflow_request_flowtime ");
if (rs.next()) {
out.println("requestflowtime count:" + rs.getInt(1));
out.println("<br/>");
}
rs.executeQuery("select count(1) from workflow_node_flowtime ");
if (rs.next()) {
out.println("nodeflowtime count:" + rs.getInt(1));
out.println("<br/>");
}
} else if ("5".equals(actionType)) {
CalculateFlowTimeThread cftt = new CalculateFlowTimeThread();
cftt.doCalculate();
} else if ("6".equals(actionType)) {
rs.executeUpdate("delete from wf_flowtime_reporttask_log");
rs.executeUpdate("truncate table workflow_node_flowtime");
rs.executeUpdate("truncate table workflow_node_fix_flowtime");
rs.executeUpdate("truncate table workflow_request_flowtime");
rs.executeUpdate("truncate table workflow_request_fix_flowtime");
CalculateFlowTimeThread cftt = new CalculateFlowTimeThread();
cftt.doCalculate();
}
%>