MrShi
2 天以前 eb82684152ffb0acddf67da92e4533a0190eb258
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
@@ -78,6 +78,7 @@
import java.math.BigDecimal;
import java.util.Date;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
/**
@@ -93,6 +94,9 @@
    @Autowired
    private MemberJoinMapper memberJoinMapper;
    @Autowired
    private JkCabinetMapper jkCabinetMapper;
    @Autowired
    private TrainTimeMapper trainTimeMapper;
@@ -1210,6 +1214,21 @@
                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);
@@ -2140,7 +2159,7 @@
        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;
@@ -2490,7 +2509,7 @@
        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());