-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b8c66a
commit f6f4b89
Showing
13 changed files
with
352 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/SummaryInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package me.chanjar.weixin.cp.bean.oa; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import lombok.Data; | ||
import lombok.experimental.Accessors; | ||
import me.chanjar.weixin.cp.bean.oa.WxCpOaApplyEventRequest; | ||
|
||
import java.io.Serializable; | ||
import java.util.List; | ||
|
||
/** | ||
* 摘要行信息,用于定义某一行摘要显示的内容. | ||
* | ||
* @author <a href="https://github.com/binarywang">Binary Wang</a> | ||
* @date 2020-07-19 | ||
*/ | ||
@Data | ||
@Accessors(chain = true) | ||
public class SummaryInfo implements Serializable { | ||
private static final long serialVersionUID = 8262265774851382414L; | ||
/** | ||
* 摘要行信息,用于定义某一行摘要显示的内容 | ||
*/ | ||
@SerializedName("summary_info") | ||
private List<SummaryInfoData> summaryInfoData; | ||
|
||
@Data | ||
@Accessors(chain = true) | ||
public static class SummaryInfoData implements Serializable { | ||
private static final long serialVersionUID = 5314161929610113856L; | ||
/** | ||
* 摘要行显示文字,用于记录列表和消息通知的显示,不要超过20个字符 | ||
*/ | ||
private String text; | ||
|
||
/** | ||
* 摘要行显示语言 | ||
*/ | ||
private String lang; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 105 additions & 0 deletions
105
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpOaApplyEventRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
package me.chanjar.weixin.cp.bean.oa; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import lombok.Data; | ||
import lombok.experimental.Accessors; | ||
import me.chanjar.weixin.cp.bean.oa.applydata.ApplyDataContent; | ||
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder; | ||
|
||
import java.io.Serializable; | ||
import java.util.List; | ||
|
||
/** | ||
* 提交审批申请 请求对象类. | ||
* | ||
* @author <a href="https://github.com/binarywang">Binary Wang</a> | ||
* @date 2020-07-18 | ||
*/ | ||
@Data | ||
@Accessors(chain = true) | ||
public class WxCpOaApplyEventRequest implements Serializable { | ||
private static final long serialVersionUID = 3362660678938569341L; | ||
|
||
/** | ||
* 申请人userid,此审批申请将以此员工身份提交,申请人需在应用可见范围内 | ||
*/ | ||
@SerializedName("creator_userid") | ||
private String creatorUserId; | ||
|
||
/** | ||
* 模板id。可在“获取审批申请详情”、“审批状态变化回调通知”中获得,也可在审批模板的模板编辑页面链接中获得。暂不支持通过接口提交[打卡补卡][调班]模板审批单。 | ||
*/ | ||
@SerializedName("template_id") | ||
private String templateId; | ||
|
||
/** | ||
* 审批人模式:0-通过接口指定审批人、抄送人(此时approver、notifyer等参数可用); 1-使用此模板在管理后台设置的审批流程,支持条件审批。默认为0 | ||
*/ | ||
@SerializedName("use_template_approver") | ||
private Integer useTemplateApprover; | ||
|
||
/** | ||
* 审批流程信息,用于指定审批申请的审批流程,支持单人审批、多人会签、多人或签,可能有多个审批节点,仅use_template_approver为0时生效。 | ||
*/ | ||
@SerializedName("approver") | ||
private List<Approver> approvers; | ||
|
||
/** | ||
* 抄送人节点userid列表,仅use_template_approver为0时生效。 | ||
*/ | ||
@SerializedName("notifyer") | ||
private String[] notifiers; | ||
|
||
/** | ||
* 抄送方式:1-提单时抄送(默认值); 2-单据通过后抄送;3-提单和单据通过后抄送。仅use_template_approver为0时生效。 | ||
*/ | ||
@SerializedName("notify_type") | ||
private Integer notifyType; | ||
|
||
/** | ||
* 审批申请数据,可定义审批申请中各个控件的值,其中必填项必须有值,选填项可为空,数据结构同“获取审批申请详情”接口返回值中同名参数“apply_data” | ||
*/ | ||
@SerializedName("apply_data") | ||
private ApplyData applyData; | ||
|
||
/** | ||
* 摘要信息,用于显示在审批通知卡片、审批列表的摘要信息,最多3行 | ||
*/ | ||
@SerializedName("summary_list") | ||
private List<SummaryInfo> summaryList; | ||
|
||
public String toJson() { | ||
return WxCpGsonBuilder.create().toJson(this); | ||
} | ||
|
||
@Data | ||
@Accessors(chain = true) | ||
public static class Approver implements Serializable { | ||
private static final long serialVersionUID = 7625206971546930988L; | ||
|
||
/** | ||
* 节点审批方式:1-或签;2-会签,仅在节点为多人审批时有效 | ||
*/ | ||
private Integer attr; | ||
|
||
/** | ||
* 审批节点审批人userid列表,若为多人会签、多人或签,需填写每个人的userid | ||
*/ | ||
@SerializedName("userid") | ||
private String[] userIds; | ||
} | ||
|
||
@Data | ||
@Accessors(chain = true) | ||
public static class ApplyData implements Serializable { | ||
private static final long serialVersionUID = -2462732405265306981L; | ||
|
||
/** | ||
* 审批申请数据,可定义审批申请中各个控件的值,其中必填项必须有值,选填项可为空, | ||
* 数据结构同“获取审批申请详情”接口返回值中同名参数“apply_data” | ||
*/ | ||
@SerializedName("contents") | ||
private List<ApplyDataContent> contents; | ||
} | ||
|
||
} |
35 changes: 35 additions & 0 deletions
35
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/applydata/ApplyDataContent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package me.chanjar.weixin.cp.bean.oa.applydata; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import lombok.Data; | ||
import lombok.experimental.Accessors; | ||
|
||
import java.io.Serializable; | ||
import java.util.List; | ||
|
||
/** | ||
* @author element | ||
*/ | ||
@Data | ||
@Accessors(chain = true) | ||
public class ApplyDataContent implements Serializable { | ||
private static final long serialVersionUID = 8456821731930526935L; | ||
/** | ||
* 控件类型:Text-文本;Textarea-多行文本;Number-数字;Money-金额;Date-日期/日期+时间; | ||
* Selector-单选/多选;;Contact-成员/部门;Tips-说明文字;File-附件;Table-明细; | ||
*/ | ||
private String control; | ||
|
||
/** | ||
* 控件id:控件的唯一id,可通过“获取审批模板详情”接口获取 | ||
*/ | ||
private String id; | ||
|
||
@SerializedName("title") | ||
private List<ContentTitle> titles; | ||
|
||
/** | ||
* 控件值 ,需在此为申请人在各个控件中填写内容不同控件有不同的赋值参数,具体说明详见附录。模板配置的控件属性为必填时,对应value值需要有值。 | ||
*/ | ||
private ContentValue value; | ||
} |
Oops, something went wrong.