| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.*; |
| | | |
| | | import static org.springblade.common.constant.CommonConstant.DEFAULT_PARAM_PASSWORD; |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public IPage<UserVO> selectUserPageSecurity(IPage<UserVO> page, UserVO user) { |
| | | return page.setRecords(baseMapper.selectUserPageSecurity(page, user)); |
| | | List<UserVO> userVOS = baseMapper.selectUserPageSecurity(page, user); |
| | | //机构名称拼接 |
| | | userVOS.forEach(userVO -> { |
| | | if (null!=userVO.getDeptId()) { |
| | | List<String> list = baseMapper.getDeptName(userVO.getDeptId()); |
| | | if (list.size() > 1) { |
| | | if (null != list.get(1) && list.get(1) != "") { |
| | | String s = list.get(1).toString(); |
| | | if (s.equals("本市保安公司") || s.equals("保安培训学校") || s.equals("自招保安单位") || s.equals("武装押运公司") || s.equals("分公司") || s.equals("其他")){ |
| | | userVO.setDeptName(list.get(0)); |
| | | } |
| | | else { |
| | | userVO.setDeptName(list.get(1) + "," + list.get(0)); |
| | | } |
| | | } else { |
| | | userVO.setDeptName(list.get(0)); |
| | | } |
| | | } |
| | | if (list.size() == 1) { |
| | | userVO.setDeptName(list.get(0)); |
| | | } |
| | | } |
| | | }); |
| | | return page.setRecords(userVOS); |
| | | } |
| | | |
| | | /** |
| | |
| | | public List<SecurityExcel> exportSecurity(UserVO user) { |
| | | return baseMapper.exportSecurity(user); |
| | | } |
| | | |
| | | @Override |
| | | public List selectPeo(UserVO user) { |
| | | return baseMapper.selectPeo(user); |
| | | } |
| | | |
| | | |
| | | } |