人员绑定优化

S
This commit is contained in:
weiyunlong 2024-12-20 15:31:23 +08:00
parent 3366517e7a
commit 32aecd66e3
2 changed files with 21 additions and 15 deletions

View File

@ -78,8 +78,11 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler {
} catch (UnsupportedEncodingException e) { } catch (UnsupportedEncodingException e) {
e.printStackTrace(); e.printStackTrace();
} }
url = "http://172.31.254.240:9090/seeyon/isc.do?method=ssoISC&toUrl=" + url; //https://newoa.dobechina.com
h5url = "http://172.31.254.240:9090/seeyon/isc.do?method=ssoISC&toUrl=" + h5url; // 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 Long startUserId = messageContext.getStartUserId(); // 审批实例发起人id
@ -103,8 +106,8 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler {
String oaToken = OAUtils.getOaToken(billNo); String oaToken = OAUtils.getOaToken(billNo);
if (StringUtils.isNotEmpty(oaToken)) { if (StringUtils.isNotEmpty(oaToken)) {
//todo OA人员绑定接口 // //todo OA人员绑定接口-->迁移到主数据人员同步时
thirdpartyUser(approversLists, oaToken, billNo); // thirdpartyUser(approversLists, oaToken, billNo);
HashMap<String, Object> thirdPartyMap = new HashMap<>(); HashMap<String, Object> thirdPartyMap = new HashMap<>();
thirdPartyMap.put("oaToken", oaToken); thirdPartyMap.put("oaToken", oaToken);
@ -117,7 +120,8 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler {
thirdPartyMap.put("url1", url1); thirdPartyMap.put("url1", url1);
thirdPartyMap.put("billNo", billNo); thirdPartyMap.put("billNo", billNo);
thirdPartyMap.put("startNumber", startNumber);//发起人 thirdPartyMap.put("startNumber", startNumber);//发起人
thirdPartyMap.put("h5url", h5url); // thirdPartyMap.put("h5url", h5url);
thirdPartyMap.put("h5url", url);
//推送OA待办新增接口 //推送OA待办新增接口
thirdParty(thirdPartyMap); thirdParty(thirdPartyMap);
@ -287,8 +291,11 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler {
} catch (UnsupportedEncodingException e) { } catch (UnsupportedEncodingException e) {
e.printStackTrace(); e.printStackTrace();
} }
url = "http://172.31.254.240:9090/seeyon/isc.do?method=ssoISC&toUrl=" + url; //https://newoa.dobechina.com
h5url = "http://172.31.254.240:9090/seeyon/isc.do?method=ssoISC&toUrl=" + h5url; // 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 //获取token
String oaToken = OAUtils.getOaToken(billNo); String oaToken = OAUtils.getOaToken(billNo);
@ -304,7 +311,8 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler {
thirdPartyMap.put("url1", url1); thirdPartyMap.put("url1", url1);
thirdPartyMap.put("billNo", billNo); thirdPartyMap.put("billNo", billNo);
thirdPartyMap.put("startNumber", startNumber);//发起人 thirdPartyMap.put("startNumber", startNumber);//发起人
thirdPartyMap.put("h5url", h5url); // thirdPartyMap.put("h5url", h5url);
thirdPartyMap.put("h5url", url);
//推送OA消息新增接口 //推送OA消息新增接口
thirdpartyMessage(thirdPartyMap); thirdpartyMessage(thirdPartyMap);

View File

@ -116,11 +116,9 @@ public class OAUtils {
/** /**
* OA接口绑定用户 * OA接口绑定用户
* 代办接口之前需要先(用户的绑定 你通过定时任务 增量推就行或者你们系统有人员进来推一次这个人绑定成功了 就不需要再绑定除非人员工号有变动) * 用户的绑定 金蝶通过定时任务 增量推就行或者金蝶系统有人员进来推一次这个人绑定成功了 就不需要再绑定除非人员工号有变动
* 先调OA接口绑定用户(相当于校验金蝶用户的number在OA系统是否存在不存则推送失败)
* @param approversLists 金蝶系统的审批人集合 * @param approversLists 金蝶系统的审批人集合
* @param oaToken 致远OA获取的token * @param oaToken 致远OA获取的token
* @return
*/ */
public static String thirdpartyUser(List<DynamicObject> approversLists, String oaToken,String billNo){ public static String thirdpartyUser(List<DynamicObject> approversLists, String oaToken,String billNo){
@ -139,13 +137,13 @@ public class OAUtils {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("registerCode", "3004");//系统注册编码:3004 jsonObject.put("registerCode", "3004");//系统注册编码:3004
jsonObject.put("thirdUserId",approver.getString("number"));//三方系统人员编码通过人员编码匹配需要和OA保持一致 jsonObject.put("thirdUserId",approver.getString("number"));//三方系统人员编码通过人员编码匹配需要和OA保持一致
// jsonObject.put("thirdUserId","jdtest");//todo 三方系统人员编码通过人员编码匹配需要和OA保持一致
jsonObject.put("thirdLoginName", approver.getString("name"));//三方系统人员登录名 jsonObject.put("thirdLoginName", approver.getString("name"));//三方系统人员登录名
// jsonObject.put("thirdLoginName", "金蝶测试");//todo 三方系统人员登录名
jsonObject.put("thirdName", approver.getString("name"));//三方系统人员姓名 jsonObject.put("thirdName", approver.getString("name"));//三方系统人员姓名
// jsonObject.put("thirdName", "金蝶测试");//todo 三方系统人员姓名
jsonObject.put("thirdCode", approver.getString("number"));//三方系统人员编码 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); thirdList.add(jsonObject);
} }
thirdBody.put("userlist", thirdList); thirdBody.put("userlist", thirdList);