From 1c20c8231980a8d4b91688ff8641a06d3b2f68ab Mon Sep 17 00:00:00 2001 From: MrShi <1878285526@qq.com> Date: 星期二, 14 十月 2025 16:34:22 +0800 Subject: [PATCH] 改bug --- server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java | 166 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 163 insertions(+), 3 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 bf42ef0..246722c 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 @@ -11,6 +11,7 @@ import com.doumee.core.haikang.model.param.request.*; import com.doumee.core.haikang.model.param.respose.*; import com.doumee.core.utils.Constants; +import com.doumee.core.utils.DateUtil; import com.hikvision.artemis.sdk.config.ArtemisConfig; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -19,12 +20,11 @@ import java.io.InputStream; import java.lang.reflect.Field; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; @Slf4j public class HKService { + private static String[] args; private Logger logger = LoggerFactory.getLogger(HKService.class); /** * 鑾峰彇鏍圭粍缁囨暟鎹� @@ -361,6 +361,8 @@ } return null; } + + /** *杞︿綅棰勭害 * @return @@ -379,6 +381,7 @@ } return null; } + /** *杞︿綅鍙栨秷棰勭害 * @return @@ -466,6 +469,42 @@ return result; }catch (Exception e){ log.error("銆愭捣搴疯瀹㈤绾︾绂汇��================澶辫触====锛歕n"+ e.getMessage()); + } + return null; + } + /** + *iccm璁垮棰勭害绛剧 + * @return + */ + public static BaseResponse iccmSignoff(VisitAppointmentOutRequest param){ + log.info("銆愭捣搴穒ccm璁垮棰勭害绛剧銆�================寮�濮�===="+JSONObject.toJSONString(param)); + try { + String res = HKTools.iccmSignoff(JSONObject.toJSONString(param)); + TypeReference typeReference = + new TypeReference< BaseResponse>(){}; + BaseResponse result = JSONObject.parseObject(res, typeReference.getType()); + logResult(result,"娴峰悍iccm璁垮棰勭害绛剧"); + return result; + }catch (Exception e){ + log.error("銆愭捣搴穒ccm璁垮棰勭害绛剧銆�================澶辫触====锛歕n"+ e.getMessage()); + } + return null; + } + /** + *iccm璁垮棰勭害鍙栨秷 + * @return + */ + public static BaseResponse iccmCancelAppointment(VisitAppointmentCancelRequest param){ + log.info("銆愭捣搴穒ccm璁垮棰勭害鍙栨秷銆�================寮�濮�===="+JSONObject.toJSONString(param)); + try { + String res = HKTools.iccmCancelAppointment(JSONObject.toJSONString(param)); + TypeReference typeReference = + new TypeReference< BaseResponse>(){}; + BaseResponse result = JSONObject.parseObject(res, typeReference.getType()); + logResult(result,"娴峰悍iccm璁垮棰勭害鍙栨秷"); + return result; + }catch (Exception e){ + log.error("銆愭捣搴穒ccm璁垮棰勭害鍙栨秷銆�================澶辫触====锛歕n"+ e.getMessage()); } return null; } @@ -940,6 +979,65 @@ } /** + *娑堥槻鐪嬫澘-4娓╂箍搴︾粺璁� + * @return + */ + public static BaseResponse<BaseListPageResponse<TemperatureHumidityDataResponse>> temperatureHumidityDataStatistic(TemperatureHumidityDataRequest param){ + log.info("銆愭捣搴锋秷闃茬湅鏉�-4娓╂箍搴︾粺璁°��================寮�濮�===="+JSONObject.toJSONString(param)); + try { + String res = HKTools.temperatureHumidityDataStatistic(JSONObject.toJSONString(param)); + TypeReference typeReference = + new TypeReference< BaseResponse<BaseListPageResponse<TemperatureHumidityDataResponse> >>(){}; + BaseResponse<BaseListPageResponse<TemperatureHumidityDataResponse>> result = JSONObject.parseObject(res, typeReference.getType()); + logResult(result,"娴峰悍娑堥槻鐪嬫澘-4娓╂箍搴︾粺璁�"); + return result; + }catch (Exception e){ + log.error("銆愭捣搴锋秷闃茬湅鏉�-4娓╂箍搴︾粺璁°��================澶辫触====锛歕n"+ e.getMessage()); + } + return null; + } + + /** + *娑堥槻鐪嬫澘-4鑾峰彇鍖哄煙鐢ㄩ噺鎺掑悕-鑳借�楃湅鏉� + * @return + */ + public static BaseResponse<List<RegionDataRankingDataResponse>> regionDataRanking(RegionDataRankingDataRequest param){ + log.info("銆愭捣搴锋秷闃茬湅鏉�-4鑾峰彇鍖哄煙鐢ㄩ噺鎺掑悕-鑳借�楃湅鏉裤��================寮�濮�===="+JSONObject.toJSONString(param)); + try { + String res = HKTools.regionDataRanking(JSONObject.toJSONString(param)); + TypeReference typeReference = + new TypeReference< BaseResponse<List<RegionDataRankingDataResponse> >>(){}; + BaseResponse<List<RegionDataRankingDataResponse>> result = JSONObject.parseObject(res, typeReference.getType()); + logResult(result,"娴峰悍娑堥槻鐪嬫澘-4鑾峰彇鍖哄煙鐢ㄩ噺鎺掑悕-鑳借�楃湅鏉�"); + return result; + }catch (Exception e){ + log.error("銆愭捣搴锋秷闃茬湅鏉�-4鑾峰彇鍖哄煙鐢ㄩ噺鎺掑悕-鑳借�楃湅鏉裤��================澶辫触====锛歕n"+ e.getMessage()); + } + return null; + } + + + /** + *娑堥槻鐪嬫澘-4鑾峰彇鍖哄煙鐢ㄩ噺鎺掑悕-鑳借�楃湅鏉� + * @return + */ + public static BaseResponse<EnergyTotalDataResponse> energyTotal(EnergyTotalDataRequest param){ + log.info("銆愭捣搴锋秷闃茬湅鏉�-4鏍规嵁鏃堕棿鍜屾椂闂寸淮搴﹁幏鍙栧洯鍖鸿兘鑰楁暟鎹��================寮�濮�===="+JSONObject.toJSONString(param)); + try { + String res = HKTools.energyTotal(JSONObject.toJSONString(param)); + TypeReference typeReference = + new TypeReference< BaseResponse<EnergyTotalDataResponse >>(){}; + BaseResponse<EnergyTotalDataResponse> result = JSONObject.parseObject(res, typeReference.getType()); + logResult(result,"娴峰悍娑堥槻鐪嬫澘-4鏍规嵁鏃堕棿鍜屾椂闂寸淮搴﹁幏鍙栧洯鍖鸿兘鑰楁暟鎹�"); + return result; + }catch (Exception e){ + log.error("銆愭捣搴锋秷闃茬湅鏉�-4鏍规嵁鏃堕棿鍜屾椂闂寸淮搴﹁幏鍙栧洯鍖鸿兘鑰楁暟鎹��================澶辫触====锛歕n"+ e.getMessage()); + } + return null; + } + + + /** *鍒嗛〉鏌ヨ娑堥槻璁惧閮ㄤ欢鐘舵�� * @return */ @@ -1102,9 +1200,16 @@ }else if(Constants.equalsInteger(type,Constants.FIVE)){ componentId = HKConstants.MenuPageId.componentIds[1]; menuId = HKConstants.MenuPageId.kqdbcl; + }else if(Constants.equalsInteger(type,Constants.SIX)){ + componentId = HKConstants.MenuPageId.componentIds[2]; + menuId = HKConstants.MenuPageId.stxf; +// return "https://10.50.250.253:443/xauthplus-plugin/thirdLogin?type=third&service=https://10.50.250.253:443/cems/config/generalCard&token="+token; + }else if(Constants.equalsInteger(type,7)){ + menuId = HKConstants.MenuPageId.hqzx; } log.info("銆愭捣搴疯幏鍙栧伐浣滃彴鑿滃崟鍏嶅瘑鐧婚檰璋冩暣鍦板潃銆�================寮�濮�====menuId:"+menuId+"==token:"+token); try { + ///xauthplus-plugin/thirdLogin?type=third&componentId=${componentId}&componentMenuId=${menuId}&token=${token} String res = HKTools.getMenuUrl(componentId,menuId,token); return res; }catch (Exception e){ @@ -1587,6 +1692,24 @@ return null; } /** + *閫氳繃openId鎴杣serName绛夊垹闄ょ粦瀹氫俊鎭� + * @return + */ + public static BaseResponse userOpenidDel(UserOpenidSaveRequest param){ + log.info("銆愭捣搴烽�氳繃openId鎴杣serName绛夊垹闄ょ粦瀹氫俊鎭��================寮�濮�===="+JSONObject.toJSONString(param)); + try { + String res = HKTools.userOpenidDel(toMap(param)); + TypeReference typeReference = + new TypeReference< BaseResponse >(){}; + BaseResponse<Integer> result = JSONObject.parseObject(res, typeReference.getType()); + logResult(result,"娴峰悍閫氳繃openId鎴杣serName绛夊垹闄ょ粦瀹氫俊鎭�"); + return result; + }catch (Exception e){ + log.error("銆愭捣搴烽�氳繃openId鎴杣serName绛夊垹闄ょ粦瀹氫俊鎭��================澶辫触====锛歕n"+ e.getMessage()); + } + return null; + } + /** *鍒嗛〉鏌ヨ璁惧鐩戞祴鍘嗗彶鏁版嵁 * @return */ @@ -1849,6 +1972,42 @@ return null; } /** + *鍒嗛〉鏌ヨ璁惧鐨勪互鍙婁笅灞炰紶鎰熷櫒鏁版嵁鐨勭姸鎬佺粺璁� + * @return + */ + public static BaseResponse<List<FindDeviceStatisticsResponse> > findDeviceStatistics(FindDeviceStatisticsRequest param){ + log.info("銆愬垎椤垫煡璇㈣澶囩殑浠ュ強涓嬪睘浼犳劅鍣ㄦ暟鎹殑鐘舵�佺粺璁°��================寮�濮�===="+JSONObject.toJSONString(param)); + try { + String res = HKTools.findDeviceStatistics(JSONObject.toJSONString(param)); + TypeReference typeReference = + new TypeReference< BaseResponse<List<FindDeviceStatisticsResponse> >>(){}; + BaseResponse<List<FindDeviceStatisticsResponse> > 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<ResourcesByParamsResponse>> resourcesByParams(ResourcesByParamsRequest param){ + log.info("銆愭捣搴锋秷闃茬湅鏉裤�戞牴鎹潯浠舵煡璇㈢洰褰曚笅鏈夋潈闄愮殑璧勬簮鍒楄〃================寮�濮�===="+JSONObject.toJSONString(param)); + try { + String res = HKTools.resourcesByParams(JSONObject.toJSONString(param)); + TypeReference typeReference = + new TypeReference< BaseResponse<BaseListPageResponse<ResourcesByParamsResponse> >>(){}; + BaseResponse<BaseListPageResponse<ResourcesByParamsResponse> > result = JSONObject.parseObject(res, typeReference.getType()); + logResult(result,"銆愭捣搴锋秷闃茬湅鏉裤�戞牴鎹潯浠舵煡璇㈢洰褰曚笅鏈夋潈闄愮殑璧勬簮鍒楄〃"); + return result; + }catch (Exception e){ + log.error("銆愭捣搴锋秷闃茬湅鏉裤�戞牴鎹潯浠舵煡璇㈢洰褰曚笅鏈夋潈闄愮殑璧勬簮鍒楄〃================澶辫触====锛歕n"+ e.getMessage()); + } + return null; + } + /** *娑堥槻鐪嬫澘-4鎶ヨ淇℃伅缁熻 * @return */ @@ -1866,6 +2025,7 @@ } return null; } + /** *鏍规嵁鐢ㄦ埛鏍囪瘑鑾峰彇瀹㈡埛绔疶GC鎺ュ彛 * @return -- Gitblit v1.9.3