From 4f6565cb9cca05981abdeb85dfc023a28c892e42 Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期三, 05 十一月 2025 16:42:45 +0800
Subject: [PATCH] 钥匙柜信息处理
---
server/visits/dmvisit_admin/src/main/java/com/doumee/service/impl/HkSyncEventServiceImpl.java | 33 +++++++++++++++++++++++++++++----
1 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/service/impl/HkSyncEventServiceImpl.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/service/impl/HkSyncEventServiceImpl.java
index 0a46fbe..748fa8d 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/service/impl/HkSyncEventServiceImpl.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/service/impl/HkSyncEventServiceImpl.java
@@ -1,5 +1,6 @@
package com.doumee.service.impl;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.haikang.model.HKConstants;
import com.doumee.core.haikang.model.HKTools;
@@ -8,9 +9,12 @@
import com.doumee.core.haikang.model.param.respose.OrgInfoResponse;
import com.doumee.core.haikang.service.HKService;
import com.doumee.core.utils.Constants;
+import com.doumee.dao.business.WarningMapper;
+import com.doumee.dao.business.model.Warning;
import com.doumee.dao.system.model.SystemDictData;
import com.doumee.service.business.InterfaceLogService;
import com.doumee.service.business.impl.hksync.HkSyncBaseServiceImpl;
+import com.github.xiaoymin.knife4j.core.util.CollectionUtils;
import com.hikvision.artemis.sdk.config.ArtemisConfig;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -18,6 +22,8 @@
import javax.annotation.PostConstruct;
import java.util.Date;
+import java.util.List;
+import java.util.stream.Collectors;
/**
* 娴峰悍浜嬩欢璁㈤槄琛⊿ervice瀹炵幇
@@ -31,6 +37,8 @@
private SystemDictDataBiz systemDictDataBiz;
@Autowired
private InterfaceLogService interfaceLogService;
+ @Autowired
+ private WarningMapper warningMapper;
@PostConstruct
public int initHkConfig(){
@@ -111,11 +119,28 @@
HKService.cancelEventSub(param);//鍏堝彇娑�
// HKService.eventSub(param);//鏈堝彴宸ヤ綔鐘舵�佷簨浠�
+ try{
+ List<Warning> warningList = warningMapper.selectList(new QueryWrapper<Warning>().lambda()
+ .eq(Warning::getIsdeleted,Constants.ZERO)
+ .eq(Warning::getStatus,Constants.ONE)
+ .in(Warning::getType,Constants.ZERO,Constants.ONE)
+ .isNotNull(Warning::getCode)
+ );
+ if(CollectionUtils.isNotEmpty(warningList)){
+ List<String> codeList = warningList.stream().map(i->i.getCode()).collect(Collectors.toList());
+ if(CollectionUtils.isNotEmpty(codeList)){
+ param.setEventDest(path+"/notice");
+ param.setEventTypes(codeList.stream().map(i->Integer.valueOf(i)).toArray(Integer[]::new));
+ HKService.cancelEventSub(param);//鍏堝彇娑�
+ HKService.eventSub(param);//瀹夐槻浜嬩欢
+ }
+ }
+ }catch (Exception e){
- param.setEventDest(path+"/platform/carstatus");
- param.setEventTypes(new Integer[]{HKConstants.EventTypes.PLATFORM_CAR_STATUS.getKey()});
- HKService.cancelEventSub(param);//鍏堝彇娑�
- HKService.eventSub(param);//鏈堝彴杞﹁締鐘舵�佷簨浠�
+ }
+
+
+
}
/**
--
Gitblit v1.9.3