k94314517
2024-10-16 17efddc6a667670dca682bf36b51a43e99615e6d
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncEmpowerServiceImpl.java
@@ -4,7 +4,6 @@
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
import com.doumee.core.haikang.model.HKConstants;
import com.doumee.core.haikang.model.HKResponseCode;
@@ -19,14 +18,11 @@
import com.doumee.dao.business.MemberCardMapper;
import com.doumee.dao.business.MemberMapper;
import com.doumee.dao.business.join.EmpowerJoinMapper;
import com.doumee.dao.business.join.VisitsJoinMapper;
import com.doumee.dao.business.model.*;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -85,7 +81,7 @@
                        //查询下发状态
                        BaseResponse<TaskPersonDetailListResponse> response = HKService.taskPersoDetail(param);
                        if(response!=null
                                && StringUtils.equals(response.getCode(),HKConstants.RESPONSE_SUCCEE)
                                && StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE)
                                && response.getData()!=null
                                && response.getData().getList() != null
                                && response.getData().getList().size() > 0
@@ -202,7 +198,7 @@
        request.setPersonIds(new String[]{delHkIds});
        BaseResponse<List<UserDelResponse>> result =  HKService.delBatchUser(request);
        boolean succes = false;
        if(result !=null && StringUtils.equals(result.getCode(),HKConstants.RESPONSE_SUCCEE)){
        if(result !=null && StringUtils.equals(result.getCode(), HKConstants.RESPONSE_SUCCEE)){
            //标记删除成功的数据(海康对接状态为已同步,,同步失败的仍为待同步,等下一次继续处理,知道全部删除完毕)
            if(result.getData()!=null && result.getData().size()>0){
                UserDelResponse tem = result.getData().get(0);
@@ -437,7 +433,12 @@
                Thread t1=new Thread(new Runnable() {
                    @Override
                    public void run() {
                        dealAllListTask(allList);
                        try {
                            dealAllListTask(allList);
                        }catch (Exception e){
                            log.info("======================下发授权异常:"+e.getMessage());
                            e.printStackTrace();
                        }
                    }
                });
                t1.start();
@@ -565,7 +566,7 @@
                continue;
            }
            HKConstants.OPERA_TYPE flag = HKConstants.OPERA_TYPE.ADD;
            if(Constants.equalsObject(c.getIsdeleted(),Constants.ONE)){
            if(Constants.equalsInteger(c.getIsdeleted(),Constants.ONE)){
                flag = HKConstants.OPERA_TYPE.DEL;
            }
            if(addTaskData(c,taskId,flag.getKey())){