#EC_HJ110# 超时消息提醒接口增加app消息对接

main
shilei 2 years ago
parent e7c0c0aea3
commit a4cbbb2a5e

@ -4,13 +4,10 @@ import com.engine.common.entity.BizLogContext;
import com.engine.core.interceptor.CommandContext;
import com.engine.workflow.entity.workflowOvertime.OvertimeEntity;
import com.engine.workflow.entity.workflowOvertime.RemindEntity;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet;
import weaver.general.Util;
import weaver.general.BaseBean;
import weaver.workflow.logging.Logger;
import weaver.workflow.logging.LoggerFactory;
import weaver.workflow.msg.MsgPushUtil;
import weaver.workflow.msg.PoppupRemindInfoUtil;
import weaver.workflow.msg.entity.MsgEntity;
import weaver.workflow.request.RequestComInfo;
@ -68,13 +65,13 @@ public class DoRemind_InfoCenterRemindCmd extends DoRemind_CommonInitCmd {
new MsgPushUtil().pushMsg(requestMsgEntity);
try{
Class<?> clazz = Class.forName("weaver.interfaces.dito.msg.SendPortalOverTimeMsgUtil");
if(clazz.getMethod("SendOverTimeMsg") != null) {
Method method = clazz.getMethod("SendOverTimeMsg", List.class);
BaseBean bb = new BaseBean();
bb.writeLog("DoRemind_InfoCenterRemindCmd3333");
Class<?> clazz = Class.forName("weaver.interfaces.dito.overtime.SendPortalOverTimeMsgUtil");
Method method = clazz.getMethod("SendOverTimeMsg", List.class);
Object newInstance = clazz.newInstance();
method.invoke(newInstance,requestMsgEntity);
}
}catch (ClassNotFoundException | NoSuchMethodException e){
e.printStackTrace();
} catch (IllegalAccessException e) {

@ -0,0 +1,51 @@
package weaver.interfaces.dito.overtime;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet;
import weaver.general.BaseBean;
import weaver.general.Util;
import weaver.interfaces.dito.comInfo.PropBean;
import weaver.interfaces.dito.util.SendMessageUtil;
import weaver.workflow.msg.entity.MsgEntity;
import java.util.List;
/***
*
*/
public class SendPortalOverTimeMsgUtil {
public void SendOverTimeMsg(List<MsgEntity> requestMsgEntity){
String CusField_MsgId = PropBean.getUfPropValue("CusField_MsgId");
String scopeid = "-1";
String scope = "HrmCustomFieldByInfoType" ;
BaseBean bb = new BaseBean();
bb.writeLog("SendPortalOverTimeMsgUtil");
RecordSet rs = new RecordSet();
if(StringUtils.isNotBlank(CusField_MsgId))
{
for(int i=0;i<requestMsgEntity.size();i++){
MsgEntity msgEntity = requestMsgEntity.get(i);
String userid = msgEntity.getUserId()+"";
String requestname = msgEntity.getDetailTitle();
String requestid = msgEntity.getDetailId();
bb.writeLog("SendPortalOverTimeMsgUtil-requestid:"+requestid);
SendMessageUtil sendMessageUtil = new SendMessageUtil();
String msgid = "" ;
if(StringUtils.isNotEmpty(userid)){
rs.executeQuery(" select "+CusField_MsgId+" as msgid from cus_fielddata where scopeid=? and scope = ? and id=? ",new Object[]{scopeid,scope,userid} );
if(rs.next()){
msgid = Util.null2String(rs.getString("seqorder"));
}
}
if(StringUtils.isNotBlank(msgid)){
// sendMessageUtil.senMessageToPortal(msgid,requestid,userid,requestname);
}
}
}
}
}
Loading…
Cancel
Save