jiangping
2024-05-31 bf8d85d5f83c2036fb4239d764d33e99c1b62bd3
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncEmpowerServiceImpl.java
@@ -28,6 +28,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date;
@@ -57,6 +58,7 @@
     */
    @Override
    public  Integer   syncEmpowerDetailData(Integer endId){
        log.error("");
//        if(Constants.DEALING_HK_EMPOWER_DETAIL){
//            return   ;
//        }
@@ -524,21 +526,7 @@
        }
    }
    public class TaskRuner implements Runnable{
        private    List<Empower> list ;
        @Override
        public void run() {
            dealNewListTask(list);
        }
        public List<Empower> getList() {
            return list;
        }
        public void setList(List<Empower> list) {
            this.list = list;
        }
    }
    @Transactional(rollbackFor = {BusinessException.class,Exception.class})
    private void dealAllListTask(List<Empower> list) {
        //按照父级申请分批处理每次申请数据
        if(list ==null || list.size()==0){
@@ -562,6 +550,12 @@
                cacenList.add(c);
                continue;
            }
            if(Constants.equalsInteger(c.getMemberDeleted(),Constants.ONE)
                   && Constants.equalsInteger(c.getIsdeleted(),1)){
                //如果人员已离职,新增授权无需下发,取消下发
                cacenList.add(c);
                continue;
            }
            if(c.getDeviceOnline() !=null && Constants.equalsInteger(c.getDeviceOnline(),0)){
                waitList.add(c);
                continue;
@@ -571,7 +565,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())){