|
@@ -977,16 +977,27 @@ public class MedicalViewApiController {
|
|
|
}
|
|
|
List<ZdEmpTitle> zdEmpTitles = zdEmpTitleService.queryZdEmpTitle();
|
|
|
Map<String, String> titleMap = null;
|
|
|
+ Map<String, Integer> titGradeMap = null;
|
|
|
Map<String, String> zdUnitCodeMap = list.stream().collect(Collectors.toMap(ZdUnitCode::getCode, ZdUnitCode::getName));
|
|
|
if (zdEmpTitles != null && zdEmpTitles.size() > 0) {
|
|
|
titleMap = zdEmpTitles.stream().collect(Collectors.toMap(ZdEmpTitle::getCode, ZdEmpTitle::getName));
|
|
|
+ titGradeMap = zdEmpTitles.stream().collect(Collectors.toMap(ZdEmpTitle::getCode, ZdEmpTitle::getTitGrade));
|
|
|
}
|
|
|
+ List<Employee> notDoctors = new ArrayList<>();
|
|
|
for (Employee employee : employees) {
|
|
|
+ if(titGradeMap!=null){
|
|
|
+ Integer titGrade = titGradeMap.get(employee.getEmpTitCode());
|
|
|
+ if(!Constants.DOCTOR_TIT_GRADE.equals(titGrade)){
|
|
|
+ notDoctors.add(employee);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
if (titleMap != null) {
|
|
|
employee.setDoctorTitle(titleMap.get(employee.getEmpTitCode()));
|
|
|
}
|
|
|
employee.setDeptName(zdUnitCodeMap.get(employee.getDeptCode()));
|
|
|
}
|
|
|
+ employees.removeAll(notDoctors);
|
|
|
results.put("resultCode", 0);
|
|
|
results.put("resultMessage", "查询所有门诊医生信息成功");
|
|
|
results.put("data", employees);
|