|
| 1 | +package me.chanjar.weixin.cp.bean.message; |
| 2 | + |
| 3 | +import com.thoughtworks.xstream.annotations.XStreamAlias; |
| 4 | +import com.thoughtworks.xstream.annotations.XStreamConverter; |
| 5 | +import com.thoughtworks.xstream.annotations.XStreamImplicit; |
| 6 | +import lombok.Data; |
| 7 | +import me.chanjar.weixin.common.util.xml.XStreamCDataConverter; |
| 8 | + |
| 9 | +import java.io.Serializable; |
| 10 | +import java.util.List; |
| 11 | + |
| 12 | +/** |
| 13 | + * 审批信息 |
| 14 | + * |
| 15 | + * @author Gyv12345 |
| 16 | + */ |
| 17 | +@XStreamAlias("ApprovalInfo") |
| 18 | +@Data |
| 19 | +public class WxCpXmlApprovalInfo implements Serializable { |
| 20 | + private static final long serialVersionUID = 8136329462880646091L; |
| 21 | + |
| 22 | + /** |
| 23 | + * 审批编号 |
| 24 | + */ |
| 25 | + @XStreamAlias("SpNo") |
| 26 | + private String spNo; |
| 27 | + |
| 28 | + /** |
| 29 | + * 审批申请类型名称(审批模板名称) |
| 30 | + */ |
| 31 | + @XStreamAlias("SpName") |
| 32 | + @XStreamConverter(value = XStreamCDataConverter.class) |
| 33 | + private String spName; |
| 34 | + |
| 35 | + /** |
| 36 | + * 申请单状态:1-审批中;2-已通过;3-已驳回;4-已撤销;6-通过后撤销;7-已删除;10-已支付 |
| 37 | + */ |
| 38 | + @XStreamAlias("SpStatus") |
| 39 | + private Integer spStatus; |
| 40 | + |
| 41 | + /** |
| 42 | + * 审批模板id。 |
| 43 | + */ |
| 44 | + @XStreamAlias("TemplateId") |
| 45 | + @XStreamConverter(value = XStreamCDataConverter.class) |
| 46 | + private String templateId; |
| 47 | + /** |
| 48 | + * 审批申请提交时间,Unix时间戳 |
| 49 | + */ |
| 50 | + @XStreamAlias("ApplyTime") |
| 51 | + private Long applyTime; |
| 52 | + |
| 53 | + /** |
| 54 | + * 申请人信息 |
| 55 | + */ |
| 56 | + @XStreamAlias("Applyer") |
| 57 | + private Applier applier; |
| 58 | + |
| 59 | + /** |
| 60 | + * 审批流程信息,可能有多个审批节点。 |
| 61 | + */ |
| 62 | + @XStreamImplicit(itemFieldName = "SpRecord") |
| 63 | + private List<SpRecord> spRecords; |
| 64 | + |
| 65 | + /** |
| 66 | + * 抄送信息,可能有多个抄送节点 |
| 67 | + * 这回查字典,notifier通知人,Notifyer这不知道是什么 |
| 68 | + */ |
| 69 | + @XStreamImplicit(itemFieldName = "Notifyer") |
| 70 | + private List<Notifier> notifier; |
| 71 | + |
| 72 | + /** |
| 73 | + * 审批申请备注信息,可能有多个备注节点 |
| 74 | + */ |
| 75 | + @XStreamImplicit(itemFieldName = "Comments") |
| 76 | + private List<Comment> comments; |
| 77 | + |
| 78 | + /** |
| 79 | + * 审批申请单变化类型 |
| 80 | + */ |
| 81 | + @XStreamAlias("StatuChangeEvent") |
| 82 | + private Integer statusChangeEvent; |
| 83 | + |
| 84 | + /** |
| 85 | + * 申请人信息 |
| 86 | + */ |
| 87 | + @XStreamAlias("Applyer") |
| 88 | + @Data |
| 89 | + public static class Applier implements Serializable { |
| 90 | + private static final long serialVersionUID = -979255011922209018L; |
| 91 | + |
| 92 | + /** |
| 93 | + * 申请人userid |
| 94 | + */ |
| 95 | + @XStreamAlias("UserId") |
| 96 | + private String userId; |
| 97 | + |
| 98 | + /** |
| 99 | + * 申请人所在部门pid |
| 100 | + */ |
| 101 | + @XStreamAlias("Party") |
| 102 | + private String party; |
| 103 | + } |
| 104 | + |
| 105 | + /** |
| 106 | + * 审批流程信息 |
| 107 | + */ |
| 108 | + @XStreamAlias("SpRecord") |
| 109 | + @Data |
| 110 | + public static class SpRecord implements Serializable { |
| 111 | + private static final long serialVersionUID = 1247535623941881764L; |
| 112 | + |
| 113 | + /** |
| 114 | + * 审批节点状态:1-审批中;2-已同意;3-已驳回;4-已转审 |
| 115 | + */ |
| 116 | + @XStreamAlias("SpStatus") |
| 117 | + private String spStatus; |
| 118 | + |
| 119 | + /** |
| 120 | + * 节点审批方式:1-或签;2-会签 |
| 121 | + */ |
| 122 | + @XStreamAlias("ApproverAttr") |
| 123 | + private String approverAttr; |
| 124 | + |
| 125 | + /** |
| 126 | + * 审批节点详情。当节点为标签或上级时,一个节点可能有多个分支 |
| 127 | + */ |
| 128 | + @XStreamImplicit(itemFieldName = "Details") |
| 129 | + private List<Detail> details; |
| 130 | + |
| 131 | + } |
| 132 | + |
| 133 | + /** |
| 134 | + * 审批节点详情 |
| 135 | + */ |
| 136 | + @XStreamAlias("Details") |
| 137 | + @Data |
| 138 | + public static class Detail implements Serializable { |
| 139 | + private static final long serialVersionUID = -8446107461495047603L; |
| 140 | + |
| 141 | + /** |
| 142 | + * 分支审批人 |
| 143 | + */ |
| 144 | + @XStreamAlias("Approver") |
| 145 | + private Approver approver; |
| 146 | + |
| 147 | + /** |
| 148 | + * 审批意见字段 |
| 149 | + */ |
| 150 | + @XStreamAlias("Speech") |
| 151 | + private String speech; |
| 152 | + |
| 153 | + /** |
| 154 | + * 分支审批人审批状态:1-审批中;2-已同意;3-已驳回;4-已转审 |
| 155 | + */ |
| 156 | + @XStreamAlias("SpStatus") |
| 157 | + private String spStatus; |
| 158 | + |
| 159 | + /** |
| 160 | + * 节点分支审批人审批操作时间,0为尚未操作 |
| 161 | + */ |
| 162 | + @XStreamAlias("SpTime") |
| 163 | + private Long spTime; |
| 164 | + |
| 165 | + /** |
| 166 | + * 节点分支审批人审批意见附件,赋值为media_id具体使用请参考:文档-获取临时素材 |
| 167 | + */ |
| 168 | + @XStreamImplicit(itemFieldName = "Attach") |
| 169 | + private List<String> attach; |
| 170 | + } |
| 171 | + |
| 172 | + /** |
| 173 | + * 分支审批人 |
| 174 | + */ |
| 175 | + @Data |
| 176 | + @XStreamAlias("Approver") |
| 177 | + public static class Approver implements Serializable { |
| 178 | + private static final long serialVersionUID = 7360442444186683191L; |
| 179 | + |
| 180 | + /** |
| 181 | + * 分支审批人userid |
| 182 | + */ |
| 183 | + @XStreamAlias("UserId") |
| 184 | + private String userId; |
| 185 | + } |
| 186 | + |
| 187 | + /** |
| 188 | + * 抄送信息 |
| 189 | + */ |
| 190 | + @Data |
| 191 | + @XStreamAlias("Notifyer") |
| 192 | + public static class Notifier implements Serializable { |
| 193 | + private static final long serialVersionUID = -4524071522890013920L; |
| 194 | + |
| 195 | + /** |
| 196 | + * 节点抄送人userid |
| 197 | + */ |
| 198 | + @XStreamAlias("UserId") |
| 199 | + private String userId; |
| 200 | + } |
| 201 | + |
| 202 | + /** |
| 203 | + * 审批申请备注信息 |
| 204 | + */ |
| 205 | + @Data |
| 206 | + @XStreamAlias("Comments") |
| 207 | + public static class Comment implements Serializable { |
| 208 | + private static final long serialVersionUID = 6912156206252719485L; |
| 209 | + |
| 210 | + /** |
| 211 | + * 备注人信息 |
| 212 | + */ |
| 213 | + @XStreamAlias("CommentUserInfo") |
| 214 | + private CommentUserInfo commentUserInfo; |
| 215 | + |
| 216 | + /** |
| 217 | + * 备注提交时间 |
| 218 | + */ |
| 219 | + @XStreamAlias("CommentTime") |
| 220 | + private String commentTime; |
| 221 | + |
| 222 | + /** |
| 223 | + * 备注文本内容 |
| 224 | + */ |
| 225 | + @XStreamAlias("CommentContent") |
| 226 | + private String commentContent; |
| 227 | + |
| 228 | + /** |
| 229 | + * 备注id |
| 230 | + */ |
| 231 | + @XStreamAlias("CommentId") |
| 232 | + private String commentId; |
| 233 | + |
| 234 | + /** |
| 235 | + * 备注意见附件,值是附件media_id |
| 236 | + */ |
| 237 | + @XStreamImplicit(itemFieldName="Attach") |
| 238 | + private List<String> attach; |
| 239 | + } |
| 240 | + |
| 241 | + @Data |
| 242 | + @XStreamAlias("CommentUserInfo") |
| 243 | + private static class CommentUserInfo implements Serializable { |
| 244 | + private static final long serialVersionUID = 5031739716823000947L; |
| 245 | + |
| 246 | + /** |
| 247 | + * 备注人userid |
| 248 | + */ |
| 249 | + @XStreamAlias("UserId") |
| 250 | + private String userId; |
| 251 | + } |
| 252 | +} |
0 commit comments