#EC_HJ114# 流程超时提醒接口
parent
dbdaa31318
commit
688e9baa2c
@ -0,0 +1,24 @@
|
|||||||
|
package weaver.interfaces.dito.overtime;
|
||||||
|
|
||||||
|
public class OfflinePushInfoVo {
|
||||||
|
|
||||||
|
private String offlinePushTitle;
|
||||||
|
private String offlinePushDesc;
|
||||||
|
|
||||||
|
public String getOfflinePushTitle() {
|
||||||
|
return offlinePushTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOfflinePushTitle(String offlinePushTitle) {
|
||||||
|
this.offlinePushTitle = offlinePushTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOfflinePushDesc() {
|
||||||
|
return offlinePushDesc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOfflinePushDesc(String offlinePushDesc) {
|
||||||
|
this.offlinePushDesc = offlinePushDesc;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
package weaver.interfaces.dito.overtime;
|
||||||
|
|
||||||
|
import weaver.interfaces.dito.comInfo.PropBean;
|
||||||
|
|
||||||
|
public class OverTimeMsgBean {
|
||||||
|
|
||||||
|
// /open-apis/contact/v1/staff/dito/batchUserQuery
|
||||||
|
public static String sendMsgUrl = PropBean.getUfPropValue("OverTimeSendMsgUrl");
|
||||||
|
|
||||||
|
|
||||||
|
// /open-apis/notification/v2/work/send
|
||||||
|
public static String queryUserUrl = PropBean.getUfPropValue("OverTimeQueryUserUrl");
|
||||||
|
|
||||||
|
//2022101710170001-8Q0jTlYmb5nT2
|
||||||
|
public static String appKey = PropBean.getUfPropValue("OverTimeMsgAppkey");
|
||||||
|
|
||||||
|
//O5xRZ6djy4c1g268x4eLuszi7qxX8jj
|
||||||
|
public static String appSecret = PropBean.getUfPropValue("OverTimeMsgAppSecret");
|
||||||
|
|
||||||
|
//sapp-test-idito.dito.ph:30443
|
||||||
|
public static String hostName = PropBean.getUfPropValue("OverTimeHostName");
|
||||||
|
|
||||||
|
//https
|
||||||
|
public static String scheme = PropBean.getUfPropValue("OverTimeScheme");
|
||||||
|
|
||||||
|
// true
|
||||||
|
public static String ignoreSslCheck = PropBean.getUfPropValue("OverTimeMsgIgnoreSslCheck");
|
||||||
|
|
||||||
|
// 1
|
||||||
|
public static String tenantId = PropBean.getUfPropValue("OverTimeMsgTenantId");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,111 @@
|
|||||||
|
package weaver.interfaces.dito.overtime;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import weaver.conn.RecordSet;
|
||||||
|
import weaver.formmode.setup.ModeRightInfo;
|
||||||
|
import weaver.general.BaseBean;
|
||||||
|
import weaver.general.Util;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
public class SendMessageResultUtil {
|
||||||
|
/***
|
||||||
|
*
|
||||||
|
* @param lcid
|
||||||
|
* @param tzry
|
||||||
|
* @param tzsj
|
||||||
|
* @param jkdz
|
||||||
|
* @param xxcs
|
||||||
|
* @param zh
|
||||||
|
* @param fhcs
|
||||||
|
* @param resultcode
|
||||||
|
* @param resultmsg
|
||||||
|
*/
|
||||||
|
public void doRecordOverTimeMsgInfo(String lcid,String lcmc,String tzry,String tzsj,String jkdz,String xxcs,String zh,String fhcs,String resultcode,String resultmsg){
|
||||||
|
BaseBean bb = new BaseBean();
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
bb.writeLog("doRecordOverTimeMsgInfo");
|
||||||
|
String uf_table = "uf_overtime_msg" ;
|
||||||
|
|
||||||
|
ModeRightInfo modeRightInfo = new ModeRightInfo();
|
||||||
|
modeRightInfo.setNewRight(true);
|
||||||
|
|
||||||
|
if(StringUtils.isNotEmpty(xxcs)){
|
||||||
|
xxcs = xxcs.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("lcid",lcid);
|
||||||
|
mainMap.put("lcmc",lcmc);
|
||||||
|
mainMap.put("tzry",tzry);
|
||||||
|
mainMap.put("tzsj",tzsj);
|
||||||
|
mainMap.put("jkdz",jkdz);
|
||||||
|
mainMap.put("xxcs",xxcs);
|
||||||
|
mainMap.put("zh",zh);
|
||||||
|
mainMap.put("fhcs",fhcs);
|
||||||
|
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);
|
||||||
|
|
||||||
|
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));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue