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.
62 lines
2.4 KiB
Plaintext
62 lines
2.4 KiB
Plaintext
<%@ page import="weaver.conn.RecordSet" %>
|
|
<%@ page import="weaver.general.BaseBean" %>
|
|
<%@ page import="com.alibaba.fastjson.JSONObject" %>
|
|
<%@ page import="com.alibaba.fastjson.JSONArray" %>
|
|
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
|
|
<%!
|
|
private boolean isEmpty(String str) {
|
|
if ("".equals(str) ||"(null)".equals(str) || str == null) {
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
}
|
|
%>
|
|
<%
|
|
RecordSet rs = new RecordSet();
|
|
BaseBean bb=new BaseBean();
|
|
JSONArray array = new JSONArray();
|
|
JSONObject json = new JSONObject();
|
|
bb.writeLog("进入getdeleCount.jsp-->");
|
|
String resquestid=request.getParameter("resquestid");
|
|
int count=0;
|
|
String mainWorkflowid = "0";
|
|
String touchnodeid = "0";
|
|
if (!isEmpty(resquestid)){
|
|
String queryMainWorkflowidSql = "select workflowid from workflow_requestbase where requestid="+resquestid;
|
|
bb.writeLog("queryMainWorkflowidSql-->"+queryMainWorkflowidSql);
|
|
rs.execute(queryMainWorkflowidSql);
|
|
if(rs.next()){
|
|
mainWorkflowid = rs.getString(1);
|
|
}
|
|
|
|
String queryTouchNodeidSql = "select touchnodeid from uf_sczlc where workflowid="+mainWorkflowid;
|
|
bb.writeLog("queryTouchNodeidSql-->"+queryTouchNodeidSql);
|
|
rs.execute(queryTouchNodeidSql);
|
|
if(rs.next()){
|
|
touchnodeid = rs.getString(1);
|
|
}
|
|
|
|
String sql="select COUNT(*) as cnt from workflow_requestbase where mainrequestid="+resquestid+" and workflowid in (select workflowid subWorkflowId from workflow_requestbase where requestid in (select subrequestid from workflow_subwfrequest where subrequestid in (select requestid from workflow_requestbase where mainrequestid="+resquestid+" and triggernode = "+touchnodeid+")))";
|
|
bb.writeLog("sql-->"+sql);
|
|
rs.execute(sql);
|
|
if (rs.next()){
|
|
count=rs.getInt("cnt");
|
|
json.put("code",0);
|
|
json.put("count",count);
|
|
array.add(json);
|
|
out.print(array.toJSONString());
|
|
}else {
|
|
json.put("code",1);
|
|
json.put("errMsg","查无此resquestid");
|
|
array.add(json);
|
|
out.print(array.toJSONString());
|
|
}
|
|
}else {
|
|
json.put("code",1);
|
|
json.put("errMsg","resquestid为空");
|
|
array.add(json);
|
|
out.print(array.toJSONString());
|
|
}
|
|
%>
|