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.
194 lines
9.1 KiB
Java
194 lines
9.1 KiB
Java
package weaver.interfaces.dito.delete;
|
|
|
|
import com.customization.dito.sendtodo.RequestBaseInfoUtil;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import weaver.conn.RecordSet;
|
|
import weaver.general.BaseBean;
|
|
import weaver.general.Util;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
public class RequestDeleteQueryPortalUtil {
|
|
|
|
private RequestBaseInfoUtil requestBaseInfoUtil = new RequestBaseInfoUtil();
|
|
/**
|
|
*
|
|
* @param requestid
|
|
*/
|
|
public List<Map<String,String>> queryRequestReamrk89ByDelete(String requestid){
|
|
RecordSet rs = new RecordSet();
|
|
BaseBean bb = new BaseBean();
|
|
bb.writeLog("queryRequestReamrk8ByDelete-requestid:"+requestid);
|
|
List<Map<String,String>> list = new ArrayList<Map<String,String>>();
|
|
try{
|
|
if(StringUtils.isNotBlank(requestid)){
|
|
String sql =" select t.userid,t.nodeid,t.requestid,t2.nodename,t1.requestname,t3.workflowname,h2.loginid\n" +
|
|
" from workflow_currentoperator t\n" +
|
|
" inner join workflow_requestbase t1 on t.requestid = t1.requestid\n" +
|
|
" left join (select id,lastname,loginid from hrmresource union all select id,lastname,loginid from hrmresourcemanager ) h2 on h2.id = t1.creater \n" +
|
|
" left join workflow_nodebase t2 on t2.id = t.nodeid \n" +
|
|
" left join workflow_base t3 on t3.id = t1.workflowid\n" +
|
|
" where (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n" +
|
|
" and t.preisremark in (8,9)\n" +
|
|
" and t.requestid in("+requestid +") " ;
|
|
|
|
rs.executeQuery(sql);
|
|
bb.writeLog("queryWorkflowCopyToByRequestid-sql:"+sql);
|
|
|
|
while (rs.next()){
|
|
String nodeid = Util.null2String(rs.getString("nodeid"));
|
|
String userid = Util.null2String(rs.getString("userid"));
|
|
String nodename = Util.null2String(rs.getString("nodename"));
|
|
String workflowname = Util.null2String(rs.getString("workflowname")) ;
|
|
String requestname = Util.null2String(rs.getString("requestname")) ;
|
|
String lcid = Util.null2String(rs.getString("requestid")) ;
|
|
String creater = Util.null2String(rs.getString("loginid")) ;
|
|
|
|
Map<String,String> map = new HashMap<String, String>();
|
|
map.put("requestid",requestid);
|
|
map.put("userid",userid);
|
|
map.put("nodeid",nodeid);
|
|
map.put("nodename",nodename);
|
|
map.put("workflowname",workflowname);
|
|
map.put("requestname",requestname);
|
|
map.put("lcid",lcid);
|
|
map.put("creater",creater);
|
|
list.add(map);
|
|
}
|
|
bb.writeLog("queryWorkflowCopyToByRequestid-list:"+list.size());
|
|
}
|
|
}catch (Exception e){
|
|
|
|
}
|
|
return list;
|
|
}
|
|
|
|
public List<Map<String,String>> queryRequestForwardByDelete(String requestid){
|
|
|
|
RecordSet rs = new RecordSet();
|
|
BaseBean bb = new BaseBean();
|
|
bb.writeLog("queryRequestForwardByDelete-requestid:"+requestid);
|
|
|
|
List<Map<String,String>> list = new ArrayList<Map<String,String>>();
|
|
|
|
try{
|
|
if(StringUtils.isNotBlank(requestid)){
|
|
String sql =" select t.userid,t.nodeid,t.requestid,t2.nodename,t1.requestname,t3.workflowname,h2.loginid\n" +
|
|
" from workflow_currentoperator t\n" +
|
|
" inner join workflow_requestbase t1 on t.requestid = t1.requestid\n" +
|
|
" left join (select id,lastname,loginid from hrmresource union all select id,lastname,loginid from hrmresourcemanager ) h2 on h2.id = t1.creater \n" +
|
|
" left join workflow_nodebase t2 on t2.id = t.nodeid \n" +
|
|
" left join workflow_base t3 on t3.id = t1.workflowid\n" +
|
|
" where (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n" +
|
|
" and t.preisremark = 1 \n" +
|
|
" and t.requestid in("+requestid +") " ;
|
|
|
|
rs.executeQuery(sql);
|
|
bb.writeLog("queryWorkflowForwardByRequestid-sql:"+sql);
|
|
|
|
while (rs.next()){
|
|
String nodeid = Util.null2String(rs.getString("nodeid"));
|
|
String userid = Util.null2String(rs.getString("userid"));
|
|
String nodename = Util.null2String(rs.getString("nodename"));
|
|
String workflowname = Util.null2String(rs.getString("workflowname")) ;
|
|
String requestname = Util.null2String(rs.getString("requestname")) ;
|
|
String lcid = Util.null2String(rs.getString("requestid")) ;
|
|
String creater = Util.null2String(rs.getString("loginid")) ;
|
|
|
|
Map<String,String> map = new HashMap<String, String>();
|
|
map.put("requestid",requestid);
|
|
map.put("userid",userid);
|
|
map.put("nodeid",nodeid);
|
|
map.put("nodename",nodename);
|
|
map.put("workflowname",workflowname);
|
|
map.put("requestname",requestname);
|
|
map.put("lcid",lcid);
|
|
map.put("creater",creater);
|
|
list.add(map);
|
|
}
|
|
}
|
|
}catch (Exception e){
|
|
|
|
}
|
|
return list;
|
|
}
|
|
|
|
|
|
public List<Map<String,String>> queryRequestAtByDelete(String requestid){
|
|
RecordSet rs = new RecordSet();
|
|
BaseBean bb = new BaseBean();
|
|
bb.writeLog("queryRequestAtByDelete-requestid:"+requestid);
|
|
|
|
List<Map<String, String>> list = new ArrayList<Map<String, String>>();
|
|
try{
|
|
if (StringUtils.isNotBlank(requestid)) {
|
|
String sql =" select t.userid,t.nodeid,t.requestid,t2.nodename,t1.requestname,t3.workflowname,h2.loginid\n" +
|
|
" from workflow_currentoperator t\n" +
|
|
" inner join workflow_requestbase t1 on t.requestid = t1.requestid\n" +
|
|
" left join (select id,lastname,loginid from hrmresource union all select id,lastname,loginid from hrmresourcemanager ) h2 on h2.id = t1.creater \n" +
|
|
" left join workflow_nodebase t2 on t2.id = t.nodeid \n" +
|
|
" left join workflow_base t3 on t3.id = t1.workflowid\n" +
|
|
" where (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n" +
|
|
" and t.preisremark in (18) \n" +
|
|
" and t.requestid in("+requestid +") " ;
|
|
|
|
rs.executeQuery(sql);
|
|
bb.writeLog("queryWorkflowAtByRequestid-sql:"+sql);
|
|
|
|
while (rs.next()){
|
|
String nodeid = Util.null2String(rs.getString("nodeid"));
|
|
String userid = Util.null2String(rs.getString("userid"));
|
|
String nodename = Util.null2String(rs.getString("nodename"));
|
|
String workflowname = Util.null2String(rs.getString("workflowname")) ;
|
|
String requestname = Util.null2String(rs.getString("requestname")) ;
|
|
String lcid = Util.null2String(rs.getString("requestid")) ;
|
|
String creater = Util.null2String(rs.getString("loginid")) ;
|
|
|
|
Map<String,String> map = new HashMap<String, String>();
|
|
map.put("requestid",requestid);
|
|
map.put("userid",userid);
|
|
map.put("nodeid",nodeid);
|
|
map.put("nodename",nodename);
|
|
map.put("workflowname",workflowname);
|
|
map.put("requestname",requestname);
|
|
map.put("lcid",lcid);
|
|
map.put("creater",creater);
|
|
list.add(map);
|
|
}
|
|
}
|
|
}catch (Exception e){
|
|
|
|
}
|
|
return list;
|
|
}
|
|
|
|
|
|
|
|
public List<Map<String,String>> queryRequestDataByDelete(String requestids){
|
|
BaseBean bb = new BaseBean();
|
|
bb.writeLog("queryRequestDataByDelete-requestid:"+requestids);
|
|
|
|
List<Map<String, String>> list = new ArrayList<Map<String, String>>();
|
|
try{
|
|
if (StringUtils.isNotBlank(requestids)) {
|
|
String[] requestid = requestids.split(",");
|
|
for(int i=0;i<requestid.length;i++){
|
|
bb.writeLog("queryRequestDataByDelete-requestid-i:"+requestid[i]);
|
|
Map<String,String> baseMap = requestBaseInfoUtil.queryRequestBaseByRequestid(requestid[i]);
|
|
list.add(baseMap);
|
|
}
|
|
}
|
|
}catch (Exception e){
|
|
|
|
}
|
|
|
|
bb.writeLog("queryRequestDataByDelete-list:"+list.size());
|
|
return list;
|
|
}
|
|
|
|
|
|
}
|