| | |
| | | import org.springblade.modules.securitypaper.entity.SecurityPaper; |
| | | import org.springblade.modules.securitypaper.service.SecurityPaperService; |
| | | import org.springblade.modules.system.entity.*; |
| | | import org.springblade.modules.system.excel.QrCodeExcel; |
| | | import org.springblade.modules.system.excel.SecurityExcel; |
| | | import org.springblade.modules.system.excel.SecurityYyExcel; |
| | | import org.springblade.modules.system.excel.UserExcel; |
| | | import org.springblade.modules.system.excel.*; |
| | | import org.springblade.modules.system.mapper.UserMapper; |
| | | import org.springblade.modules.system.node.TreeNode; |
| | | import org.springblade.modules.system.service.*; |
| | |
| | | |
| | | @Override |
| | | public UserInfo userInfo(String tenantId, String account, String password, UserEnum userEnum) { |
| | | User user = baseMapper.getUser(tenantId, account, password); |
| | | return buildUserInfo(user, userEnum); |
| | | try { |
| | | User user = baseMapper.getUser(tenantId, account, password); |
| | | return buildUserInfo(user, userEnum); |
| | | }catch (Exception e){ |
| | | throw new ServiceException("账号["+account+"]"+"重复!"); |
| | | } |
| | | } |
| | | |
| | | private UserInfo buildUserInfo(User user) { |
| | |
| | | String deptIds = userDeptService.selectIn(user.getDeptId()); |
| | | if (null!=deptIds && !deptIds.equals("")) { |
| | | if (null != deptId && !deptId.equals("")) { |
| | | if (!deptId.equals(deptIds)) { |
| | | //管理员不分单位导入 |
| | | if (!deptId.equals(deptIds) && !deptId.equals("1123598813738675201")) { |
| | | throw new ServiceException("导入失败!不能导入不是本公司的保安员数据!"); |
| | | } |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<SecurityExcel> exportSecurityInfo(UserVO user) { |
| | | public List<ExportSecurityExcel> exportSecurityInfo(UserVO user) { |
| | | return baseMapper.exportSecurityInfo(user); |
| | | } |
| | | |