1 public ActionResult Dingding(string sheetno, long dept, string plant, stringClass) {2 //需填写的主表数据
3 var bill = tApp.GetList().Where(t => t.F_SHEETNO ==sheetno).FirstOrDefault();4 //需填写的详表数据
5 var details =tDetailApp.GetList(bill.F_Id);6
7 string accessToken = dingApp.getAccessToken();//AccessToken码8
9 //获取钉钉用户id:发起人
10 string code = "zhangsan";11 var userEntry = userApp.GetList().Where(t => t.F_Account ==code).FirstOrDefault();12
13 DefaultDingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/processinstance/create");14 OapiProcessinstanceCreateRequest request = newOapiProcessinstanceCreateRequest();15
16 request.AgentId = 312711454;//创建的H5微应用的AgentId
17 request.ProcessCode = "PROC-13AFD98D-97F7-4793-8C5D-E612B750BBBC";//在设置审批模板的url中
18
19 List