Bonrui编程路 2020-03-04
钉钉上只有JAVA的demo,虽然也提供了.net的SDK,但是那资料又臭又长,看的头都大了,
这是c#的服务端发起审批的demo,亲测有效
IDingTalkClient client = new DefaultDingTalkClient("https://eco.taobao.com/router/rest"); SmartworkBpmsProcessinstanceCreateRequest req = new SmartworkBpmsProcessinstanceCreateRequest(); req.AgentId = 41605932L; req.ProcessCode = "PROC-EF6YJL35P2-SCKICSB7P750S0YISYKV3-17IBLGZI-1"; req.OriginatorUserId = "manager432"; req.DeptId = 100L; req.Approvers = "zhangsan,lisi"; req.CcList = "zhangsan,lisi"; req.CcPosition = "START"; List<SmartworkBpmsProcessinstanceCreateRequest.FormComponentValueVoDomain> list2 = new List<SmartworkBpmsProcessinstanceCreateRequest.FormComponentValueVoDomain>(); SmartworkBpmsProcessinstanceCreateRequest.FormComponentValueVoDomain obj3 = new SmartworkBpmsProcessinstanceCreateRequest.FormComponentValueVoDomain(); list2.Add(obj3); obj3.Name = "请假类型"; obj3.Value = "事假"; obj3.ExtValue = "总天数:1"; req.FormComponentValues_ = list2; SmartworkBpmsProcessinstanceCreateResponse rsp = client.Execute(req, access_token); Console.WriteLine(rsp.Body);
c#获取钉钉审批信息demo
http://www.zixun119.com/article/459.cshtml