| | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | private MemberJoinMapper memberJoinMapper; |
| | | |
| | | @Autowired |
| | | private JkCabinetMapper jkCabinetMapper; |
| | | |
| | | @Autowired |
| | | private TrainTimeMapper trainTimeMapper; |
| | |
| | | queryWrapper.apply(" find_in_set('"+companySpecialId+"',REPLACE(t3.company_path,'/',',')) "); |
| | | } |
| | | } |
| | | if(null != member.getQueryAuth() && Constants.equalsInteger(member.getQueryAuth(),Constants.ONE)){ |
| | | List<JkCabinet> jkCabinets = jkCabinetMapper.selectList(new QueryWrapper<JkCabinet>().lambda() |
| | | .eq(JkCabinet::getIsdeleted,Constants.ZERO) |
| | | .isNotNull(JkCabinet::getAuthMemberId) |
| | | ); |
| | | if(CollectionUtils.isNotEmpty(jkCabinets)){ |
| | | List<String> memberIdList = new ArrayList<>(); |
| | | List<String> authMemberId = jkCabinets.stream().map(i->i.getAuthMemberId()).collect(Collectors.toList()); |
| | | for (String s:authMemberId) { |
| | | memberIdList.addAll(Arrays.asList(s.split(","))) ; |
| | | } |
| | | queryWrapper.in(Member::getId,memberIdList); |
| | | } |
| | | |
| | | } |
| | | queryWrapper.eq(Member::getIsdeleted,Constants.ZERO); |
| | | queryWrapper.eq(Member::getWorkStatus,Constants.ZERO); |
| | | queryWrapper.orderByAsc(Member::getPinyin); |
| | |
| | | if(importing!=null && importing){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,已存在员工导入任务正在执行中,请稍后再试!"); |
| | | } |
| | | redisTemplate.opsForValue().set(Constants.RedisKeys.IMPORTING_MEMBER,true); |
| | | redisTemplate.opsForValue().set(Constants.RedisKeys.IMPORTING_MEMBER,true,30, TimeUnit.MINUTES); |
| | | try { |
| | | ExcelImporter ie = null; |
| | | List<MemberImport> dataList =null; |
| | |
| | | if(Objects.nonNull(deptIdList)){ |
| | | List<Company> companyList = companyMapper.selectList(new QueryWrapper<Company>().lambda().in(Company::getErpId,deptIdList) |
| | | .eq(Company::getType,Constants.ONE).eq(Company::getIsdeleted,Constants.ZERO) |
| | | // .isNotNull(Company::getHkId) 暂时无法同步开航 先注释 |
| | | // .isNotNull(Company::getHkId) 暂时无法同步海康 先注释 |
| | | ); |
| | | if(CollectionUtils.isNotEmpty(companyList)){ |
| | | member.setHkOrgId(companyList.get(Constants.ZERO).getHkId()); |