配合借阅修改

master
xm 4 years ago
parent 50227e09ee
commit fa6e962687

@ -586,23 +586,25 @@ public class FontController {
@ResponseBody
public String getDoctorNameAndDoctorRoom(String userId) {
String name = power_userMapper.selectForDoctorName(userId);
if (null == name || name.isEmpty()) {
if (StringUtils.isNotBlank(name)) {
name = "未设置名字账号";
}
// 获取的是deptId数组
String deptIDResult = powerDeptMapper.selectAllDeptId(userId);
// 拆分成单一的deptId
String[] deptIdAll = deptIDResult.split(",");
String room = "";
if (deptIdAll.length != 0) {
// 拆分成单一的deptId
if (deptIDResult.contains(",")) {
String[] deptIdAll = deptIDResult.split(",");
for (int i = 0; i < deptIdAll.length; i++) {
String deptIdOne = power_userMapper.selectForDoctorRoom(deptIdAll[i]);
if (null != deptIdOne && !deptIdOne.isEmpty()) {
if (StringUtils.isNotBlank(deptIdOne)) {
room += deptIdOne + "&";
} else {
room = "未分配科室账号";
}
}
} else {
room = "账号无对应的科室,请联系管理员核实账号信息!";
}
String result = room + "," + name;
return result;

Loading…
Cancel
Save