#EC_HJ156# 备案提交

main
shilei 1 year ago
parent 4c95d19221
commit 649b9c450a

@ -246,94 +246,103 @@ public class SendPortalErrorUtil {
}
public void doRecordPortalErrorInfo4Phase2Optimize(String lcid,String jdid,String jdmc,String czry,String requestobject,String resultcode,String resultmsg,String zhjkbs,String jsry,String notes){
BaseBean bb = new BaseBean();
RecordSet rs = new RecordSet();
bb.writeLog("doCreateSendPortalTodoErrorInfo");
String uf_table = "uf_portal_error" ;
ModeRightInfo modeRightInfo = new ModeRightInfo();
modeRightInfo.setNewRight(true);
if(StringUtils.isNotEmpty(requestobject)){
requestobject = requestobject.replace("\"","\\\"");
}
String formmodeid = "" ;
String sql =" select k.id from modeinfo k \n" +
" inner join workflow_bill l on formid = l.id\n" +
" where l.tablename = '"+uf_table+"' " ;
rs.execute(sql);
if(rs.next()){
formmodeid = Util.null2String(rs.getString("id"));
}
String modedatacreater = "1";
SimpleDateFormat sdfDate = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式
SimpleDateFormat sdfTime = new SimpleDateFormat("HH:mm:ss");//设置日期格式
String modedatacreatedate = sdfDate.format(new Date());
String modedatacreatetime = sdfTime.format(new Date());
String modedatacreatertype = "0";
String uuid = UUID.randomUUID().toString();
Map<String,String> mainMap = new HashMap<String,String>();
mainMap.put("lcxz",lcid);
mainMap.put("lcid",lcid);
mainMap.put("jdid",jdid);
mainMap.put("jdmc",jdmc);
if(StringUtils.isNotBlank(czry)){
mainMap.put("ryid",czry);
}
// public void doRecordPortalErrorInfo4Phase2Optimize(String lcid,String jdid,String jdmc,String czry,String requestobject,String resultcode,String resultmsg,String zhjkbs,String jsry,String notes){
// BaseBean bb = new BaseBean();
// RecordSet rs = new RecordSet();
// bb.writeLog("doCreateSendPortalTodoErrorInfo");
// String uf_table = "uf_portal_error" ;
//
// ModeRightInfo modeRightInfo = new ModeRightInfo();
// modeRightInfo.setNewRight(true);
//
// if(StringUtils.isNotEmpty(requestobject)){
// requestobject = requestobject.replace("\"","\\\"");
// }
// String formmodeid = "" ;
// String sql =" select k.id from modeinfo k \n" +
// " inner join workflow_bill l on formid = l.id\n" +
// " where l.tablename = '"+uf_table+"' " ;
// rs.execute(sql);
// if(rs.next()){
// formmodeid = Util.null2String(rs.getString("id"));
// }
// String modedatacreater = "1";
// SimpleDateFormat sdfDate = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式
// SimpleDateFormat sdfTime = new SimpleDateFormat("HH:mm:ss");//设置日期格式
// String modedatacreatedate = sdfDate.format(new Date());
// String modedatacreatetime = sdfTime.format(new Date());
// String modedatacreatertype = "0";
// String uuid = UUID.randomUUID().toString();
//
//
// Map<String,String> mainMap = new HashMap<String,String>();
// mainMap.put("lcxz",lcid);
// mainMap.put("lcid",lcid);
// mainMap.put("jdid",jdid);
// mainMap.put("jdmc",jdmc);
// if(StringUtils.isNotBlank(czry)){
// mainMap.put("ryid",czry);
// }
//
// if(StringUtils.isNotBlank(jsry)){
// mainMap.put("jsry",jsry);
// }
//
// mainMap.put("requestobject",requestobject);
// mainMap.put("resultcode",resultcode);
// mainMap.put("resultmsg",resultmsg);
// mainMap.put("formmodeid",formmodeid);
// mainMap.put("modedatacreater",modedatacreater);
// mainMap.put("modedatacreatertype",modedatacreatertype);
// mainMap.put("modedatacreatedate",modedatacreatedate);
// mainMap.put("modedatacreatetime",modedatacreatetime);
// mainMap.put("uuid",uuid);
// mainMap.put("zhjkbs",zhjkbs);
// mainMap.put("notes",notes);
//
// String tablename = "" ;
// String tablenvalue = "" ;
// for (Entry<String, String> entry : mainMap.entrySet())
// {
// String fieldname = Util.null2String(entry.getKey()).trim();
// String fieldvalue = Util.null2String(entry.getValue()).replace("'", "''").trim();
// tablename += tablename==""? fieldname :","+fieldname ;
// tablenvalue += tablenvalue=="" ? "'"+fieldvalue+"'" :",'"+fieldvalue+"'" ;
// }
// bb.writeLog("tablename:"+tablename);
// bb.writeLog("tablenvalue:"+tablenvalue);
//
//
// if(tablename !="" && tablenvalue !="")
// {
// sql = " insert into "+uf_table+"("+tablename+") values ("+ tablenvalue +")";
// bb.writeLog("sql:"+sql);
// boolean boo = rs.execute(sql);
// if(boo)
// {
// String dataid = "" ;
// sql = " select * from "+uf_table+" where uuid='"+uuid+"' " ;
// bb.writeLog("sql:"+sql);
// rs.execute(sql);
// if(rs.next()){
// dataid = Util.null2String(rs.getString("id"));
// }
// bb.writeLog("dataid:"+dataid);
// if(!"".equals(dataid))
// {
// modeRightInfo.editModeDataShare(Integer.valueOf(modedatacreater), Integer.parseInt(formmodeid), Integer.parseInt(dataid));
// }
// }
// }
//
// }
if(StringUtils.isNotBlank(jsry)){
mainMap.put("jsry",jsry);
}
mainMap.put("requestobject",requestobject);
mainMap.put("resultcode",resultcode);
mainMap.put("resultmsg",resultmsg);
mainMap.put("formmodeid",formmodeid);
mainMap.put("modedatacreater",modedatacreater);
mainMap.put("modedatacreatertype",modedatacreatertype);
mainMap.put("modedatacreatedate",modedatacreatedate);
mainMap.put("modedatacreatetime",modedatacreatetime);
mainMap.put("uuid",uuid);
mainMap.put("zhjkbs",zhjkbs);
mainMap.put("notes",notes);
String tablename = "" ;
String tablenvalue = "" ;
for (Entry<String, String> entry : mainMap.entrySet())
{
String fieldname = Util.null2String(entry.getKey()).trim();
String fieldvalue = Util.null2String(entry.getValue()).replace("'", "''").trim();
tablename += tablename==""? fieldname :","+fieldname ;
tablenvalue += tablenvalue=="" ? "'"+fieldvalue+"'" :",'"+fieldvalue+"'" ;
}
bb.writeLog("tablename:"+tablename);
bb.writeLog("tablenvalue:"+tablenvalue);
if(tablename !="" && tablenvalue !="")
{
sql = " insert into "+uf_table+"("+tablename+") values ("+ tablenvalue +")";
bb.writeLog("sql:"+sql);
boolean boo = rs.execute(sql);
if(boo)
{
String dataid = "" ;
sql = " select * from "+uf_table+" where uuid='"+uuid+"' " ;
bb.writeLog("sql:"+sql);
rs.execute(sql);
if(rs.next()){
dataid = Util.null2String(rs.getString("id"));
}
bb.writeLog("dataid:"+dataid);
if(!"".equals(dataid))
{
modeRightInfo.editModeDataShare(Integer.valueOf(modedatacreater), Integer.parseInt(formmodeid), Integer.parseInt(dataid));
}
}
}
public void doRecordPortalErrorInfo4Phase2Optimize(String lcid,String jdid,String jdmc,String czry,String requestobject,String resultcode,String resultmsg,String zhjkbs,String jsry,String notes){
BaseBean bb = new BaseBean();
bb.writeLog("doRecordPortalErrorInfo4Phase2Optimize--init");
SendPortalErrorUtilRunnable sendPortalErrorUtilRunnable = new SendPortalErrorUtilRunnable(requestobject,lcid,jdid,jdmc,czry,jsry,resultcode,resultmsg,zhjkbs,notes);
new Thread(sendPortalErrorUtilRunnable).start();
}
}

