From e67b184e7749306a87110d7d5e796186bd059ac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=9D=8E=E5=9D=8E=E5=9D=B7=E5=9D=B7?= Date: Thu, 26 Nov 2020 08:45:37 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"Fix=20issue=20#1888:=20=E8=A1=A5?= =?UTF-8?q?=E5=85=A8OA=E5=9B=9E=E8=B0=83=E4=BF=A1=E6=81=AF"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cp/bean/message/WxCpXmlMessage.java | 165 +++++++++++++++++- 1 file changed, 157 insertions(+), 8 deletions(-) diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlMessage.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlMessage.java index 9966a86e04..c059587cec 100644 --- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlMessage.java +++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlMessage.java @@ -547,6 +547,9 @@ public static class SendLocationInfo implements Serializable { } + /** + * 审批信息 + */ @XStreamAlias("ApprovalInfo") @Data public static class ApprovalInfo implements Serializable { @@ -557,11 +560,14 @@ public static class ApprovalInfo implements Serializable { */ @XStreamAlias("SpNo") private String spNo; + /** * 审批申请类型名称(审批模板名称) */ @XStreamAlias("SpName") + @XStreamConverter(value = XStreamCDataConverter.class) private String spName; + /** * 申请单状态:1-审批中;2-已通过;3-已驳回;4-已撤销;6-通过后撤销;7-已删除;10-已支付 */ @@ -572,70 +578,213 @@ public static class ApprovalInfo implements Serializable { * 审批模板id。 */ @XStreamAlias("TemplateId") + @XStreamConverter(value = XStreamCDataConverter.class) private String templateId; /** * 审批申请提交时间,Unix时间戳 */ @XStreamAlias("ApplyTime") - private Integer applyTime; + private Long applyTime; /** * 申请人信息 */ @XStreamAlias("Applyer") private Applier applier; + + /** + * 审批流程信息,可能有多个审批节点。 + */ + @XStreamImplicit(itemFieldName="SpRecord") + private List spRecords; + + /** + * 抄送信息,可能有多个抄送节点 + */ + @XStreamImplicit(itemFieldName="Notifyer") + private List notorieties; + + /** + * 审批申请备注信息,可能有多个备注节点 + */ + @XStreamImplicit(itemFieldName="Comments") + private List comments; + /** * 审批申请单变化类型 */ @XStreamAlias("StatuChangeEvent") private Integer statusChangeEvent; + /** + * 申请人信息 + */ @XStreamAlias("Applyer") @Data public static class Applier implements Serializable { private static final long serialVersionUID = -979255011922209018L; + /** + * 申请人userid + */ @XStreamAlias("UserId") private String userId; + + /** + * 申请人所在部门pid + */ @XStreamAlias("Party") private String party; } + + /** + * 审批流程信息 + */ @XStreamAlias("SpRecord") @Data public static class SpRecord implements Serializable{ private static final long serialVersionUID = 1247535623941881764L; + /** + * 审批节点状态:1-审批中;2-已同意;3-已驳回;4-已转审 + */ @XStreamAlias("SpStatus") private String spStatus; + /** + * 节点审批方式:1-或签;2-会签 + */ @XStreamAlias("ApproverAttr") private String approverAttr; - @XStreamAlias("Details") - private Details details; + /** + * 审批节点详情。当节点为标签或上级时,一个节点可能有多个分支 + */ + @XStreamImplicit(itemFieldName="Details") + private List
details; } + /** + * 审批节点详情 + */ @XStreamAlias("Details") @Data public static class Details implements Serializable{ private static final long serialVersionUID = -8446107461495047603L; - @XStreamAlias("SpStatus") - private String spStatus; + /** + * 分支审批人 + */ + @XStreamAlias("Approver") + private Approver approver; + /** + * 审批意见字段 + */ @XStreamAlias("Speech") private String speech; - @XStreamAlias("Approver") - private String approver; + /** + * 分支审批人审批状态:1-审批中;2-已同意;3-已驳回;4-已转审 + */ + @XStreamAlias("SpStatus") + private String spStatus; + /** + * 节点分支审批人审批操作时间,0为尚未操作 + */ @XStreamAlias("SpTime") - private String spTime; + private Long spTime; + + /** + * 节点分支审批人审批意见附件,赋值为media_id具体使用请参考:文档-获取临时素材 + */ + @XStreamAlias("Attach") + private String attach; + } + + /** + * 分支审批人 + */ + @Data + @XStreamAlias("Approver") + public static class Approver implements Serializable{ + + private static final long serialVersionUID = 7360442444186683191L; + + /** + * 分支审批人userid + */ + @XStreamAlias("UserId") + private String userId; } + /** + * 抄送信息 + */ + @Data + @XStreamAlias("Notifyer") + public static class Notifyer implements Serializable{ + + private static final long serialVersionUID = -4524071522890013920L; + + /** + * 节点抄送人userid + */ + @XStreamAlias("UserId") + private String userId; + } + + /** + * 审批申请备注信息 + */ + @Data + @XStreamAlias("Comments") + public static class Comments implements Serializable{ + + private static final long serialVersionUID = 6912156206252719485L; + + /** + * 备注人信息 + */ + @XStreamAlias("CommentUserInfo") + private CommentUserInfo commentUserInfo; + + /** + * 备注提交时间 + */ + @XStreamAlias("CommentTime") + private String commentTime; + + /** + * 备注文本内容 + */ + @XStreamAlias("CommentContent") + private String commentContent; + + /** + * 备注id + */ + @XStreamAlias("CommentId") + private String commentId; + + } + + @Data + @XStreamAlias("CommentUserInfo") + private static class CommentUserInfo implements Serializable{ + + private static final long serialVersionUID = 5031739716823000947L; + + /** + * 备注人userid + */ + @XStreamAlias("UserId") + private String userId; + } } }