From 32aecd66e39db86073f7c9f777dba1629115aa85 Mon Sep 17 00:00:00 2001 From: weiyunlong Date: Fri, 20 Dec 2024 15:31:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=91=98=E7=BB=91=E5=AE=9A=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit S --- .../todotask/todoZyTaskServiceHandler.java | 24 ++++++++++++------- main/java/shkd/utils/OAUtils.java | 12 ++++------ 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/main/java/shkd/todotask/todoZyTaskServiceHandler.java b/main/java/shkd/todotask/todoZyTaskServiceHandler.java index 0147e60..4f78017 100644 --- a/main/java/shkd/todotask/todoZyTaskServiceHandler.java +++ b/main/java/shkd/todotask/todoZyTaskServiceHandler.java @@ -78,8 +78,11 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler { } catch (UnsupportedEncodingException e) { e.printStackTrace(); } - url = "http://172.31.254.240:9090/seeyon/isc.do?method=ssoISC&toUrl=" + url; - h5url = "http://172.31.254.240:9090/seeyon/isc.do?method=ssoISC&toUrl=" + h5url; + //https://newoa.dobechina.com +// url = "http://172.31.254.240:9090/seeyon/isc.do?method=ssoISC&toUrl=" + url; +// h5url = "http://172.31.254.240:9090/seeyon/isc.do?method=ssoISC&toUrl=" + h5url; + url = "https://newoa.dobechina.com/seeyon/isc.do?method=ssoISC&toUrl=" + url; + h5url = "https://newoa.dobechina.com/seeyon/isc.do?method=ssoISC&toUrl=" + h5url; //获取任务创建人 Long startUserId = messageContext.getStartUserId(); // 审批实例发起人id @@ -103,8 +106,8 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler { String oaToken = OAUtils.getOaToken(billNo); if (StringUtils.isNotEmpty(oaToken)) { - //todo OA人员绑定接口 - thirdpartyUser(approversLists, oaToken, billNo); +// //todo OA人员绑定接口-->迁移到主数据人员同步时 +// thirdpartyUser(approversLists, oaToken, billNo); HashMap thirdPartyMap = new HashMap<>(); thirdPartyMap.put("oaToken", oaToken); @@ -117,7 +120,8 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler { thirdPartyMap.put("url1", url1); thirdPartyMap.put("billNo", billNo); thirdPartyMap.put("startNumber", startNumber);//发起人 - thirdPartyMap.put("h5url", h5url); +// thirdPartyMap.put("h5url", h5url); + thirdPartyMap.put("h5url", url); //推送OA待办新增接口 thirdParty(thirdPartyMap); @@ -287,8 +291,11 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler { } catch (UnsupportedEncodingException e) { e.printStackTrace(); } - url = "http://172.31.254.240:9090/seeyon/isc.do?method=ssoISC&toUrl=" + url; - h5url = "http://172.31.254.240:9090/seeyon/isc.do?method=ssoISC&toUrl=" + h5url; + //https://newoa.dobechina.com +// url = "http://172.31.254.240:9090/seeyon/isc.do?method=ssoISC&toUrl=" + url; +// h5url = "http://172.31.254.240:9090/seeyon/isc.do?method=ssoISC&toUrl=" + h5url; + url = "https://newoa.dobechina.com/seeyon/isc.do?method=ssoISC&toUrl=" + url; + h5url = "https://newoa.dobechina.com/seeyon/isc.do?method=ssoISC&toUrl=" + h5url; //获取token String oaToken = OAUtils.getOaToken(billNo); @@ -304,7 +311,8 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler { thirdPartyMap.put("url1", url1); thirdPartyMap.put("billNo", billNo); thirdPartyMap.put("startNumber", startNumber);//发起人 - thirdPartyMap.put("h5url", h5url); +// thirdPartyMap.put("h5url", h5url); + thirdPartyMap.put("h5url", url); //推送OA消息新增接口 thirdpartyMessage(thirdPartyMap); diff --git a/main/java/shkd/utils/OAUtils.java b/main/java/shkd/utils/OAUtils.java index 81e59d2..558848b 100644 --- a/main/java/shkd/utils/OAUtils.java +++ b/main/java/shkd/utils/OAUtils.java @@ -116,11 +116,9 @@ public class OAUtils { /** * OA接口绑定用户 - * 代办接口之前需要先(用户的绑定 你通过定时任务 增量推就行,或者你们系统有人员进来推一次,这个人绑定成功了 就不需要再绑定,除非人员工号有变动) - * 先调OA接口绑定用户(相当于校验金蝶用户的number在OA系统是否存在,不存则推送失败) + * 用户的绑定 金蝶通过定时任务 增量推就行,或者金蝶系统有人员进来推一次,这个人绑定成功了 就不需要再绑定,除非人员工号有变动 * @param approversLists 金蝶系统的审批人集合 * @param oaToken 致远OA获取的token - * @return */ public static String thirdpartyUser(List approversLists, String oaToken,String billNo){ @@ -139,13 +137,13 @@ public class OAUtils { JSONObject jsonObject = new JSONObject(); jsonObject.put("registerCode", "3004");//系统注册编码:3004 jsonObject.put("thirdUserId",approver.getString("number"));//三方系统人员编码(通过人员编码匹配,需要和OA保持一致) -// jsonObject.put("thirdUserId","jdtest");//todo 三方系统人员编码(通过人员编码匹配,需要和OA保持一致) jsonObject.put("thirdLoginName", approver.getString("name"));//三方系统人员登录名 -// jsonObject.put("thirdLoginName", "金蝶测试");//todo 三方系统人员登录名 jsonObject.put("thirdName", approver.getString("name"));//三方系统人员姓名 -// jsonObject.put("thirdName", "金蝶测试");//todo 三方系统人员姓名 jsonObject.put("thirdCode", approver.getString("number"));//三方系统人员编码 -// jsonObject.put("thirdCode","jdtest");//todo 三方系统人员编码 +// jsonObject.put("thirdUserId","jdtest"); +// jsonObject.put("thirdLoginName", "金蝶测试"); +// jsonObject.put("thirdName", "金蝶测试"); +// jsonObject.put("thirdCode","jdtest"); thirdList.add(jsonObject); } thirdBody.put("userlist", thirdList);