| | |
| | | |
| | | @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); |
| | | // }); |
| | | |
| | | } |
| | | |