From 45604cbd6dadead35d04d6e1a14018e9700d0242 Mon Sep 17 00:00:00 2001 From: yuxueliang0813 <407010292@qq.com> Date: Fri, 20 Dec 2024 16:10:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=91=98=E4=BF=AE=E6=94=B9=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E4=B8=AD=E5=88=9D=E5=A7=8B=E5=8C=96=E5=90=8C=E6=AD=A5?= =?UTF-8?q?OA=E7=BB=91=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bamp/base/task/DobeDWpersonUpdateTask.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/main/java/shkd/bamp/base/task/DobeDWpersonUpdateTask.java b/main/java/shkd/bamp/base/task/DobeDWpersonUpdateTask.java index 0af1bc8..93abd08 100644 --- a/main/java/shkd/bamp/base/task/DobeDWpersonUpdateTask.java +++ b/main/java/shkd/bamp/base/task/DobeDWpersonUpdateTask.java @@ -22,6 +22,7 @@ import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; import shkd.utils.DobeDWUtils; +import shkd.utils.OAUtils; import java.io.IOException; import java.util.ArrayList; @@ -106,6 +107,7 @@ public class DobeDWpersonUpdateTask extends AbstractTask implements Plugin { String bank_account = null; List updateList = new ArrayList<>(); + List userinfos = new ArrayList<>(); UserParam user = null; DynamicObject currentUser = null; DynamicObject deptOrg = null; @@ -141,6 +143,10 @@ public class DobeDWpersonUpdateTask extends AbstractTask implements Plugin { dataMap.put("email", email);//电子邮箱 user.setDataMap(dataMap); updateList.add(user); + //组装要与OA绑定的人员集合 + if(personoabid){ + userinfos.add(currentUser); + } //处理部门和职位 if(!DobeDWUtils.isEmpty(deptid)){ deptOrg = QueryServiceHelper.queryOne("bos_org","id,number,name",new QFilter[]{new QFilter("fyzjorgid","=",deptid)}); @@ -223,6 +229,15 @@ public class DobeDWpersonUpdateTask extends AbstractTask implements Plugin { } } } + //调用OA人员绑定 + if(userinfos.size() > 0){ + String billNo = "person-first-all-bid"; + //获取token + String oaToken = OAUtils.getOaToken(billNo); + if (!DobeDWUtils.isEmpty(oaToken)) { + OAUtils.thirdpartyUser(userinfos, oaToken, billNo); + } + } } private boolean isNeedUpdate(DynamicObject personbank,String name,String bank,String bank_branch,String bank_account){ if(!name.equals(personbank.getString("name"))){