| | |
| | | //机构名称拼接 |
| | | userVOS.forEach(userVO -> { |
| | | if (null!=userVO.getDeptId()) { |
| | | String deptIds = ""; |
| | | if (userVO.getAncestors() != null){ |
| | | deptIds = userVO.getAncestors()+","+userVO.getDeptId(); |
| | | }else{ |
| | | deptIds = userVO.getDeptId(); |
| | | } |
| | | |
| | | List<String> deptNameList = SysCache.getDeptNames(userVO.getAncestors()+","+userVO.getDeptId()); |
| | | List<String> deptNameList = SysCache.getDeptNames(deptIds); |
| | | |
| | | userVO.setFullDeptName(getFullDeptName(deptNameList)); |
| | | |
| | |
| | | |
| | | private String getFullDeptName(List<String> deptNameList) { |
| | | String fullDeptName = ""; |
| | | if (deptNameList.size()>1){ |
| | | //多级 |
| | | if (StringUtil.isNotBlank(deptNameList.get(0))){ |
| | | //本市保安公司 xxx xxx xxx |
| | | String first = deptNameList.get(0); |
| | | if (first.equals("本市保安公司") || first.equals("保安培训学校") || first.equals("自招保安单位") || first.equals("武装押运公司") || first.equals("分公司") || first.equals("其他")){ |
| | | deptNameList.remove(0); |
| | | fullDeptName = StringUtil.join(deptNameList,","); |
| | | if (deptNameList != null){ |
| | | if (deptNameList.size()>1){ |
| | | //多级 |
| | | if (StringUtil.isNotBlank(deptNameList.get(0))){ |
| | | //本市保安公司 xxx xxx xxx |
| | | String first = deptNameList.get(0); |
| | | if (first.equals("本市保安公司") || first.equals("保安培训学校") || first.equals("自招保安单位") || first.equals("武装押运公司") || first.equals("分公司") || first.equals("其他")){ |
| | | deptNameList.remove(0); |
| | | fullDeptName = StringUtil.join(deptNameList,","); |
| | | } |
| | | } |
| | | } |
| | | } |