@ -0,0 +1,139 @@
package com.customization.dito.sendtodo;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet;
import weaver.formmode.setup.ModeRightInfo;
import weaver.general.BaseBean;
import weaver.general.Util;
import weaver.hrm.User;
import weaver.interfaces.dito.comInfo.PropBean;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
public class SendPortalErrorUtilRunnable implements Runnable{
private String requestobject;
private String lcid;
private String jdid;
private String jdmc;
private String czry;
private String jsry;
private String resultcode;
private String resultmsg;
private String zhjkbs;
private String notes;
public SendPortalErrorUtilRunnable(String requestobject,String lcid,String jdid,String jdmc, String czry,
String jsry,String resultcode,String resultmsg,String zhjkbs,String notes){
this.requestobject = requestobject;
this.lcid = lcid;
this.jdid = jdid;
this.jdmc = jdmc;
this.czry = czry;
this.jsry = jsry;
this.resultcode = resultcode;
this.resultmsg = resultmsg;
this.zhjkbs = zhjkbs;
this.notes = notes;
}
@Override
public void run() {
BaseBean bb = new BaseBean();
RecordSet rs = new RecordSet();
bb.writeLog("SendPortalErrorUtilRunnable");
String uf_table = "uf_portal_error" ;
ModeRightInfo modeRightInfo = new ModeRightInfo();
modeRightInfo.setNewRight(true);
if(StringUtils.isNotEmpty(requestobject)){
requestobject = requestobject.replace("\"","\\\"");
}
String formmodeid = "" ;
String sql =" select k.id from modeinfo k \n" +
" inner join workflow_bill l on formid = l.id\n" +
" where l.tablename = '"+uf_table+"' " ;
rs.execute(sql);
if(rs.next()){
formmodeid = Util.null2String(rs.getString("id"));
}
String modedatacreater = "1";
SimpleDateFormat sdfDate = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式
SimpleDateFormat sdfTime = new SimpleDateFormat("HH:mm:ss");//设置日期格式
String modedatacreatedate = sdfDate.format(new Date());
String modedatacreatetime = sdfTime.format(new Date());
String modedatacreatertype = "0";
String uuid = UUID.randomUUID().toString();
Map<String,String> mainMap = new HashMap<String,String>();
mainMap.put("lcxz",lcid);
mainMap.put("lcid",lcid);
mainMap.put("jdid",jdid);
mainMap.put("jdmc",jdmc);
if(StringUtils.isNotBlank(czry)){
mainMap.put("ryid",czry);
}
if(StringUtils.isNotBlank(jsry)){
mainMap.put("jsry",jsry);
}
mainMap.put("requestobject",requestobject);
mainMap.put("resultcode",resultcode);
mainMap.put("resultmsg",resultmsg);
mainMap.put("formmodeid",formmodeid);
mainMap.put("modedatacreater",modedatacreater);
mainMap.put("modedatacreatertype",modedatacreatertype);
mainMap.put("modedatacreatedate",modedatacreatedate);
mainMap.put("modedatacreatetime",modedatacreatetime);
mainMap.put("uuid",uuid);
mainMap.put("zhjkbs",zhjkbs);
mainMap.put("notes",notes);
String tablename = "" ;
String tablenvalue = "" ;
for (Map.Entry<String, String> entry : mainMap.entrySet())
{
String fieldname = Util.null2String(entry.getKey()).trim();
String fieldvalue = Util.null2String(entry.getValue()).replace("'", "''").trim();
tablename += tablename==""? fieldname :","+fieldname ;
tablenvalue += tablenvalue=="" ? "'"+fieldvalue+"'" :",'"+fieldvalue+"'" ;
}
bb.writeLog("tablename:"+tablename);
bb.writeLog("tablenvalue:"+tablenvalue);
if(tablename !="" && tablenvalue !="")
{
sql = " insert into "+uf_table+"("+tablename+") values ("+ tablenvalue +")";
bb.writeLog("sql:"+sql);
boolean boo = rs.execute(sql);
if(boo)
{
String dataid = "" ;
sql = " select * from "+uf_table+" where uuid='"+uuid+"' " ;
bb.writeLog("sql:"+sql);
rs.execute(sql);
if(rs.next()){
dataid = Util.null2String(rs.getString("id"));
}
bb.writeLog("dataid:"+dataid);
if(!"".equals(dataid))
{
modeRightInfo.editModeDataShare(Integer.valueOf(modedatacreater), Integer.parseInt(formmodeid), Integer.parseInt(dataid));
}
}
}
}
}

