|
@@ -104,11 +104,31 @@ public class RecordsServiceImpl implements RecordsService {
|
|
|
List<StaffRecordSDO> dtoList = page.getRecords();
|
|
|
if (CollectionUtil.isNotEmpty(dtoList)) {
|
|
|
List<String> users = dtoList.stream().map(StaffRecordSDO::getUserId).filter(Objects::nonNull).collect(Collectors.toList());
|
|
|
- CommonResult<List<AdminUserRespDTO>> result = userApi.getUsers(users);
|
|
|
- if (result.getCode() != 0) {
|
|
|
- throw new RuntimeException(result.getMsg());
|
|
|
+
|
|
|
+ //在获取用户请求时数据会有长度限制 所以在这里分批次的请求 100条查一次
|
|
|
+ List<AdminUserRespDTO> userList = new ArrayList<>();
|
|
|
+ List<String> us = new ArrayList<>();
|
|
|
+ users.forEach(user -> {
|
|
|
+ us.add(user);
|
|
|
+ if (us.size() == 100) {
|
|
|
+ CommonResult<List<AdminUserRespDTO>> result = userApi.getUsers(us);
|
|
|
+ if (result.getCode() != 0) {
|
|
|
+ throw new RuntimeException(result.getMsg());
|
|
|
+ }
|
|
|
+ userList.addAll(result.getData());
|
|
|
+ us.clear();
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ if(CollectionUtil.isNotEmpty(us)){
|
|
|
+ CommonResult<List<AdminUserRespDTO>> result = userApi.getUsers(us);
|
|
|
+ if (result.getCode() != 0) {
|
|
|
+ throw new RuntimeException(result.getMsg());
|
|
|
+ }
|
|
|
+ userList.addAll(result.getData());
|
|
|
}
|
|
|
- List<AdminUserRespDTO> userList = result.getData();
|
|
|
+
|
|
|
+
|
|
|
Map<String, AdminUserRespDTO> map = new HashMap<>();
|
|
|
userList.forEach(v -> map.put(v.getId(), v));
|
|
|
page.getRecords().forEach(v -> {
|
|
@@ -203,11 +223,6 @@ public class RecordsServiceImpl implements RecordsService {
|
|
|
vo.setPerformanceList(performList);
|
|
|
}
|
|
|
|
|
|
- if (vo.getYsrzsj() != null) {
|
|
|
- vo.setRgssj(vo.getYsrzsj());
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
return vo;
|
|
|
}
|
|
|
|