jiangping
2024-10-09 bfd87d12adb1d511334cd91cf6c7ff3608fae8b9
server/visits/dmvisit_admin/src/main/java/com/doumee/service/impl/HkSyncEventServiceImpl.java
@@ -14,8 +14,6 @@
import com.hikvision.artemis.sdk.config.ArtemisConfig;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.DependsOn;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
@@ -45,15 +43,10 @@
    }
    public  int  initHkParamConfig(){
        if(StringUtils.isBlank(ArtemisConfig.appKey )
                ||StringUtils.isBlank(ArtemisConfig.host )
                ||StringUtils.isBlank(ArtemisConfig.appSecret )
        ){
            ArtemisConfig.host = systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_HOST).getCode();
            ArtemisConfig.appKey = systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_APPKEY).getCode();
            ArtemisConfig.appSecret = systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_APPSECRET).getCode();
            HKConstants.https = systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_HTTPS).getCode();
        }
        ArtemisConfig.host = systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_HOST).getCode();
        ArtemisConfig.appKey = systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_APPKEY).getCode();
        ArtemisConfig.appSecret = systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_APPSECRET).getCode();
        HKConstants.https = systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_HTTPS).getCode();
        HKTools.interfaceLogService=interfaceLogService;
        return  0;
    }
@@ -106,10 +99,17 @@
        HKService.cancelEventSub(param);//先取消
        HKService.eventSub(param);//门禁事件
        param.setEventDest(path+"/visitIccm");
        param.setEventTypes(new Integer[]{HKConstants.EventTypes.VISIT_SIGN_ICCM_IN.getKey()
                ,HKConstants.EventTypes.VISIT_SIGN_ICCM_PASS.getKey()
                ,HKConstants.EventTypes.VISIT_SIGN_ICCM_OUT.getKey()});
        HKService.cancelEventSub(param);//先取消
        HKService.eventSub(param);//访客事件
        param.setEventDest(path+"/platform/workstatus");
        param.setEventTypes(new Integer[]{HKConstants.EventTypes.PLATFORM_WORKSTATUS.getKey()});
        HKService.cancelEventSub(param);//先取消
        HKService.eventSub(param);//月台工作状态事件
//        HKService.eventSub(param);//月台工作状态事件
        param.setEventDest(path+"/platform/carstatus");