@ -1,12 +1,23 @@
package com.customization.dito.sendtodo;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet;
import weaver.formmode.setup.ModeRightInfo;
import weaver.general.BaseBean;
import weaver.general.Util;
import weaver.hrm.User;
import weaver.interfaces.dito.comInfo.PropBean;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
public class SendPortalTodoRunnable implements Runnable{
private String src;
private String new_requestid;
private String requestid;
@ -43,18 +54,20 @@ public class SendPortalTodoRunnable implements Runnable{
// sendPortalTodoUtil.sendTodoDataByCreater(new_requestid,user,portal_todourl,bpm_app_workflowurl,username,passwd,bpm_workflowurl,center,bpm_app_requesturl);
}else if(Util.getIntValue(requestid) == -1 && "submit".equals(src)){
// sendPortalTodoUtil.sendTodoDataByCreateNode(new_requestid,nodeid,user,portal_todourl,bpm_app_workflowurl,username,passwd,bpm_workflowurl,center,bpm_app_requesturl);
// sendPortalDoneUtil.sendPortalDoneData( new_requestid, nodeid, user, portal_doneurl,bpm_app_workflowurl, username, passwd, bpm_workflowurl,bpm_app_requesturl);
// sendPortalDoneUtil.sendPortalDoneData( new_requestid, nodeid, user, portal_doneurl,bpm_app_workflowurl, username, passwd, bpm_workflowurl,bpm_app_requesturl);
sendPortalToReadUtil.sendToReadDataByCreateNode(new_requestid,user,portal_todourl,bpm_app_workflowurl,username,passwd,bpm_workflowurl,center,bpm_app_requesturl);
}else if(Util.getIntValue(requestid)> 0 && "submit".equals(src)){
// sendPortalTodoUtil.sendTodoDataByNode(requestid,nodeid,user,portal_todourl,bpm_app_workflowurl,username,passwd,bpm_workflowurl,center,bpm_app_requesturl);
// sendPortalDoneUtil.sendPortalDoneData( requestid, nodeid, user, portal_doneurl,bpm_app_workflowurl, username, passwd, bpm_workflowurl,bpm_app_requesturl);
// sendPortalDoneUtil.sendPortalDoneData( requestid, nodeid, user, portal_doneurl,bpm_app_workflowurl, username, passwd, bpm_workflowurl,bpm_app_requesturl);
sendPortalToReadUtil.sendToReadDataByNode(requestid,user,nodeid,portal_todourl,bpm_app_workflowurl,username,passwd,bpm_workflowurl,center,bpm_app_requesturl);
}else if(Util.getIntValue(requestid)> 0 && "reject".equals(src)){
// sendPortalTodoUtil.sendTodoDataByReject(requestid,nodeid,user,portal_todourl,bpm_app_workflowurl,username,passwd,bpm_workflowurl,center,bpm_app_requesturl);
// sendPortalDoneUtil.sendPortalDoneData( requestid, nodeid, user, portal_doneurl,bpm_app_workflowurl, username, passwd, bpm_workflowurl,bpm_app_requesturl);
// sendPortalDoneUtil.sendPortalDoneData( requestid, nodeid, user, portal_doneurl,bpm_app_workflowurl, username, passwd, bpm_workflowurl,bpm_app_requesturl);
}
}
}

Loading…
Cancel
Save