|
@@ -1,10 +1,12 @@
|
|
|
package cn.hnthyy.thmz.controller;
|
|
|
|
|
|
import cn.hnthyy.thmz.comment.UserLoginToken;
|
|
|
+import cn.hnthyy.thmz.entity.his.Employee;
|
|
|
import cn.hnthyy.thmz.entity.his.ZdMzClass;
|
|
|
import cn.hnthyy.thmz.enums.ClassCodeEnum;
|
|
|
import cn.hnthyy.thmz.service.his.EmployeeService;
|
|
|
import cn.hnthyy.thmz.service.his.ZdMzClassService;
|
|
|
+import cn.hnthyy.thmz.service.his.ZdUnitCodeService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -20,6 +22,8 @@ import java.util.*;
|
|
|
public class EmployeeController {
|
|
|
@Autowired
|
|
|
private EmployeeService employeeService;
|
|
|
+ @Autowired
|
|
|
+ private ZdUnitCodeService zdUnitCodeService;
|
|
|
/**
|
|
|
* 根据科室列表查询医生列表
|
|
|
*
|
|
@@ -30,9 +34,13 @@ public class EmployeeController {
|
|
|
public Map<String, Object> listEmployeeByDepts(@RequestParam("depts") String depts) {
|
|
|
Map<String, Object> resultMap = new HashMap<>();
|
|
|
try {
|
|
|
+ List<Employee> employeeList=employeeService.queryEmployeeByDepts(depts);
|
|
|
+ employeeList.stream().forEach(e->{
|
|
|
+ e.setDeptName(zdUnitCodeService.queryDeptNameByIdInCache(e.getDeptCode()));
|
|
|
+ });
|
|
|
resultMap.put("code", 0);
|
|
|
resultMap.put("message", "根据科室列表查询医生列表成功");
|
|
|
- resultMap.put("data", employeeService.queryEmployeeByDepts(depts));
|
|
|
+ resultMap.put("data", employeeList);
|
|
|
return resultMap;
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|