From 63b0d7db0fa2d8292c2bd07862c572c1fab21ada Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期二, 25 二月 2025 10:52:03 +0800
Subject: [PATCH] 钉钉获取人员的接口

---
 src/main/java/com/gs/xky/service/Impl/MesStaffServiceImpl.java |    6 ++++--
 src/test/java/com/gs/xky/XkyApplicationTests.java              |   28 ++++++++++++++--------------
 2 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/src/main/java/com/gs/xky/service/Impl/MesStaffServiceImpl.java b/src/main/java/com/gs/xky/service/Impl/MesStaffServiceImpl.java
index 8ca75ae..c1672bb 100644
--- a/src/main/java/com/gs/xky/service/Impl/MesStaffServiceImpl.java
+++ b/src/main/java/com/gs/xky/service/Impl/MesStaffServiceImpl.java
@@ -107,7 +107,9 @@
         SysUser sysUser = new SysUser();
 
         LambdaQueryWrapper<SysUser> wrapper = new LambdaQueryWrapper<>();
-        wrapper.eq(SysUser::getFcode, staff.getEmployeeId()).eq(SysUser::getFname, staff.getTrueName());
+        wrapper.eq(SysUser::getFcode, staff.getEmployeeId())
+//                .eq(SysUser::getFname, staff.getTrueName())
+        ;
 
         SysUser one = sysUserService.getOne(wrapper, false);
         if (one == null) {
@@ -124,7 +126,7 @@
         // 鏄犲皠鍛樺伐濮撳悕
         sysUser.setFname(staff.getTrueName());
 
-        // 璁剧疆鍒濆瀵嗙爜
+        // 璁剧疆鍒濆瀵嗙爜 123456
         sysUser.setFpassword("8+()./,");
 
         // 璁剧疆鏉冮檺绾у埆
diff --git a/src/test/java/com/gs/xky/XkyApplicationTests.java b/src/test/java/com/gs/xky/XkyApplicationTests.java
index c69cba4..f09e1ea 100644
--- a/src/test/java/com/gs/xky/XkyApplicationTests.java
+++ b/src/test/java/com/gs/xky/XkyApplicationTests.java
@@ -54,20 +54,20 @@
 
     @Test
     void cs1() throws IOException {
-        DingTalkParam dingTalkParam = new DingTalkParam();
-
-        DingTalkResponse<EmployeeInfo> employeeInfoDingTalkResponse = apiService.sendListRequest(dingTalkParam, EmployeeInfo.class, "http://192.168.1.64/eHR/eHRExternalService/Service.ashx");
-
-        //閫犳ⅵ鑰咃紙娴欐睙锛夌鎶�鏈夐檺鍏徃 cUnitName
-        //http://192.168.1.64/eHR
-        List<EmployeeInfo> collect = employeeInfoDingTalkResponse.getData().stream().filter(s -> "閫犳ⅵ鑰咃紙娴欐睙锛夌鎶�鏈夐檺鍏徃".equals(s.getCUnitName())).collect(Collectors.toList());
-        System.out.println(collect.size());
-
-        List<List<EmployeeInfo>> partition = ListUtil.partition(collect, 500);
-
-        partition.forEach(list -> {
-            staffService.SaveStaff(list);
-        });
+//        DingTalkParam dingTalkParam = new DingTalkParam(0);
+//
+//        DingTalkResponse<EmployeeInfo> employeeInfoDingTalkResponse = apiService.sendListRequest(dingTalkParam, EmployeeInfo.class, "http://192.168.1.64/eHR/eHRExternalService/Service.ashx");
+//
+//        //閫犳ⅵ鑰咃紙娴欐睙锛夌鎶�鏈夐檺鍏徃 cUnitName
+//        //http://192.168.1.64/eHR
+//        List<EmployeeInfo> collect = employeeInfoDingTalkResponse.getData().stream().filter(s -> "閫犳ⅵ鑰咃紙娴欐睙锛夌鎶�鏈夐檺鍏徃".equals(s.getCUnitName())).collect(Collectors.toList());
+//        System.out.println(collect.size());
+//
+//        List<List<EmployeeInfo>> partition = ListUtil.partition(collect, 500);
+//
+//        partition.forEach(list -> {
+//            staffService.SaveStaff(list);
+//        });
 
     }
 

--
Gitblit v1.9.3