Ver código fonte

代码优化

hlf 1 ano atrás
pai
commit
66004e7392

+ 1 - 1
ims-service/ims-eval/src/main/java/com/ims/eval/controller/DepartmentAllocationController.java

@@ -148,7 +148,7 @@ public class DepartmentAllocationController {
 				}
 			}
 		}*/
-		JSONObject jsonArr = userService.pageList(1, 1000, id, "", "", "", "", "", request);
+		JSONObject jsonArr = userService.pageList(1, 500, id, "", "", "", "", "", request);
 		JSONObject jsonArr1 = (JSONObject) jsonArr.get("data");
 		JSONArray array = JSONUtil.parseArray(jsonArr1.get("records"));
 		List<UserDTO> list = JSONUtil.toList(array, UserDTO.class);

+ 4 - 5
ims-service/ims-eval/src/main/java/com/ims/eval/controller/DeptAssessmentDeclarationController.java

@@ -279,14 +279,13 @@ public class DeptAssessmentDeclarationController {
 					DeptAssessmentDeclarationContent deptAssessmentDeclarationContent = new DeptAssessmentDeclarationContent();
 					deptAssessmentDeclarationContent.setAssessmentDeclarationId(id);
 					deptAssessmentDeclarationContent.setEmployeeNo(str[0]);
-					JSONObject jsonArr = userService.pageList(1, 1000, "", "", "", str[0], "", "", request);
+					JSONObject jsonArr = userService.pageList(1, 500, "", "", "", str[0], "", "", request);
 					JSONObject jsonArr1 = (JSONObject) jsonArr.get("data");
 					JSONArray array = JSONUtil.parseArray(jsonArr1.get("records"));
 					List<UserDTO> userList = JSONUtil.toList(array, UserDTO.class);
-					UserDTO user = userList.stream().filter(item -> item.getNo().equals(str[0])).findFirst().orElse(null);
-					if (ObjectUtil.isNotNull(user)) {
-						deptAssessmentDeclarationContent.setEmployeeId(user.getId());
-						deptAssessmentDeclarationContent.setEmployeeName(user.getName());
+					if (userList.size() > 0) {
+						deptAssessmentDeclarationContent.setEmployeeId(userList.get(0).getId());
+						deptAssessmentDeclarationContent.setEmployeeName(userList.get(0).getName());
 					}
 					deptAssessmentDeclarationContent.setSuggestedValue(str[2]);
 					deptAssessmentDeclarationContent.setSerialNumber(Convert.toInt(str[3]));

+ 3 - 3
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/DeptAssessmentDeclarationServiceImpl.java

@@ -85,13 +85,13 @@ public class DeptAssessmentDeclarationServiceImpl extends ServiceImpl<DeptAssess
 				}
 				List<EvaluationDept> evaluationDeptList = evaluationDeptService.list(secondaryDeptQw);
 				for (EvaluationDept obj : evaluationDeptList) {
-					JSONObject jsonArr = userService.pageList(1, 1000, obj.getDeptId(), "", "", "", "", "", request);
+					JSONObject jsonArr = userService.pageList(1, 500, obj.getDeptId(), "", "", "", "", "", request);
 					JSONObject jsonArr1 = (JSONObject) jsonArr.get("data");
 					JSONArray array = JSONUtil.parseArray(jsonArr1.get("records"));
 					List<UserDTO> userList = JSONUtil.toList(array, UserDTO.class);
 					secondaryList.addAll(userList);
 				}
-				JSONObject jsonArr = userService.pageList(1, 1000, deptAssessmentDeclaration.getDeptId(), "", "", "", "", "", request);
+				JSONObject jsonArr = userService.pageList(1, 500, deptAssessmentDeclaration.getDeptId(), "", "", "", "", "", request);
 				JSONObject jsonArr1 = (JSONObject) jsonArr.get("data");
 				JSONArray array = JSONUtil.parseArray(jsonArr1.get("records"));
 				List<UserDTO> userList = JSONUtil.toList(array, UserDTO.class);
@@ -109,7 +109,7 @@ public class DeptAssessmentDeclarationServiceImpl extends ServiceImpl<DeptAssess
 					}
 				}
 			} else {//子级部门
-				JSONObject jsonArr = userService.pageList(1, 1000, deptAssessmentDeclaration.getDeptId(), "", "", "", "", "", request);
+				JSONObject jsonArr = userService.pageList(1, 500, deptAssessmentDeclaration.getDeptId(), "", "", "", "", "", request);
 				JSONObject jsonArr1 = (JSONObject) jsonArr.get("data");
 				JSONArray array = JSONUtil.parseArray(jsonArr1.get("records"));
 				List<UserDTO> userList = JSONUtil.toList(array, UserDTO.class);