|
|
@ -271,20 +271,27 @@ public class EamServiceImpl implements EamService { |
|
|
IPage<EamAdminData> eamAdminList = this.eamMapper.eamAdminSearch(new Page<EamAdminData>(inData.getPage(), inData.getLimit()), inData); |
|
|
IPage<EamAdminData> eamAdminList = this.eamMapper.eamAdminSearch(new Page<EamAdminData>(inData.getPage(), inData.getLimit()), inData); |
|
|
// 拼接部门 |
|
|
// 拼接部门 |
|
|
for(EamAdminData data : eamAdminList.getRecords()){ |
|
|
for(EamAdminData data : eamAdminList.getRecords()){ |
|
|
List<String> deptList = eamMapper.getDeptList(data.getSite(), data.getAdminID()); |
|
|
|
|
|
|
|
|
List<EamAdminData> deptList = eamMapper.getDeptDetail(data.getSite(), data.getAdminID()); |
|
|
|
|
|
String deptId = ""; |
|
|
String deptName = ""; |
|
|
String deptName = ""; |
|
|
// if (deptList.size() > 0) { |
|
|
|
|
|
|
|
|
if (deptList.size() > 0) { |
|
|
for (int i = 0; i < deptList.size(); i++) { |
|
|
for (int i = 0; i < deptList.size(); i++) { |
|
|
if (deptList.get(i) != null){ |
|
|
if (deptList.get(i) != null){ |
|
|
if (deptName.equals("")) { |
|
|
if (deptName.equals("")) { |
|
|
deptName = deptList.get(i); |
|
|
|
|
|
|
|
|
deptName = deptList.get(i).getDepartmentName(); |
|
|
} else { |
|
|
} else { |
|
|
deptName = deptName + ";" + deptList.get(i); |
|
|
|
|
|
|
|
|
deptName = deptName + ";" + deptList.get(i).getDepartmentName(); |
|
|
|
|
|
} |
|
|
|
|
|
if (deptId.equals("")) { |
|
|
|
|
|
deptId = deptList.get(i).getDepartment(); |
|
|
|
|
|
} else { |
|
|
|
|
|
deptId = deptId + ";" + deptList.get(i).getDepartment(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
data.setDepartment(deptName); |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
data.setDepartment(deptId); |
|
|
|
|
|
data.setDepartmentName(deptName); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
return new PageUtils(eamAdminList); |
|
|
return new PageUtils(eamAdminList); |
|
|
} |
|
|
} |
|
|
@ -1015,9 +1022,9 @@ public class EamServiceImpl implements EamService { |
|
|
for(EamWorkOrderInData ewoData : resultList.getRecords()){ |
|
|
for(EamWorkOrderInData ewoData : resultList.getRecords()){ |
|
|
// 查询设备所属部门 |
|
|
// 查询设备所属部门 |
|
|
String objDepartment = eamMapper.selectDeptByObjectID(ewoData.getSite(), ewoData.getObjectID()); |
|
|
String objDepartment = eamMapper.selectDeptByObjectID(ewoData.getSite(), ewoData.getObjectID()); |
|
|
// 查询用户所属部门 |
|
|
|
|
|
String adminID = eamMapper.selectAdminIdByUserName(ewoData.getSite(), inData.getUsername()); |
|
|
String adminID = eamMapper.selectAdminIdByUserName(ewoData.getSite(), inData.getUsername()); |
|
|
if (adminID != null){ |
|
|
if (adminID != null){ |
|
|
|
|
|
// 查询用户所属部门 |
|
|
List<String> deptList = eamMapper.getDeptList(ewoData.getSite(), adminID); |
|
|
List<String> deptList = eamMapper.getDeptList(ewoData.getSite(), adminID); |
|
|
//List<String> nameList = deptList.stream().map(a -> a.getDepartmentName()).collect(Collectors.toList()); |
|
|
//List<String> nameList = deptList.stream().map(a -> a.getDepartmentName()).collect(Collectors.toList()); |
|
|
if (deptList.contains(objDepartment)){ |
|
|
if (deptList.contains(objDepartment)){ |
|
|
|