# 统一待办推送：通过HTTP接口订阅统一待办推送数据

来源快照：`result_data_new_260518.json`

- 来源 ID：`1201409306073964600`
- 模块：集成中心
- 目录：统一待办推送 - 开发示例
- space ID：`1158011075224911873`
- 原文链接：未提供
- 产品基线：未提供

## 正文

# 一、功能背景

统一待办推送一直以来都是通过EC服务上开发套件对接第三方接口，实现业务。这种做法无法满足日益增长的二开需求量，并且第三方各种不同的业务需求变化单单靠套件化无法快速、及时的覆盖客户需求。

因此，我们需要一个统一的出口，让任意第三方平台（包括ECODE）可以方便的订阅到统一待办推送的数据，然后按照自己的业务需要完成二开对接第三方接口。

# 二、功能价值

1、降低二开难度，不需要学习EC的开发框架

2、提升开发效率，不需要搭建EC开发平台

3、降低迭代成本，不需要修改基线hotfix出包处理

# 三、开发说明

1、添加配置

在【统一待办推送设置】-【基础设置】-【新建】-【从空白中新建】，添加以下配置：

![](https://weapp.eteams.cn/papi/file/preview?fileId=1201413493671682049&type=redirect&customParam=%7B%22isExtDist%22%3Atrue%2C%22distributeId%22%3A%22%22%2C%22externalId%22%3A%22%22%2C%22appId%22%3A%22%22%7D)

推送类：com.weaver.intunifytodo.client.engine.push.request.interfaces.WPushRequestForECODE

todoURL：订阅数据的接口地址

设置启用之后，保存配置就可以使用了。

开发着通过开发和“todoURL”路径一致的接口，来获取统一待办推送的数据。

字段说明:流程基本信息

package [com.weaver.intunifytodo.client.common.tools](http://com.weaver.intunifytodo.client.common.tools).message;import [com.alibaba](http://com.alibaba).fastjson.annotation.JSONField;import com.fasterxml.jackson.databind.annotation.JsonSerialize;import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;import [com.weaver.intunifytodo.client.common.tools](http://com.weaver.intunifytodo.client.common.tools).enums.SendGroup;import java.util.ArrayList;import java.util.HashMap;import java.util.List;import [java.util.Map](http://java.util.Map);/** * @Author: houmf * @Date: 2021/8/13 11:12 * @Description: */public abstract class MessageData<T extends MessageDetail> implements Message<T> { /** * 当前租户 */ private String tenantKey; /** * 推送时间戳 */ @JsonSerialize(using = ToStringSerializer.class) private long timeStamp; /** * 创建人Id */ @JsonSerialize(using = ToStringSerializer.class) private long userId; /** * 根据推送分组详情 */ private Map<SendGroup, List<T>> detailMap ; /** * 转换后的 用户数据 */ private String userToHrmRule ; public String getUserToHrmRule() { return userToHrmRule; } @Override public long getUserId() { return userId; } public void setUserId(long userId) { this.userId = userId; } @Override public void setUserToHrmRule(String userToHrmRule) { this.userToHrmRule = userToHrmRule; } @Override public long getTimeStamp() { return this.timeStamp; } @Override public String getTenantKey() { return this.tenantKey; } protected void initData(long timeStamp , String tenantKey){ this.timeStamp = timeStamp ; this.tenantKey = tenantKey ; } @JSONField(serialize=false) @Override public List<T> getDetailList(SendGroup sendGroup) { if (this.detailMap == null) this.detailMap = new HashMap<>() ; //如果为空 创建一个 ArrayList this.detailMap.computeIfAbsent(sendGroup, k -> new ArrayList<>()); return this.detailMap.get(sendGroup); } @JSONField(serialize=false) @Override public List<T> getDetailList(){ if (this.detailMap == null) this.detailMap = new HashMap<>() ; List<T> list = new ArrayList<>() ; for (SendGroup sendGroup:this.detailMap.keySet()) { list.addAll(this.detailMap.get(sendGroup)); } return list ; } @Override public void addDetailEntity(SendGroup sendGroup ,T detail){ this.getDetailList(sendGroup).add(detail) ; } @Override public Map<SendGroup, List<T>> getDetailMap() { if (this.detailMap == null) this.detailMap = new HashMap<>() ; return this.detailMap; } public void setDetailMap(Map<SendGroup, List<T>> detailMap) { this.detailMap = detailMap; } public void setTenantKey(String tenantKey) { this.tenantKey = tenantKey; } public void setTimeStamp(long timeStamp) { this.timeStamp = timeStamp; }}  
---  
      
    
    package com.weaver.intunifytodo.client.engine.entity.message.workflow;
    
    import com.fasterxml.jackson.annotation.JsonFormat;
    import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
    import com.fasterxml.jackson.databind.annotation.JsonSerialize;
    import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
    import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
    import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
    import com.weaver.intunifytodo.client.base.entity.po.IutSendRequestMsgLog;
    import com.weaver.workflow.common.constant.core.flow.RequestFlowStatusEnum;
    import com.weaver.workflow.common.constant.event.WorkflowOperateEventType;
    import com.weaver.workflow.common.entity.list.msg.send.RequestFlowBaseInfoEntity;
    import com.weaver.workflow.common.entity.list.msg.send.RequestFlowSendMsgDetailEntity;
    import com.weaver.workflow.common.entity.list.msg.send.RequestFlowSendMsgEntity;
    import com.weaver.workflow.common.entity.list.msg.send.RequestMsgMuliLangEntity;
    import org.apache.commons.lang3.StringUtils;
    import com.weaver.intunifytodo.client.common.tools.message.MessageData;
    import com.weaver.intunifytodo.client.common.tools.enums.SendGroup;
    import com.weaver.intunifytodo.client.common.tools.enums.WPushType;
    
    import java.time.LocalDateTime;
    import java.util.List;
    import java.util.Map;
    
    /**
     * @Author: houmf
     * @Date: 2021/8/12 14:51
     * @Description:
     */
    public class RequestInfo extends MessageData<RequestDetail> {
    
        /**
         * 请求ID
         */
        @JsonSerialize(using = ToStringSerializer.class)
        private long requestId;
    
        /**
         * 路径ID
         */
        @JsonSerialize(using = ToStringSerializer.class)
        private long workflowId;
    
        /**
         * 审批路径名称
         */
        private String workflowName;
    
        /**
         * 流程类型名称 多语言版
         */
        private List<RequestMsgMuliLangEntity> workFlowNameMultiLangList;
    
    
        /**
         * 当前节点名称
        */
        private String currentNodeName ;
    
        /**
         * 当前流程所属节点 多语言版
         */
        private List<RequestMsgMuliLangEntity> currentNodeNameMultiLangList;
    
        /**
         * 路径类型
         */
        @JsonSerialize(using = ToStringSerializer.class)
        private long workflowType;
    
        /**
         * 创建人类型
         * 为了兼容e9的外部用户做的  暂时可以不用管  都是0
         */
        @JsonSerialize(using = ToStringSerializer.class)
        private int userType;
    
        /**
         * 流程创建节点Id
         */
        @JsonSerialize(using = ToStringSerializer.class)
        private long startNodeId;
    
        /**
         * 流程创建日期时间
         */
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @JsonDeserialize(using = LocalDateTimeDeserializer.class)
        @JsonSerialize(using = LocalDateTimeSerializer.class)
        private LocalDateTime createDateTime;
    
        /**
         * 流程状态
         */
        private String status;
    
        /**
         * 流程默认标题
         */
        private String requestName;
    
        /**
         * 流程自定义标题
         */
        private String requestNameHtml;
    
        /**
         * 流程显示标题
         */
        private String requestNameTitle;
    
        /**
         * 流程紧急程度
         */
        private int requestLevel;
    
        /**
         * 流程编号
         */
        private String requestMark;
    
        /**
         * 密级
         */
        private int secLevel;
    
        /**
         * 流程状态 ： 草稿、审批中、待阅、退回、已归档、已作废
         */
        private RequestFlowStatusEnum flowStatus;
    
        /**
         * 流程归档时间、作废时间
         */
        @JsonDeserialize(using = LocalDateTimeDeserializer.class)
        @JsonSerialize(using = LocalDateTimeSerializer.class)
        private LocalDateTime finishDateTime;
    
        /**
         * 流转操作类型
         */
        private WorkflowOperateEventType operateType ;
    
        /**
         * 数据在PC端打开地址
         */
        private String pcUrl;
    
        /**
         * 数据在移动端打开地址
         */
        private String appUrl;
    
        /**
         * 数据自适应客户端地址，pc展示pc页面，移动端展示移动端页面
         */
        private String adapterUrl;
    
        /**
         * 被代理人转换数据
         */
        private String beAgentUserToHrmRule;
    
        /**
         * 流程类型主键
         */
        private long fixedVersionId;
    
        /**
         * 所属模块
         */
        private int module;
    
        /**
         * 自定义参数
         */
        private Map<String, Object> otherInfo;
    
        /**
         * 上一节点最后操作人 转换后数据
         */
        private String lastNodeOperatorToHrmRule;
    
        public RequestInfo(){}
    
        public void copyInfo(RequestInfo info){
            this.initData(info.getTimeStamp() , info.getTenantKey());
            this.operateType = info.getOperateType() ;
            this.pcUrl = info.getPcUrl() ;
            this.appUrl = info.getAppUrl() ;
            this.adapterUrl = info.getAdapterUrl() ;
            this.workFlowNameMultiLangList = info.getWorkFlowNameMultiLangList();
            this.currentNodeName = info.getCurrentNodeName() ;
            this.currentNodeNameMultiLangList = info.getCurrentNodeNameMultiLangList();
            this.requestId = info.getRequestId() ;
            this.userType = info.getUserType() ;
            super.setUserId(info.getUserId()) ;
            this.workflowName = info.getWorkflowName() ;
            this.workflowId = info.getWorkflowId() ;
            this.workflowType = info.getWorkflowType() ;
            this.startNodeId = info.getStartNodeId() ;
            this.createDateTime = info.getCreateDateTime() ;
            this.status = info.getStatus() ;
            this.requestName = info.getRequestName() ;
            this.requestNameHtml = info.getRequestNameHtml() ;
            this.requestNameTitle = info.getRequestNameTitle();
            this.requestLevel = info.getRequestLevel() ;
            this.flowStatus = info.getFlowStatus() ;
            this.finishDateTime = info.getFinishDateTime() ;
            this.fixedVersionId = info.getFixedVersionId();
            this.module = info.getModule();
            this.requestMark = info.getRequestMark() ;
            this.secLevel = info.getSecLevel() ;
            this.beAgentUserToHrmRule = info.getBeAgentUserToHrmRule() ;
            this.otherInfo = info.getOtherInfo();
            this.requestMark = info.getRequestMark();
        }
    
        public RequestInfo(RequestFlowSendMsgEntity entity){
            this.setRequestMsg(entity);
            List<RequestFlowSendMsgDetailEntity> msgDataList = entity.getMsgDataList() ;
            for (RequestFlowSendMsgDetailEntity detailEntity : msgDataList) {
                this.setRequestDetail(detailEntity) ;
            }
    
        }
    
        public void setRequestMsg(RequestFlowSendMsgEntity entity){
            super.initData(entity.getTimeStamp() , entity.getTenantKey());
            this.operateType = entity.getOperateType() ;
            this.pcUrl = entity.getPcUrl() ;
            this.appUrl = entity.getAppUrl() ;
            this.adapterUrl = entity.getAdapterUrl() ;
            RequestFlowBaseInfoEntity requestEntity = entity.getBaseInfoEntity() ;
            this.workFlowNameMultiLangList = requestEntity.getMuliWorkflowNameList();
            this.requestId = requestEntity.getRequestId() ;
            this.workflowId = requestEntity.getWorkflowId() ;
            this.workflowName = requestEntity.getWorkflowName() ;
            this.workflowType = requestEntity.getWorkflowType() ;
            this.userType = requestEntity.getUserType() ;
            super.setUserId(requestEntity.getUserId()) ;
            this.startNodeId = requestEntity.getStartNodeId() ;
            this.createDateTime = requestEntity.getCreateDateTime() ;
            this.status = requestEntity.getStatus() ;
            this.requestName = requestEntity.getRequestName() ;
            this.requestNameHtml = requestEntity.getRequestNameHtml() ;
            this.secLevel = requestEntity.getSecLevel() ;
            if (StringUtils.isBlank(this.requestNameHtml)){
                this.requestNameHtml = requestEntity.getRequestName() ;//如果 requestNameHtml 为空  读取requestName
            }
            this.requestNameTitle = requestEntity.getRequestNameTitle();
            if (StringUtils.isBlank(this.requestNameTitle)){
                this.requestNameTitle = requestEntity.getRequestName() ;//如果 requestNameHtml 为空  读取requestName
            }
            //流程新增逻辑  requestLevel 给的是分布式ID 对于推送 没有使用价值。
            try{
                this.requestLevel = Integer.parseInt(String.valueOf(requestEntity.getRequestLevel())) ;
            }catch (Exception e){
                this.requestLevel = 0 ;
            }
    
            this.flowStatus = requestEntity.getFlowStatus() ;
            this.finishDateTime = requestEntity.getFinishDateTime() ;
            this.fixedVersionId = requestEntity.getFixedVersionId();
            this.module = entity.getModule();
            this.otherInfo = requestEntity.getOtherInfo();
            this.requestMark = requestEntity.getRequestMark();
        }
    
        public void setRequestDetail(RequestFlowSendMsgDetailEntity entity) {
            switch (entity.getMsgType()){
                case WF_TODO:
                case WF_READED:
                    super.addDetailEntity(SendGroup.TODO ,new RequestDetail(entity));
                    break;
                case WF_DONE:
                    super.addDetailEntity(SendGroup.DONE ,new RequestDetail(entity));
                    break;
                case WF_DELETE:
                    super.addDetailEntity(SendGroup.DELETE ,new RequestDetail(entity));
                    break;
                case WF_FINISH:
                    super.addDetailEntity(SendGroup.OVER ,new RequestDetail(entity));
                    break;
                default:
                    super.addDetailEntity(null ,new RequestDetail(entity));
            }
        }
    
        public void setMsgLog(IutSendRequestMsgLog msgLog){
            if (this.requestId > 0){
                return;
            }
            super.initData(msgLog.getTimeStamp() , msgLog.getTenantKey());
            for (WorkflowOperateEventType type : WorkflowOperateEventType.values()){
                if (type.name().equalsIgnoreCase(msgLog.getOperateType())){
                    this.operateType = type ;
                    break;
                }
            }
            this.pcUrl = msgLog.getPcUrl() ;
            this.appUrl = msgLog.getAppUrl() ;
            this.requestId = msgLog.getRequestId() ;
            this.adapterUrl = msgLog.getAdapterUrl() ;
            this.workflowName = msgLog.getWorkflowName() ;
            this.workflowId = msgLog.getWorkflowId() ;
            super.setUserId(msgLog.getUserId()) ;
            this.workflowType = msgLog.getWorkflowType() ;
            this.startNodeId = msgLog.getStartNodeId() ;
            this.userType = msgLog.getUserType() ;
            this.status = msgLog.getStatus() ;
            this.createDateTime = msgLog.getCreateDateTime() ;
            this.requestNameHtml = msgLog.getRequestNameHtml() ;
            this.requestName = msgLog.getRequestName() ;
            if (StringUtils.isBlank(this.requestNameHtml)){
                this.requestNameHtml = msgLog.getRequestName() ;//如果 requestNameHtml 为空  读取requestName
            }
            this.requestNameTitle = msgLog.getRequestNameTitle();
            if (StringUtils.isBlank(this.requestNameTitle)){
                this.requestNameTitle = msgLog.getRequestName() ;//如果 requestNameTitle 为空  读取requestName
            }
            this.module = msgLog.getSdkModule();
            //流程新增逻辑  requestLevel 给的是分布式ID 对于推送 没有使用价值。
            try{
                this.requestLevel = Integer.parseInt(String.valueOf(msgLog.getRequestLevel())) ;
            }catch (Exception e){
                this.requestLevel = 0 ;
            }
            for (RequestFlowStatusEnum status : RequestFlowStatusEnum.values()){
                if (status.name().equalsIgnoreCase(msgLog.getFlowStatus())){
                    this.flowStatus = status ;
                    break;
                }
            }
            this.finishDateTime = msgLog.getFinishDateTime() ;
            this.requestMark = msgLog.getRequestMark();
            this.fixedVersionId = msgLog.getFixedVersionId() ;
        }
    
    
    
        @Override
        public WPushType getWPushType() {
            return WPushType.REQUEST;
        }
    
        public long getRequestId() {
            return requestId;
        }
    
        public long getWorkflowId() {
            return workflowId;
        }
    
        public String getWorkflowName() {
            return workflowName;
        }
    
        public long getWorkflowType() {
            return workflowType;
        }
    
        public int getUserType() {
            return userType;
        }
    
        public long getStartNodeId() {
            return startNodeId;
        }
    
        public LocalDateTime getCreateDateTime() {
            return createDateTime;
        }
    
        public String getStatus() {
            return status;
        }
    
        public String getRequestName() {
            return requestName;
        }
    
        public String getRequestNameHtml() {
            return requestNameHtml;
        }
    
        public int getRequestLevel() {
            return requestLevel;
        }
    
        public String getRequestMark() {
            return requestMark;
        }
    
        public int getSecLevel() {
            return secLevel;
        }
    
        public RequestFlowStatusEnum getFlowStatus() {
            return flowStatus;
        }
    
        public LocalDateTime getFinishDateTime() {
            return finishDateTime;
        }
    
        public WorkflowOperateEventType getOperateType() {
            return operateType;
        }
    
        public String getPcUrl() {
            return pcUrl;
        }
    
        public String getAppUrl() {
            return appUrl;
        }
    
        public String getAdapterUrl() {
            return adapterUrl;
        }
    
        public void setRequestId(long requestId) {
            this.requestId = requestId;
        }
    
        public void setWorkflowId(long workflowId) {
            this.workflowId = workflowId;
        }
    
        public void setWorkflowName(String workflowName) {
            this.workflowName = workflowName;
        }
    
        public void setWorkflowType(long workflowType) {
            this.workflowType = workflowType;
        }
    
        public void setUserType(int userType) {
            this.userType = userType;
        }
    
        public void setStartNodeId(long startNodeId) {
            this.startNodeId = startNodeId;
        }
    
        public void setCreateDateTime(LocalDateTime createDateTime) {
            this.createDateTime = createDateTime;
        }
    
        public void setStatus(String status) {
            this.status = status;
        }
    
        public void setRequestName(String requestName) {
            this.requestName = requestName;
        }
    
        public void setRequestNameHtml(String requestNameHtml) {
            this.requestNameHtml = requestNameHtml;
        }
    
        public void setRequestLevel(int requestLevel) {
            this.requestLevel = requestLevel;
        }
    
        public void setRequestMark(String requestMark) {
            this.requestMark = requestMark;
        }
    
        public void setSecLevel(int secLevel) {
            this.secLevel = secLevel;
        }
    
        public void setFlowStatus(RequestFlowStatusEnum flowStatus) {
            this.flowStatus = flowStatus;
        }
    
        public void setFinishDateTime(LocalDateTime finishDateTime) {
            this.finishDateTime = finishDateTime;
        }
    
        public void setOperateType(WorkflowOperateEventType operateType) {
            this.operateType = operateType;
        }
    
        public void setPcUrl(String pcUrl) {
            this.pcUrl = pcUrl;
        }
    
        public void setAppUrl(String appUrl) {
            this.appUrl = appUrl;
        }
    
        public void setAdapterUrl(String adapterUrl) {
            this.adapterUrl = adapterUrl;
        }
    
        public String getBeAgentUserToHrmRule() {
            return beAgentUserToHrmRule;
        }
    
        public void setBeAgentUserToHrmRule(String beAgentUserToHrmRule) {
            this.beAgentUserToHrmRule = beAgentUserToHrmRule;
        }
    
        public long getFixedVersionId() {
            return fixedVersionId;
        }
    
        public void setFixedVersionId(long fixedVersionId) {
            this.fixedVersionId = fixedVersionId;
        }
    
        public List<RequestMsgMuliLangEntity> getWorkFlowNameMultiLangList() {
            return workFlowNameMultiLangList;
        }
    
        public void setWorkFlowNameMultiLangList(List<RequestMsgMuliLangEntity> workFlowNameMultiLangList) {
            this.workFlowNameMultiLangList = workFlowNameMultiLangList;
        }
    
        public String getCurrentNodeName() {
            return currentNodeName;
        }
    
        public void setCurrentNodeName(String currentNodeName) {
            this.currentNodeName = currentNodeName;
        }
    
        public List<RequestMsgMuliLangEntity> getCurrentNodeNameMultiLangList() {
            return currentNodeNameMultiLangList;
        }
    
        public void setCurrentNodeNameMultiLangList(List<RequestMsgMuliLangEntity> currentNodeNameMultiLangList) {
            this.currentNodeNameMultiLangList = currentNodeNameMultiLangList;
        }
    
        public String getRequestNameTitle() {
            return requestNameTitle;
        }
    
        public void setRequestNameTitle(String requestNameTitle) {
            this.requestNameTitle = requestNameTitle;
        }
    
        public int getModule() {
            return module;
        }
    
        public void setModule(int module) {
            this.module = module;
        }
    
        public Map<String, Object> getOtherInfo() {
            return otherInfo;
        }
    
        public void setOtherInfo(Map<String, Object> otherInfo) {
            this.otherInfo = otherInfo;
        }
    
        public String getLastNodeOperatorToHrmRule() {
            return lastNodeOperatorToHrmRule;
        }
    
        public void setLastNodeOperatorToHrmRule(String lastNodeOperatorToHrmRule) {
            this.lastNodeOperatorToHrmRule = lastNodeOperatorToHrmRule;
        }
    }  
  
---  
  
字段说明:用户待办信息  
  
---  
      
    
    package com.weaver.intunifytodo.client.common.tools.message;
    
    import com.fasterxml.jackson.databind.annotation.JsonSerialize;
    import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
    import com.weaver.intunifytodo.client.common.tools.enums.SendGroup;
    
    /**
     * @Author: houmf
     * @Date: 2021/8/13 11:23
     * @Description:
     */
    public abstract class MessageDetailData implements MessageDetail {
        /**
         * 接收id
         */
        @JsonSerialize(using = ToStringSerializer.class)
        private long userId;
    
        /**
         * 日志ID
         */
        @JsonSerialize(using = ToStringSerializer.class)
        private long  logId ;
    
        /**
         * 推送记录ID
         */
        @JsonSerialize(using = ToStringSerializer.class)
        private long sendLogId ;
    
        /**
         * 转换后的 用户数据
         */
        private String userToHrmRule ;
    
        public String getUserToHrmRule() {
            return userToHrmRule;
        }
    
        @Override
        public void setUserToHrmRule(String userToHrmRule) {
            this.userToHrmRule = userToHrmRule;
        }
    
        /**
         * 推送消息类型
         */
        private SendGroup sendGroup ;
    
        /**
         * 真实身份id
         */
        @JsonSerialize(using = ToStringSerializer.class)
        private long realUserId;
    
        @Override
        public long getUserId() {
            return this.userId;
        }
    
        public void setUserId(long userId) {
            this.userId = userId;
        }
    
        @Override
        public SendGroup getSendGroup() {
            return this.sendGroup;
        }
    
        public void setSendGroup(SendGroup sendGroup) {
            this.sendGroup = sendGroup;
        }
    
        @Override
        public long getLogId() {
            return logId;
        }
    
        public void setLogId(long logId) {
            this.logId = logId;
        }
    
    
        @Override
        public long getSendLogId() {
            return this.sendLogId;
        }
    
        @Override
        public void setSendLogId(long sendLogId) {
            this.sendLogId = sendLogId ;
        }
    
        @Override
        public long getRealUserId() {
            return realUserId;
        }
    
        public void setRealUserId(long realUserId) {
            this.realUserId = realUserId;
        }
    }
    
    
    package com.weaver.intunifytodo.client.engine.entity.message.workflow;
    
    import com.fasterxml.jackson.annotation.JsonFormat;
    import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
    import com.fasterxml.jackson.databind.annotation.JsonSerialize;
    import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
    import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
    import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
    import com.weaver.intunifytodo.client.base.entity.po.IutSendRequestMsgLog;
    import com.weaver.workflow.common.constant.core.flow.OperateRemarkEnum;
    import com.weaver.workflow.common.constant.list.msg.send.RequestFlowMsgTypeEnum;
    import com.weaver.workflow.common.constant.list.requestlist.RequestListReadMarkEnum;
    import com.weaver.workflow.common.constant.pathdef.pathnode.WfpNodeType;
    import com.weaver.workflow.common.entity.list.msg.send.RequestFlowSendMsgDetailEntity;
    import com.weaver.intunifytodo.client.common.tools.message.MessageDetailData;
    import com.weaver.intunifytodo.client.common.tools.enums.SendGroup;
    import com.weaver.workflow.common.entity.list.msg.send.RequestMsgMuliLangEntity;
    
    import java.time.LocalDateTime;
    import java.util.List;
    import java.util.Map;
    
    /**
     * @Author: houmf
     * @Date: 2021/8/12 15:00
     * @Description:
     */
    public class RequestDetail extends MessageDetailData {
    
        /**
         * 操作唯一标示
         */
        @JsonSerialize(using = ToStringSerializer.class)
        private long cid;
    
        /**
         * 被代理人ID
         */
        @JsonSerialize(using = ToStringSerializer.class)
        private long beAgentUserId;
    
        /**
         * 接收时间
         */
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @JsonDeserialize(using = LocalDateTimeDeserializer.class)
        @JsonSerialize(using = LocalDateTimeSerializer.class)
        private LocalDateTime receiveDateTime;
    
        /**
         * 操作时间
         */
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @JsonDeserialize(using = LocalDateTimeDeserializer.class)
        @JsonSerialize(using = LocalDateTimeSerializer.class)
        private LocalDateTime operateDateTime;
    
        /**
         * 查看状态
         */
        private RequestListReadMarkEnum readMark;
    
        /**
         * 审批身份--OperateRemarkEnum
         */
        private OperateRemarkEnum isRemark;
    
        /**
         * 节点id
         */
        @JsonSerialize(using = ToStringSerializer.class)
        private long nodeId;
    
        /**
         * 节点名称
         */
        private String nodeName;
    
        /**
         * 节点名称 多语言
         */
        private List<RequestMsgMuliLangEntity> nodeNameMultiLangNodeName;
    
        /**
         * 节点类型
         */
        private WfpNodeType nodeType;
    
        /**
         * 消息类型
         */
        private RequestFlowMsgTypeEnum msgType;
    
        /**
         * 是否需反馈标记
         */
        private int needWFBack;
    
        /**
         * 超时状态标记
         */
        private int isProcessed;
    
        /**
         * 数据最新查看时间
         */
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @JsonDeserialize(using = LocalDateTimeDeserializer.class)
        @JsonSerialize(using = LocalDateTimeSerializer.class)
        private LocalDateTime viewDatetime;
    
    
        private String beAgentUserToHrmRule ;
    
        private long userMasterId;
        /**
         * 流程组推送过来的其他数据
         */
        private Map<String, Object> otherParams;
    
        /**
         * 处理后的PcURL
         */
        private String handlePcUrl;
    
        /**
         * 处理后的AppURL
         */
        private String handleAppUrl;
    
        /**
         * 处理后的自适应URL，pc展示pc页面，移动端展示移动端页面
         */
        private String handleAdapterUrl;
    
    
        public RequestDetail() {
        }
    
        public RequestDetail(RequestFlowSendMsgDetailEntity entity) {
            this.msgType = entity.getMsgType() ;
            switch (entity.getMsgType()){
                case WF_TODO:
                case WF_READED:
                    super.setSendGroup(SendGroup.TODO);
                    break;
                case WF_DONE:
                    super.setSendGroup(SendGroup.DONE) ;
                    break;
                case WF_DELETE:
                    super.setSendGroup(SendGroup.DELETE) ;
                    break;
                case WF_FINISH:
                    super.setSendGroup(SendGroup.OVER) ;
                    break;
                default:
                    return;
            }
            this.cid = entity.getCid() ;
            super.setUserId(entity.getUserId()) ;
            super.setRealUserId(entity.getReadUserId());
            this.beAgentUserId = entity.getBeAgentUserId() ;
            this.receiveDateTime = entity.getReceiveDateTime() ;
            this.operateDateTime = entity.getOperateDateTime() ;
            this.readMark = entity.getReadMark() ;
            this.isRemark = entity.getIsremark() ;
            this.nodeId = entity.getNodeId() ;
            this.nodeName = entity.getNodeName() ;
            this.nodeNameMultiLangNodeName = entity.getMuliNodeNameList();
            this.nodeType = entity.getNodeType() ;
            this.needWFBack = entity.getNeedwfback() ;
            this.isProcessed = entity.getIsprocessed() ;
            this.viewDatetime = entity.getViewdatetime() ;
            this.otherParams = entity.getOtherParams();
        }
    
        public RequestDetail(IutSendRequestMsgLog msgLog , SendGroup sendGroup){
            super.setLogId(msgLog.getId());
            super.setSendGroup(sendGroup);
            this.cid = msgLog.getCid() ;
            super.setUserId(msgLog.getReceiver()) ;
            this.setRealUserId(msgLog.getRealUserId());
            this.beAgentUserId = msgLog.getBeAgentUserId() ;
            this.receiveDateTime = msgLog.getReceiveDateTime() ;
            this.operateDateTime = msgLog.getOperateDateTime() ;
    
            for (RequestListReadMarkEnum mark : RequestListReadMarkEnum.values()){
                if (mark.getCode() == msgLog.getReadMark()){
                    this.readMark = mark ;
                    break;
                }
            }
    
            for (OperateRemarkEnum remarkEnum : OperateRemarkEnum.values()){
                if (remarkEnum.getCode() == msgLog.getIsremark()){
                    this.isRemark = remarkEnum ;
                    break;
                }
            }
            this.nodeId = msgLog.getNodeId() ;
            this.nodeName = msgLog.getNodeName() ;
            for (WfpNodeType type : WfpNodeType.values()){
                if (type.name().equalsIgnoreCase(msgLog.getNodeType())){
                    this.nodeType = type ;
                    break;
                }
            }
            this.needWFBack = msgLog.getNeedwfback() ;
            this.isProcessed = msgLog.getIsprocessed() ;
            this.viewDatetime = msgLog.getViewdatetime() ;
        }
    
        public Map<String, Object> getOtherParams() {
            return otherParams;
        }
    
        public void setOtherParams(Map<String, Object> otherParams) {
            this.otherParams = otherParams;
        }
    
        public long getCid() {
            return cid;
        }
    
        public long getBeAgentUserId() {
            return beAgentUserId;
        }
    
        public LocalDateTime getReceiveDateTime() {
            return receiveDateTime;
        }
    
        public LocalDateTime getOperateDateTime() {
            return operateDateTime;
        }
    
        public RequestListReadMarkEnum getReadMark() {
            return readMark;
        }
    
        public OperateRemarkEnum getIsRemark() {
            return isRemark;
        }
    
        public long getNodeId() {
            return nodeId;
        }
    
        public String getNodeName() {
            return nodeName;
        }
    
        public WfpNodeType getNodeType() {
            return nodeType;
        }
    
        public int getNeedWFBack() {
            return needWFBack;
        }
    
        public int getIsProcessed() {
            return isProcessed;
        }
    
        public LocalDateTime getViewDatetime() {
            return viewDatetime;
        }
    
        public String getBeAgentUserToHrmRule() {
            return beAgentUserToHrmRule;
        }
    
        public void setBeAgentUserToHrmRule(String beAgentUserToHrmRule) {
            this.beAgentUserToHrmRule = beAgentUserToHrmRule;
        }
    
        public RequestFlowMsgTypeEnum getMsgType() {
            return msgType;
        }
    
        public void setCid(long cid) {
            this.cid = cid;
        }
    
        public void setBeAgentUserId(long beAgentUserId) {
            this.beAgentUserId = beAgentUserId;
        }
    
        public void setReceiveDateTime(LocalDateTime receiveDateTime) {
            this.receiveDateTime = receiveDateTime;
        }
    
        public void setOperateDateTime(LocalDateTime operateDateTime) {
            this.operateDateTime = operateDateTime;
        }
    
        public void setReadMark(RequestListReadMarkEnum readMark) {
            this.readMark = readMark;
        }
    
        public void setIsRemark(OperateRemarkEnum isRemark) {
            this.isRemark = isRemark;
        }
    
        public void setNodeId(long nodeId) {
            this.nodeId = nodeId;
        }
    
        public void setNodeName(String nodeName) {
            this.nodeName = nodeName;
        }
    
        public void setNodeType(WfpNodeType nodeType) {
            this.nodeType = nodeType;
        }
    
        public void setMsgType(RequestFlowMsgTypeEnum msgType) {
            this.msgType = msgType;
        }
    
        public void setNeedWFBack(int needWFBack) {
            this.needWFBack = needWFBack;
        }
    
        public void setIsProcessed(int isProcessed) {
            this.isProcessed = isProcessed;
        }
    
        public void setViewDatetime(LocalDateTime viewDatetime) {
            this.viewDatetime = viewDatetime;
        }
    
        public List<RequestMsgMuliLangEntity> getNodeNameMultiLangNodeName() {
            return nodeNameMultiLangNodeName;
        }
    
        public void setNodeNameMultiLangNodeName(List<RequestMsgMuliLangEntity> nodeNameMultiLangNodeName) {
            this.nodeNameMultiLangNodeName = nodeNameMultiLangNodeName;
        }
    
        public long getUserMasterId() {
            return userMasterId;
        }
    
        public void setUserMasterId(long userMasterId) {
            this.userMasterId = userMasterId;
        }
    
        public String getHandlePcUrl() {
            return handlePcUrl;
        }
    
        public void setHandlePcUrl(String handlePcUrl) {
            this.handlePcUrl = handlePcUrl;
        }
    
        public String getHandleAppUrl() {
            return handleAppUrl;
        }
    
        public void setHandleAppUrl(String handleAppUrl) {
            this.handleAppUrl = handleAppUrl;
        }
    
        public String getHandleAdapterUrl() {
            return handleAdapterUrl;
        }
    
        public void setHandleAdapterUrl(String handleAdapterUrl) {
            this.handleAdapterUrl = handleAdapterUrl;
        }
    }

推送内容参考：

{"id":1169968827050229760,"sysCode":"ecode","serverURL":"","data":{"tenantKey":"TTBFQ2XU5V","timeStamp":"1761877366973","userId":"5113420313996493331","detailMap":{"DELETE":[],"OVER":[],"TODO":[{"userId":"921576673248567296","logId":"1196910177405386757","sendLogId":"1196910177405386764","userToHrmRule":"921576673248567296","sendGroup":"TODO","realUserId":"921576673248567296","cid":"1196910173305061385","beAgentUserId":"0","receiveDateTime":"2025-10-31 10:22:46","operateDateTime":null,"readMark":"UNREAD","isRemark":"NODE_OPERATOR","nodeId":"1064114938488520732","nodeName":"001审批","nodeNameMultiLangNodeName":[{"langType":"zh_CN","langValue":"001审批"},{"langType":"en_US","langValue":"001审批"},{"langType":"zh_TW","langValue":"001审批"},{"langType":"ko_KR","langValue":"001审批"},{"langType":"ru_RU","langValue":"001审批"},{"langType":"ja_JP","langValue":"001审批"},{"langType":"th_TH","langValue":"001审批"},{"langType":"es_ES","langValue":"001审批"},{"langType":"de_DE","langValue":"001审批"},{"langType":"fr_FR","langValue":"001审批"},{"langType":"pt_PT","langValue":"001审批"},{"langType":"in_ID","langValue":"001审批"},{"langType":"ar_AE","langValue":"001审批"}],"nodeType":"APPROVE","msgType":"WF_TODO","needWFBack":1,"isProcessed":0,"viewDatetime":null,"beAgentUserToHrmRule":null,"userMasterId":0,"otherParams":{"urlConfig":"{\"requestId\":\"1196910134650355712\",\"nodeId\":\"1064114938488520732\",\"workflowId\":\"1064114938488520720\"}"},"handlePcUrl":"/sp/workflow/flowpage/view/1196910134650355712?secondEmpId=921576673248567296","handleAppUrl":"/mobile/workflow/flowpage/view/1196910134650355712?secondEmpId=921576673248567296","handleAdapterUrl":"/sp/workflow/adapter/flowpage/view/1196910134650355712?secondEmpId=921576673248567296"}],"DONE":[{"userId":"5113420313996493331","logId":"1196910177405386753","sendLogId":"1196910177405386763","userToHrmRule":"5113420313996493331","sendGroup":"DONE","realUserId":"5113420313996493331","cid":"1196910169052037125","beAgentUserId":"0","receiveDateTime":"2025-10-31 10:22:45","operateDateTime":"2025-10-31 10:22:46","readMark":"NORMAL","isRemark":"OPERATED","nodeId":"1064114938488520726","nodeName":"发起节点","nodeNameMultiLangNodeName":[{"langType":"zh_CN","langValue":"发起节点"},{"langType":"en_US","langValue":"发起节点"},{"langType":"zh_TW","langValue":"发起节点"},{"langType":"ko_KR","langValue":"发起节点"},{"langType":"ru_RU","langValue":"发起节点"},{"langType":"ja_JP","langValue":"发起节点"},{"langType":"th_TH","langValue":"发起节点"},{"langType":"es_ES","langValue":"发起节点"},{"langType":"de_DE","langValue":"发起节点"},{"langType":"fr_FR","langValue":"发起节点"},{"langType":"pt_PT","langValue":"发起节点"},{"langType":"in_ID","langValue":"发起节点"},{"langType":"ar_AE","langValue":"发起节点"}],"nodeType":"START","msgType":"WF_DONE","needWFBack":1,"isProcessed":0,"viewDatetime":"2025-10-31 10:22:45","beAgentUserToHrmRule":null,"userMasterId":0,"otherParams":{"urlConfig":"{\"requestId\":\"1196910134650355712\",\"nodeId\":\"1064114938488520726\",\"workflowId\":\"1064114938488520720\"}"},"handlePcUrl":"/sp/workflow/flowpage/view/1196910134650355712?secondEmpId=5113420313996493331","handleAppUrl":"/mobile/workflow/flowpage/view/1196910134650355712?secondEmpId=5113420313996493331","handleAdapterUrl":"/sp/workflow/adapter/flowpage/view/1196910134650355712?secondEmpId=5113420313996493331"}]},"userToHrmRule":"5113420313996493331","requestId":"1196910134650355712","workflowId":"1064114938488520720","workflowName":"推送测试A-01","workFlowNameMultiLangList":[{"langType":"zh_CN","langValue":"推送测试A-01"},{"langType":"en_US","langValue":"推送测试A-01"},{"langType":"zh_TW","langValue":"推送测试A-01"},{"langType":"ko_KR","langValue":"推送测试A-01"},{"langType":"ru_RU","langValue":"推送测试A-01"},{"langType":"ja_JP","langValue":"推送测试A-01"},{"langType":"th_TH","langValue":"推送测试A-01"},{"langType":"es_ES","langValue":"推送测试A-01"},{"langType":"de_DE","langValue":"推送测试A-01"},{"langType":"fr_FR","langValue":"推送测试A-01"},{"langType":"pt_PT","langValue":"推送测试A-01"},{"langType":"in_ID","langValue":"推送测试A-01"},{"langType":"ar_AE","langValue":"推送测试A-01"}],"currentNodeName":"001审批","currentNodeNameMultiLangList":[{"langType":"zh_CN","langValue":"001审批"},{"langType":"en_US","langValue":"001审批"},{"langType":"zh_TW","langValue":"001审批"},{"langType":"ko_KR","langValue":"001审批"},{"langType":"ru_RU","langValue":"001审批"},{"langType":"ja_JP","langValue":"001审批"},{"langType":"th_TH","langValue":"001审批"},{"langType":"es_ES","langValue":"001审批"},{"langType":"de_DE","langValue":"001审批"},{"langType":"fr_FR","langValue":"001审批"},{"langType":"pt_PT","langValue":"001审批"},{"langType":"in_ID","langValue":"001审批"},{"langType":"ar_AE","langValue":"001审批"}],"workflowType":"1064114646304915501","userType":"0","startNodeId":"1064114938488520726","createDateTime":"2025-10-31 10:22:46","status":"发起节点 至 1级审批","requestName":"MQ测试2","requestNameHtml":"<p style=\"margin-top:0; margin-bottom:0; display: inline;\"><span>MQ测试2</span> <span style = \"color:#999;font-size:12px; font-size: 12px;\"><span></span></span>","requestNameTitle":"MQ测试2 ","requestLevel":0,"requestMark":null,"secLevel":40,"flowStatus":{"code":1,"desc":"审批中","labelid":14333},"finishDateTime":null,"operateType":"SUBMIT_END","pcUrl":"/sp/workflow/flowpage/view/1196910134650355712","appUrl":"/mobile/workflow/flowpage/view/1196910134650355712","adapterUrl":"/sp/workflow/adapter/flowpage/view/1196910134650355712","beAgentUserToHrmRule":null,"fixedVersionId":1064114938488520720,"module":0,"otherInfo":{"operateTypeSrc":"submit","lastNodeUserId":5113420313996493331},"lastNodeOperatorToHrmRule":"5113420313996493331","wpushType":"REQUEST","detailList":[{"userId":"921576673248567296","logId":"1196910177405386757","sendLogId":"1196910177405386764","userToHrmRule":"921576673248567296","sendGroup":"TODO","realUserId":"921576673248567296","cid":"1196910173305061385","beAgentUserId":"0","receiveDateTime":"2025-10-31 10:22:46","operateDateTime":null,"readMark":"UNREAD","isRemark":"NODE_OPERATOR","nodeId":"1064114938488520732","nodeName":"001审批","nodeNameMultiLangNodeName":[{"langType":"zh_CN","langValue":"001审批"},{"langType":"en_US","langValue":"001审批"},{"langType":"zh_TW","langValue":"001审批"},{"langType":"ko_KR","langValue":"001审批"},{"langType":"ru_RU","langValue":"001审批"},{"langType":"ja_JP","langValue":"001审批"},{"langType":"th_TH","langValue":"001审批"},{"langType":"es_ES","langValue":"001审批"},{"langType":"de_DE","langValue":"001审批"},{"langType":"fr_FR","langValue":"001审批"},{"langType":"pt_PT","langValue":"001审批"},{"langType":"in_ID","langValue":"001审批"},{"langType":"ar_AE","langValue":"001审批"}],"nodeType":"APPROVE","msgType":"WF_TODO","needWFBack":1,"isProcessed":0,"viewDatetime":null,"beAgentUserToHrmRule":null,"userMasterId":0,"otherParams":{"urlConfig":"{\"requestId\":\"1196910134650355712\",\"nodeId\":\"1064114938488520732\",\"workflowId\":\"1064114938488520720\"}"},"handlePcUrl":"/sp/workflow/flowpage/view/1196910134650355712?secondEmpId=921576673248567296","handleAppUrl":"/mobile/workflow/flowpage/view/1196910134650355712?secondEmpId=921576673248567296","handleAdapterUrl":"/sp/workflow/adapter/flowpage/view/1196910134650355712?secondEmpId=921576673248567296"},{"userId":"5113420313996493331","logId":"1196910177405386753","sendLogId":"1196910177405386763","userToHrmRule":"5113420313996493331","sendGroup":"DONE","realUserId":"5113420313996493331","cid":"1196910169052037125","beAgentUserId":"0","receiveDateTime":"2025-10-31 10:22:45","operateDateTime":"2025-10-31 10:22:46","readMark":"NORMAL","isRemark":"OPERATED","nodeId":"1064114938488520726","nodeName":"发起节点","nodeNameMultiLangNodeName":[{"langType":"zh_CN","langValue":"发起节点"},{"langType":"en_US","langValue":"发起节点"},{"langType":"zh_TW","langValue":"发起节点"},{"langType":"ko_KR","langValue":"发起节点"},{"langType":"ru_RU","langValue":"发起节点"},{"langType":"ja_JP","langValue":"发起节点"},{"langType":"th_TH","langValue":"发起节点"},{"langType":"es_ES","langValue":"发起节点"},{"langType":"de_DE","langValue":"发起节点"},{"langType":"fr_FR","langValue":"发起节点"},{"langType":"pt_PT","langValue":"发起节点"},{"langType":"in_ID","langValue":"发起节点"},{"langType":"ar_AE","langValue":"发起节点"}],"nodeType":"START","msgType":"WF_DONE","needWFBack":1,"isProcessed":0,"viewDatetime":"2025-10-31 10:22:45","beAgentUserToHrmRule":null,"userMasterId":0,"otherParams":{"urlConfig":"{\"requestId\":\"1196910134650355712\",\"nodeId\":\"1064114938488520726\",\"workflowId\":\"1064114938488520720\"}"},"handlePcUrl":"/sp/workflow/flowpage/view/1196910134650355712?secondEmpId=5113420313996493331","handleAppUrl":"/mobile/workflow/flowpage/view/1196910134650355712?secondEmpId=5113420313996493331","handleAdapterUrl":"/sp/workflow/adapter/flowpage/view/1196910134650355712?secondEmpId=5113420313996493331"}]},"paramJSON":{"todoURL":"[http://10.10.37.188:8080/rest/ofs/batchDeleteUserRequestInfoByJson](http://10.10.37.188:8080/rest/ofs/batchDeleteUserRequestInfoByJson)"}}  
---  
  
 

##
