Commit 1ae2dd69 authored by 高建强's avatar 高建强

item:获取用户信息接口修改

parent e917b55c
...@@ -1192,25 +1192,20 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -1192,25 +1192,20 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
// 业主单位 // 业主单位
List<UserDto> list = orgUsrMapper.getUserInfo(userId, typeArr[0], null, FIELD_CODE); List<UserDto> list = orgUsrMapper.getUserInfo(userId, typeArr[0], null, FIELD_CODE);
if (!CollectionUtils.isEmpty(list)) { if (!CollectionUtils.isEmpty(list)) {
throw new RuntimeException("人员绑定单位重复!");
} else {
if (!CollectionUtils.isEmpty(list)) {
if (list.size() == 1) { if (list.size() == 1) {
userDtoList.addAll(list); userDtoList.addAll(list);
UserDto userDto = list.get(0); UserDto userDto = list.get(0);
String codeVal = userDto.getCompanyId().substring(0, 5); String codeVal = userDto.getBizOrgCode().substring(0, 5);
if (StringUtils.isNotBlank(codeVal)) { if (StringUtils.isNotBlank(codeVal)) {
List<UserDto> dtoList = orgUsrMapper.getUserInfo(null, typeArr[1], codeVal, COMPANY_FIELD_CODE); List<UserDto> dtoList = orgUsrMapper.getUserInfo(null, typeArr[1], codeVal, COMPANY_FIELD_CODE);
if (!CollectionUtils.isEmpty(dtoList)) { if (!CollectionUtils.isEmpty(dtoList)) {
userDtoList.addAll(dtoList); userDtoList.addAll(dtoList);
return userDtoList;
} }
} }
throw new RuntimeException("未获取人员业主单位!"); return userDtoList;
} }
throw new RuntimeException("人员绑定业主单位不唯一!"); throw new RuntimeException("人员绑定业主单位不唯一!");
} }
}
throw new RuntimeException("人员未绑定任何单位!"); throw new RuntimeException("人员未绑定任何单位!");
} }
throw new RuntimeException("参数必传且不为空!"); throw new RuntimeException("参数必传且不为空!");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment