|
|
|
@ -639,14 +639,30 @@ public class FontController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 通过申请医生id,获取医生名字,
|
|
|
|
|
* 通过病案deptcode,获取医生对应的科室
|
|
|
|
|
* 通过申请医生id,获取医生名字
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value = "/getDoctorNameAndDoctorRoom", produces = "text/plain;charset=UTF-8")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public String getDoctorNameAndDoctorRoom(String userId, String deptcode) {
|
|
|
|
|
public String getDoctorNameAndDoctorRoom(String userId) {
|
|
|
|
|
String name = power_userMapper.selectForDoctorName(userId);
|
|
|
|
|
String room = power_userMapper.selectForDoctorRoom(deptcode);
|
|
|
|
|
if (null == name || name.isEmpty()) {
|
|
|
|
|
name = "未设置名字账号";
|
|
|
|
|
}
|
|
|
|
|
// 获取的是deptId数组
|
|
|
|
|
String deptIDResult = powerDeptMapper.selectAllDeptId(userId);
|
|
|
|
|
// 拆分成单一的deptId
|
|
|
|
|
String[] deptIdAll = deptIDResult.split(",");
|
|
|
|
|
String room = "";
|
|
|
|
|
if (deptIdAll.length != 0) {
|
|
|
|
|
for (int i = 0; i < deptIdAll.length; i++) {
|
|
|
|
|
String deptIdOne = power_userMapper.selectForDoctorRoom(deptIdAll[i]);
|
|
|
|
|
if (null != deptIdOne && !deptIdOne.isEmpty()) {
|
|
|
|
|
room += deptIdOne + "&";
|
|
|
|
|
} else {
|
|
|
|
|
room = "未分配科室账号";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
String result = room + "," + name;
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|