| | |
| | | */ |
| | | public Boolean workInfoOANotice(Long agentId,String userIds,OapiMessageCorpconversationAsyncsendV2Request.Msg msg){ |
| | | try{ |
| | | if(CollectionUtils.isEmpty(msg)){ |
| | | return null; |
| | | } |
| | | DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/message/corpconversation/asyncsend_v2"); |
| | | OapiMessageCorpconversationAsyncsendV2Request request = new OapiMessageCorpconversationAsyncsendV2Request(); |
| | | request.setAgentId(agentId); |
| | |
| | | request.setToAllUser(false); |
| | | |
| | | request.setMsg(msg); |
| | | OapiMessageCorpconversationAsyncsendV2Response rsp = client.execute(request, "60c2df248ca93d4eafb4a04a2330d3d3");//getToken()); |
| | | OapiMessageCorpconversationAsyncsendV2Response rsp = client.execute(request, getToken()); |
| | | if(rsp.getErrcode().equals(Constants.DD_ERR_CODE)){ |
| | | return true; |
| | | }else{ |
| | |
| | | */ |
| | | public String toDoNotice(String title,List<String> unionIdList,List<CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList> fieldList,String url) { |
| | | try{ |
| | | if(CollectionUtils.isEmpty(fieldList)){ |
| | | return null; |
| | | } |
| | | com.aliyun.dingtalktodo_1_0.Client client = DingTalk.createV1Client(); |
| | | CreateTodoTaskHeaders createTodoTaskHeaders = new CreateTodoTaskHeaders(); |
| | | createTodoTaskHeaders.xAcsDingtalkAccessToken = getToken(); |
| | |
| | | .setTitle("去处理") |
| | | .setActionType(2) |
| | | .setParam(actionList0Param) |
| | | .setUrl("https://www.baidu.com") //TODO 详情地址 |
| | | .setUrl(url) //TODO 详情地址 |
| | | .setActionKey("ak-1-1"); |
| | | //详情页url跳转地址 |
| | | CreateTodoTaskRequest.CreateTodoTaskRequestDetailUrl detailUrl = new CreateTodoTaskRequest.CreateTodoTaskRequestDetailUrl() |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 访客报备与访客申请 钉钉待办 |
| | | * @param visits |
| | | * @return |
| | | */ |
| | | public List<CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList> getToDoVisitFiledInfo(Visits visits){ |
| | | List<CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList> list = new ArrayList<>(); |
| | | CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList contentFieldList0 = new CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList() |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 用车申请的 钉钉待办 |
| | | * @param carUseBook |
| | | * @return |
| | | */ |
| | | public List<CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList> getToDoCarUseBookFiledInfo(CarUseBook carUseBook){ |
| | | List<CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList> list = new ArrayList<>(); |
| | | CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList contentFieldList1 = new CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList() |