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

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

parent e917b55c
...@@ -1192,24 +1192,19 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -1192,24 +1192,19 @@ 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("人员绑定单位重复!"); if (list.size() == 1) {
} else { userDtoList.addAll(list);
if (!CollectionUtils.isEmpty(list)) { UserDto userDto = list.get(0);
if (list.size() == 1) { String codeVal = userDto.getBizOrgCode().substring(0, 5);
userDtoList.addAll(list); if (StringUtils.isNotBlank(codeVal)) {
UserDto userDto = list.get(0); List<UserDto> dtoList = orgUsrMapper.getUserInfo(null, typeArr[1], codeVal, COMPANY_FIELD_CODE);
String codeVal = userDto.getCompanyId().substring(0, 5); if (!CollectionUtils.isEmpty(dtoList)) {
if (StringUtils.isNotBlank(codeVal)) { userDtoList.addAll(dtoList);
List<UserDto> dtoList = orgUsrMapper.getUserInfo(null, typeArr[1], codeVal, COMPANY_FIELD_CODE);
if (!CollectionUtils.isEmpty(dtoList)) {
userDtoList.addAll(dtoList);
return userDtoList;
}
} }
throw new RuntimeException("未获取人员业主单位!");
} }
throw new RuntimeException("人员绑定业主单位不唯一!"); return userDtoList;
} }
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