reflownowall.jsp 1.83 KB
<%@ 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 language="java" contentType="text/html; charset=UTF-8" %>
<%
    try {
        RecordSet rs = new RecordSet();

        long start = System.currentTimeMillis();
        String workflowid = "7";
        String proc_set_id = "10";
        int kqtype = 2;
        KQFlowActiontBiz kqFlowActiontBiz = new KQFlowActiontBiz();

        String sql = "select a.requestId from formtable_main_7 a left join workflow_requestbase b on a.requestId=b.requestid where gcksrq >='2019-07-01' "
                + "and b.currentnodetype=3 ";
        rs.executeQuery(sql);
        while (rs.next()){
            String requestid = rs.getString("requestId");
            out.println("requestid:"+requestid+"::do action on kqtype result:<br/>");

            //得到这个考勤流程设置是否使用明细
            String usedetails = "0";

            Map<String, String> map = new HashMap<String, String>();
            if(Util.getIntValue(requestid) > 0){
                map.put("requestId", "and t.requestId = " + requestid);
            }
            Map<String,String> result = kqFlowActiontBiz.handleKQFlowAction(proc_set_id, usedetails, Util.getIntValue(requestid), kqtype, Util.getIntValue(workflowid), false,true,map);

            out.println("requestid:"+requestid+"::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){
      out.print("Exception:"+e.getMessage());
      e.printStackTrace();;
    }
%>