From 1b2c48c1948542aa418583ae478f5b9869c9e04d Mon Sep 17 00:00:00 2001 From: shilei <798989044@qq.com> Date: Thu, 28 Sep 2023 14:30:48 +0800 Subject: [PATCH] =?UTF-8?q?#EC=5FHJ100#=20=E8=B0=83=E7=94=A8=E9=97=A8?= =?UTF-8?q?=E6=88=B7=E6=8E=A5=E5=8F=A3=E7=BB=93=E6=9E=9C=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dito/sendtodo/SendPortalErrorUtil.java | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/src/com/customization/dito/sendtodo/SendPortalErrorUtil.java b/src/com/customization/dito/sendtodo/SendPortalErrorUtil.java index 74a95265..e5f24aa7 100644 --- a/src/com/customization/dito/sendtodo/SendPortalErrorUtil.java +++ b/src/com/customization/dito/sendtodo/SendPortalErrorUtil.java @@ -107,5 +107,97 @@ public class SendPortalErrorUtil { bb.writeLog("doCreateSendPortalDoneErrorInfo"); } + /*** + * + * @param lcid + * @param jdid + * @param jdmc + * @param ryid + * @param requestobject + * @param resultcode + * @param resultmsg + */ + public void doRecordPortalErrorInfo4Phase2(String lcid,String jdid,String jdmc,String ryid,String requestobject,String resultcode,String resultmsg,String zhjkbs){ + 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 mainMap = new HashMap(); + mainMap.put("lcid",lcid); + mainMap.put("jdid",jdid); + mainMap.put("jdmc",jdmc); + mainMap.put("ryid",ryid); + 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); + + String tablename = "" ; + String tablenvalue = "" ; + for (Map.Entry 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)); + } + } + } + } + + }