From 82425d8e56ea692c9edfd280b1cce193c94252b9 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期三, 09 十月 2024 16:32:50 +0800
Subject: [PATCH] 最新版本
---
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java | 240 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 233 insertions(+), 7 deletions(-)
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java
index 5711c81..470fd3e 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java
@@ -9,8 +9,9 @@
import com.doumee.core.haikang.model.param.BaseResponse;
import com.doumee.core.haikang.model.param.request.*;
import com.doumee.core.haikang.model.param.respose.*;
+import com.doumee.core.utils.Constants;
+import com.hikvision.artemis.sdk.config.ArtemisConfig;
import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -230,6 +231,8 @@
*/
public static InputStream getFaceInputStream(FacePictureRequest param) {
log.info("銆愭捣搴蜂汉鑴歌闂浘鐗囨祦銆�================寮�濮�===="+JSONObject.toJSONString(param));
+ log.error("********************ArtemisConfig.host***********************************"+ ArtemisConfig.host);
+ log.error("********************ArtemisConfig.key********************************"+ArtemisConfig.appKey);
try {
InputStream res = HKTools.getFaceInputStream(JSONObject.toJSONString(param));
log.error("銆愭捣搴蜂汉鑴歌闂浘鐗囨祦銆�================鎴愬姛====\n");
@@ -382,7 +385,7 @@
public static BaseResponse parkReservationDeletion(ParkReservationDelRequest param){
log.info("銆愭捣搴疯溅浣嶅彇娑堥绾︺��================寮�濮�===="+JSONObject.toJSONString(param));
try {
- String res = HKTools.carChargeDeletion(JSONObject.toJSONString(param));
+ String res = HKTools.parkDeletion(JSONObject.toJSONString(param));
TypeReference typeReference =
new TypeReference< BaseResponse>(){};
BaseResponse result = JSONObject.parseObject(res, typeReference.getType());
@@ -404,6 +407,24 @@
TypeReference typeReference =
new TypeReference< BaseResponse<VisitAppointmentResponse>>(){};
BaseResponse<VisitAppointmentResponse> result = JSONObject.parseObject(res, typeReference.getType());
+ logResult(result,"娴峰悍璁垮棰勭害");
+ return result;
+ }catch (Exception e){
+ log.error("銆愭捣搴疯瀹㈤绾︺��================澶辫触====锛歕n"+ e.getMessage());
+ }
+ return null;
+ }
+ /**
+ *璁垮棰勭害
+ * @return
+ */
+ public static BaseResponse<IccmAppointmentResponse> iccmAppointment(IccmAppointmentRequest param){
+ log.info("銆愭捣搴疯瀹㈤绾︺��================寮�濮�===="+JSONObject.toJSONString(param));
+ try {
+ String res = HKTools.iccmAppointment(JSONObject.toJSONString(param));
+ TypeReference typeReference =
+ new TypeReference< BaseResponse<IccmAppointmentResponse>>(){};
+ BaseResponse<IccmAppointmentResponse> result = JSONObject.parseObject(res, typeReference.getType());
logResult(result,"娴峰悍璁垮棰勭害");
return result;
}catch (Exception e){
@@ -462,6 +483,24 @@
return result;
}catch (Exception e){
log.error("銆愭捣搴疯瀹㈠厤鐧昏棰勭害銆�================澶辫触====锛歕n"+ e.getMessage());
+ }
+ return null;
+ }
+ /**
+ *璁垮鍏嶇櫥璁伴绾�
+ * @return
+ */
+ public static BaseResponse<IccmAppointmentMDJResponse> iccmAppiontmentMDJ(IccmAppointmentMDJRequest param){
+ log.info("銆愭捣搴疯瀹㈠厤鐧昏棰勭害銆�================iccm寮�濮�===="+JSONObject.toJSONString(param));
+ try {
+ String res = HKTools.iccmAppointmentMDJ(JSONObject.toJSONString(param));
+ TypeReference typeReference =
+ new TypeReference< BaseResponse<IccmAppointmentMDJResponse> >(){};
+ BaseResponse<IccmAppointmentMDJResponse> result = JSONObject.parseObject(res, typeReference.getType());
+ logResult(result,"娴峰悍璁垮鍏嶇櫥璁伴绾�");
+ return result;
+ }catch (Exception e){
+ log.error("銆愭捣搴疯瀹㈠厤鐧昏棰勭害銆�================iccm澶辫触====锛歕n"+ e.getMessage());
}
return null;
}
@@ -824,6 +863,170 @@
return null;
}
/**
+ *鏌ヨ璁垮棰勭害璁板綍锛堝垎椤碉級
+ * @return
+ */
+ public static BaseResponse<BaseListPageResponse<IccmAppointmentListResponse>> iccmAppointmentRecords(IccmAppointmentListRequest param){
+ log.info("銆愭捣搴疯瀹㈤绾﹁褰曟煡璇€��================寮�濮�===="+JSONObject.toJSONString(param));
+ try {
+ String res = HKTools.iccmAppointmentRecords(JSONObject.toJSONString(param));
+ TypeReference typeReference =
+ new TypeReference<BaseResponse<BaseListPageResponse<IccmAppointmentListResponse>>>(){};
+ BaseResponse<BaseListPageResponse<IccmAppointmentListResponse>> result = JSONObject.parseObject(res, typeReference.getType());
+ logResult(result,"娴峰悍璁垮棰勭害璁板綍鏌ヨ");
+ return result;
+ }catch (Exception e){
+ log.error("銆愭捣搴疯瀹㈤绾﹁褰曟煡璇€��================澶辫触====锛歕n"+ e.getMessage());
+ }
+ return null;
+ }
+ /**
+ *1.9.1鏍规嵁寰俊鍏紬鍙蜂俊鎭幏鍙朅ccessToken锛堝垎椤碉級
+ * @return
+ */
+ public static BaseResponse<String> wxAccessToken(String configId,String tagId){
+ log.info("銆愭捣搴锋牴鎹井淇″叕浼楀彿淇℃伅鑾峰彇AccessToken銆�================寮�濮�====configId:"+configId+" && tagId:"+tagId);
+ try {
+ String res = HKTools.wxAccessToken(configId,tagId);
+ TypeReference typeReference =
+ new TypeReference<BaseResponse<String>>(){};
+ BaseResponse<String> result = JSONObject.parseObject(res, typeReference.getType());
+ logResult(result,"娴峰悍鏍规嵁寰俊鍏紬鍙蜂俊鎭幏鍙朅ccessToken");
+ return result;
+ }catch (Exception e){
+ log.error("銆愭捣搴锋牴鎹井淇″叕浼楀彿淇℃伅鑾峰彇AccessToken銆�================澶辫触====锛歕n"+ e.getMessage());
+ }
+ return null;
+ }
+ /**
+ *鏍规嵁閰嶇疆寰俊鍏紬鍙风紪鍙锋煡璇㈠井淇″叕浼楀彿淇℃伅
+ * @return
+ */
+ public static BaseResponse<BaseListPageResponse<WxConfigInfoResponse>> getWxConfig(WxConfigInfoRequest param){
+ log.info("銆愭捣搴锋牴鎹厤缃井淇″叕浼楀彿缂栧彿鏌ヨ寰俊鍏紬鍙蜂俊鎭��================寮�濮�===="+JSONObject.toJSONString(param));
+ try {
+ String res = HKTools.getWxConfig(toMap(param));
+ TypeReference typeReference =
+ new TypeReference<BaseResponse<BaseListPageResponse<WxConfigInfoResponse>>>(){};
+ BaseResponse<BaseListPageResponse<WxConfigInfoResponse>> result = JSONObject.parseObject(res, typeReference.getType());
+ logResult(result,"娴峰悍鏍规嵁閰嶇疆寰俊鍏紬鍙风紪鍙锋煡璇㈠井淇″叕浼楀彿淇℃伅");
+ return result;
+ }catch (Exception e){
+ log.error("銆愭捣搴锋牴鎹厤缃井淇″叕浼楀彿缂栧彿鏌ヨ寰俊鍏紬鍙蜂俊鎭��================澶辫触====锛歕n"+ e.getMessage());
+ }
+ return null;
+ }
+
+ /**
+ *鍒嗛〉鏌ヨ娑堥槻璁惧閮ㄤ欢鐘舵��
+ * @return
+ */
+ public static BaseResponse<BaseListPageResponse<FireDeviceStatusListResponse>> fireDeviceStatusSearch(FireDeviceStatuslListRequest param){
+ log.info("銆愭捣搴锋煡璇㈡秷闃茶澶囬儴浠剁姸鎬併��================寮�濮�===="+JSONObject.toJSONString(param));
+ try {
+ String res = HKTools.fireDeviceStatusSearch(JSONObject.toJSONString(param));
+ TypeReference typeReference =
+ new TypeReference<BaseResponse<BaseListPageResponse<FireDeviceStatusListResponse>>>(){};
+ BaseResponse<BaseListPageResponse<FireDeviceStatusListResponse>> result = JSONObject.parseObject(res, typeReference.getType());
+ logResult(result,"娴峰悍鍒嗛〉鏌ヨ娑堥槻浼犳劅鍣ㄩ儴浠剁姸鎬�");
+ return result;
+ }catch (Exception e){
+ log.error("銆愭捣搴锋煡璇㈡秷闃茶澶囬儴浠剁姸鎬併��================澶辫触====锛歕n"+ e.getMessage());
+ }
+ return null;
+ }
+ /**
+ *鍒嗛〉鏌ヨ娑堥槻浼犳劅鍣ㄩ儴浠剁姸鎬�
+ * @return
+ */
+ public static BaseResponse<BaseListPageResponse<SensorStatusListResponse>> sensorStatusSearch(SensorStatusListRequest param){
+ log.info("銆愭捣搴峰垎椤垫煡璇㈡秷闃蹭紶鎰熷櫒閮ㄤ欢鐘舵�併��================寮�濮�===="+JSONObject.toJSONString(param));
+ try {
+ String res = HKTools.sensorStatusSearch(JSONObject.toJSONString(param));
+ TypeReference typeReference =
+ new TypeReference<BaseResponse<BaseListPageResponse<SensorStatusListResponse>>>(){};
+ BaseResponse<BaseListPageResponse<SensorStatusListResponse>> result = JSONObject.parseObject(res, typeReference.getType());
+ logResult(result,"娴峰悍鍒嗛〉鏌ヨ娑堥槻浼犳劅鍣ㄩ儴浠剁姸鎬�");
+ return result;
+ }catch (Exception e){
+ log.error("銆愭捣搴峰垎椤垫煡璇㈡秷闃蹭紶鎰熷櫒閮ㄤ欢鐘舵�併��================澶辫触====锛歕n"+ e.getMessage());
+ }
+ return null;
+ }
+
+ /**
+ *鏌ヨ娑堥槻浼犳劅鍣ㄥ垪琛�
+ * @return
+ */
+ public static BaseResponse<BaseListPageResponse<FireChannelListResponse>> fireChannelSearch(FireChannelListRequest param){
+ log.info("銆愭捣搴锋煡璇㈡秷闃蹭紶鎰熷櫒鍒楄〃銆�================寮�濮�===="+JSONObject.toJSONString(param));
+ try {
+ String res = HKTools.fireChannelSearch(JSONObject.toJSONString(param));
+ TypeReference typeReference =
+ new TypeReference<BaseResponse<BaseListPageResponse<FireChannelListResponse>>>(){};
+ BaseResponse<BaseListPageResponse<FireChannelListResponse>> result = JSONObject.parseObject(res, typeReference.getType());
+ logResult(result,"娴峰悍鏌ヨ娑堥槻浼犳劅鍣ㄥ垪琛�");
+ return result;
+ }catch (Exception e){
+ log.error("銆愭捣搴锋煡璇㈡秷闃蹭紶鎰熷櫒鍒楄〃銆�================澶辫触====锛歕n"+ e.getMessage());
+ }
+ return null;
+ }
+ /**
+ *鍒嗛〉鏌ヨ璁惧涓嬬殑鎵�鏈夋姤璀﹁褰�
+ * @return
+ */
+ public static BaseResponse<BaseListPageResponse<FindDeviceAlarmListResponse>> findDeviceAlarmPage(FindDeviceAlarmListRequest param){
+ log.info("銆愭捣搴峰垎椤垫煡璇㈣澶囦笅鐨勬墍鏈夋姤璀﹁褰曘��================寮�濮�===="+JSONObject.toJSONString(param));
+ try {
+ String res = HKTools.findDeviceAlarmPage(JSONObject.toJSONString(param));
+ TypeReference typeReference =
+ new TypeReference<BaseResponse<BaseListPageResponse<FindDeviceAlarmListResponse>>>(){};
+ BaseResponse<BaseListPageResponse<FindDeviceAlarmListResponse>> result = JSONObject.parseObject(res, typeReference.getType());
+ logResult(result,"娴峰悍鍒嗛〉鏌ヨ璁惧涓嬬殑鎵�鏈夋姤璀﹁褰�");
+ return result;
+ }catch (Exception e){
+ log.error("銆愭捣搴峰垎椤垫煡璇㈣澶囦笅鐨勬墍鏈夋姤璀﹁褰曘��================澶辫触====锛歕n"+ e.getMessage());
+ }
+ return null;
+ }
+ /**
+ *璇㈡秷闃茶澶囧垪琛�
+ * @return
+ */
+ public static BaseResponse<BaseListPageResponse<FireDeviceListResponse>> fireDeviceSearch(FireDeviceListRequest param){
+ log.info("銆愭捣搴疯娑堥槻璁惧鍒楄〃銆�================寮�濮�===="+JSONObject.toJSONString(param));
+ try {
+ String res = HKTools.fireDeviceSearch(JSONObject.toJSONString(param));
+ TypeReference typeReference =
+ new TypeReference<BaseResponse<BaseListPageResponse<FireDeviceListResponse>>>(){};
+ BaseResponse<BaseListPageResponse<FireDeviceListResponse>> result = JSONObject.parseObject(res, typeReference.getType());
+ logResult(result,"娴峰悍璇㈡秷闃茶澶囧垪琛�");
+ return result;
+ }catch (Exception e){
+ log.error("銆愭捣搴疯娑堥槻璁惧鍒楄〃銆�================澶辫触====锛歕n"+ e.getMessage());
+ }
+ return null;
+ }
+ /**
+ *鍒嗛〉鑾峰彇鍛婅浜嬩欢
+ * @return
+ */
+ public static BaseResponse<BaseListPageResponse<NhEventPageListResponse>> nhEventPageList(NhEventPageListRequest param){
+ log.info("銆愭捣搴峰垎椤佃幏鍙栧憡璀︿簨浠躲��================寮�濮�===="+JSONObject.toJSONString(param));
+ try {
+ String res = HKTools.nhEventPageList(toMap(param));
+ TypeReference typeReference =
+ new TypeReference<BaseResponse<BaseListPageResponse<NhEventPageListResponse>>>(){};
+ BaseResponse<BaseListPageResponse<NhEventPageListResponse>> result = JSONObject.parseObject(res, typeReference.getType());
+ logResult(result,"娴峰悍鍒嗛〉鑾峰彇鍛婅浜嬩欢");
+ return result;
+ }catch (Exception e){
+ log.error("銆愭捣搴峰垎椤佃幏鍙栧憡璀︿簨浠躲��================澶辫触====锛歕n"+ e.getMessage());
+ }
+ return null;
+ }
+ /**
*鏌ヨ璁垮鏉ヨ璁板綍锛堝凡鐧昏锛夛紙鍒嗛〉锛�
* @return
*/
@@ -856,6 +1059,30 @@
return result;
}catch (Exception e){
log.error("銆愭捣搴峰叏閲忕粍缁囨煡璇€��================澶辫触====锛歕n"+ e.getMessage());
+ }
+ return null;
+ }
+ /**
+ *鑾峰彇宸ヤ綔鍙拌彍鍗曞厤瀵嗙櫥闄嗚皟鏁村湴鍧�
+ * @return
+ */
+ public static String getMenuUrl(Integer type,String token){
+ String menuId = HKConstants.MenuPageId.afzx;
+ if(Constants.equalsInteger(type,Constants.ONE)){
+ menuId = HKConstants.MenuPageId.xkzx;
+ }else if(Constants.equalsInteger(type,Constants.TWO)){
+ menuId = HKConstants.MenuPageId.ngzx;
+ }else if(Constants.equalsInteger(type,Constants.THREE)){
+ menuId = HKConstants.MenuPageId.jsc;
+ }else if(Constants.equalsInteger(type,Constants.FOUR)){
+ menuId = HKConstants.MenuPageId.kqgl;
+ }
+ log.info("銆愭捣搴疯幏鍙栧伐浣滃彴鑿滃崟鍏嶅瘑鐧婚檰璋冩暣鍦板潃銆�================寮�濮�====menuId:"+menuId+"==token:"+token);
+ try {
+ String res = HKTools.getMenuUrl(menuId,token);
+ return res;
+ }catch (Exception e){
+ log.error("銆愭捣搴疯幏鍙栧伐浣滃彴鑿滃崟鍏嶅瘑鐧婚檰璋冩暣鍦板潃銆�================澶辫触====锛歕n"+ e.getMessage());
}
return null;
}
@@ -1097,13 +1324,13 @@
*鐢ㄤ簬璁剧疆骞挎挱鐨勮嚜瀹氭挱鏀惧拰鍋滄
* @return
*/
- public static BaseResponse<BaseListPageResponse<LedRecordsInfoResponse>> customBroadcast(LedRecordsRequest param){
+ public static BaseResponse customBroadcast(CustomBroadcastRequest param){
log.info("銆愭捣搴风敤浜庤缃箍鎾殑鑷畾鎾斁鍜屽仠姝€��================寮�濮�===="+JSONObject.toJSONString(param));
try {
String res = HKTools.customBroadcast(JSONObject.toJSONString(param));
TypeReference typeReference =
- new TypeReference< BaseResponse<BaseListPageResponse<LedRecordsInfoResponse>> >(){};
- BaseResponse<BaseListPageResponse<LedRecordsInfoResponse>> result = JSONObject.parseObject(res, typeReference.getType());
+ new TypeReference< BaseResponse>(){};
+ BaseResponse result = JSONObject.parseObject(res, typeReference.getType());
logResult(result,"娴峰悍鐢ㄤ簬璁剧疆骞挎挱鐨勮嚜瀹氭挱鏀惧拰鍋滄");
return result;
}catch (Exception e){
@@ -1118,7 +1345,7 @@
public static BaseResponse<BaseListPageResponse<PlatformStatusInfoResponse>> platformStatus(PlatformStatusRequest param) {
log.info("銆愭捣搴疯幏鍙栧叏閮ㄦ湀鍙颁俊鎭��================寮�濮�====" + JSONObject.toJSONString(param));
try {
- String res = HKTools.platformStatus(JSONObject.toJSONString(param));
+ String res = HKTools.platformStatus(param.getPlatformIds());
TypeReference typeReference =
new TypeReference<BaseResponse<BaseListPageResponse<PlatformStatusInfoResponse>>>() {
};
@@ -1129,7 +1356,6 @@
log.error("銆愭捣搴疯幏鍙栧叏閮ㄦ湀鍙颁俊鎭��================澶辫触====锛歕n" + e.getMessage());
}
return null;
-
}
/**
*鍙戦�佹秷鎭粰LED
--
Gitblit v1.9.3