sHR二开之发送提醒消息给指定用户

栏目:s-hr cloud知识作者:金蝶来源:金蝶云社区发布:2024-09-16浏览:1

sHR二开之发送提醒消息给指定用户

二开场景:需要发送消息提醒给指定的用户,用户收到消息后可以点击跳转到具体业务单据。

适用版本:s-HR8.5及以上版本

适用对象:二开人员

步骤:创建message ,调用 DirectSenderAgent.getSenderAgent().sendMessage(message); 发送消息。



Message message = MessageFactory.newMessage();

message.setBooleanHeader("isSendCommon", Boolean.TRUE);

message.setLocaleStringHeader("title", bodySb1.toString(), LocaleUtils.locale_l1); message.setLocaleStringHeader("title", bodySb2.toString(), LocaleUtils.locale_l2); message.setLocaleStringHeader("title", bodySb3.toString(), LocaleUtils.locale_l3); message.setLocaleStringHeader("body", bodySb1.toString(), LocaleUtils.locale_l1); message.setLocaleStringHeader("body", bodySb2.toString(), LocaleUtils.locale_l2); message.setLocaleStringHeader("body", bodySb3.toString(), LocaleUtils.locale_l3); message.setLocaleStringHeader("sender",SHRServerResource.getString(Constants.COMMON_SERVICE_RESOURCE, "sys_auto_send",LocaleUtils.locale_l1), LocaleUtils.locale_l1);  //"系统自动发送" 

message.setLocaleStringHeader("sender",SHRServerResource.getString(Constants.COMMON_SERVICE_RESOURCE, "sys_auto_send",LocaleUtils.locale_l2), LocaleUtils.locale_l2);  //"系统自动发送" message.setLocaleStringHeader("sender",SHRServerResource.getString(Constants.COMMON_SERVICE_RESOURCE, "sys_auto_send",LocaleUtils.locale_l3), LocaleUtils.locale_l3);  //"系统自动发送" message.setLocaleStringHeader("initiatorName",SHRServerResource.getString(Constants.COMMON_SERVICE_RESOURCE, "sys_auto_send",LocaleUtils.locale_l1), LocaleUtils.locale_l1);  //"系统自动发送" message.setLocaleStringHeader("initiatorName",SHRServerResource.getString(Constants.COMMON_SERVICE_RESOURCE, "sys_auto_send",LocaleUtils.locale_l2), LocaleUtils.locale_l2);  //"系统自动发送" message.setLocaleStringHeader("initiatorName",SHRServerResource.getString(Constants.COMMON_SERVICE_RESOURCE, "sys_auto_send",LocaleUtils.locale_l3), LocaleUtils.locale_l3);  //"系统自动发送" message.setIntHeader("type", MsgType.NOTICE_VALUE); message.setIntHeader("bizType",MsgBizType.HR_VALUE); 

message.setIntHeader("priority", MsgPriority.HIGH_VALUE); 

message.setIntHeader("sourceStatus", MsgSourceStatus.EMPTY_VALUE); 

message.setStringHeader("solution", ctx.getSolution()); 

message.setStringHeader("databaseCenter", ctx.getAIS()); 

message.setStringHeader("receiver", userId);

message.setStringHeader("senderId", userId); 

message.setStringHeader("url", url); //跳转url

DirectSenderAgent.getSenderAgent().sendMessage(message);


参考:

标品异步导出完成后发送消息通知的方法 :

com.kingdee.shr.base.syssetting.app.io.fileExport.ExportTaskExecutor.sendComplateMessage()

        

          





sHR二开之发送提醒消息给指定用户

二开场景:需要发送消息提醒给指定的用户,用户收到消息后可以点击跳转到具体业务单据。适用版本:s-HR8.5及以上版本适用对象:二开人员步...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息