| | |
| | | } |
| | | |
| | | @Override |
| | | // @Transactional(rollbackFor = Exception.class) |
| | | // @Transactional(rollbackFor = Exception.class) 去除事务回滚 |
| | | public void importUser(List<UserExcel> data, Boolean isCovered,String deptId) { |
| | | //将不能导入的保安员账号存起来 |
| | | List<String> errorList = new ArrayList<>(); |
| | | //将需要新增的保安员信息存入集合 |
| | | List<User> insertList = new ArrayList<>(); |
| | | //将需要更新的保安员信息存入集合 |
| | | List<User> updateList = new ArrayList<>(); |
| | | //导入状态,默认为true ,如果有一个出现问题则为 false |
| | | AtomicBoolean status = new AtomicBoolean(true); |
| | | data.forEach(userExcel -> { |
| | |
| | | //判断当前用户是否已在本单位,如果是的更新数据 |
| | | User user1 = new User(); |
| | | user1.setAccount(user.getCardid()); |
| | | // System.out.println("user.getCardid() = " + user.getCardid()); |
| | | user1.setIsDeleted(0); |
| | | user1.setStatus(1); |
| | | User user2 = this.getOne(Condition.getQueryWrapper(user1)); |
| | |
| | | if (Integer.parseInt(type) == 4) { |
| | | list = baseMapper.getWorkReportInfo(type, deptid, jurisdiction); |
| | | } |
| | | //现场检查获取保安员 |
| | | if (Integer.parseInt(type) == 5) { |
| | | list = baseMapper.getSecurityInfo(jurisdiction); |
| | | } |
| | | return list; |
| | | } |
| | | |