From ad86a0aa39f20e1b8bb511acd6961c7ec59f9251 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期五, 13 十二月 2024 17:15:51 +0800
Subject: [PATCH] 代码初始化

---
 server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java |  115 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 107 insertions(+), 8 deletions(-)

diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java
index b3c333a..aad1de4 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java
@@ -312,6 +312,17 @@
 	public static String getTodoListPage(Map<String, String> body)  throws  Exception{
 		return startDoGetStringArtemis(HKConstants.InterfacePath.getTodoListPage,body);
 	}
+
+	/**
+	 *娑堥槻鐪嬫澘-4娓╂箍搴︽暟鎹�
+	 * @param body
+	 * @return
+	 */
+	public static String temperatureHumidityDataStatistic(String body) {
+		return startDoPostStringArtemisAdmin(HKConstants.InterfacePath.temperatureHumidityDataStatistic,body);
+	}
+
+
 	/**
 	 *	鑾峰彇闂ㄧ鐐瑰垪琛�
 	 * @param body
@@ -387,11 +398,29 @@
 		saveInterfaceLog(body,result,path,pathStr[1]);
 		return result;
 	}
+
+
+	public static String startDoPostStringArtemisAdmin(String[] pathStr,String body){
+		Map<String, String> path = getPath(pathStr[0]);
+		Map<String, String> header = new HashMap<>();
+		header.put("userId", "admin");
+		String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", header);// post璇锋眰application/json绫诲瀷鍙傛暟
+		saveInterfaceLog(body,result,path,pathStr[1]);
+		return result;
+	}
+
 	public static String startDoGetStringArtemis(String[] pathStr,Map<String,String> body ){
 		Map<String, String> path = getPath(pathStr[0]);
 		Map<String, String> header = new HashMap<>();
 		header.put("tagId", UUID.randomUUID().toString().replace("-", ""));
 		String result = ArtemisHttpUtil.doGetArtemis(path, body, null, null,  header);
+		saveInterfaceLog(JSONObject.toJSONString(body),result,path,pathStr[1]);
+		return result;
+	}
+	public static String startDoGetStringArtemisJson(String[] pathStr,Map<String,String> body ){
+		Map<String, String> path = getPath(pathStr[0]);
+		Map<String, String> header = new HashMap<>();
+		String result = ArtemisHttpUtil.doGetArtemis(path, body, null, "application/json",  header);
 		saveInterfaceLog(JSONObject.toJSONString(body),result,path,pathStr[1]);
 		return result;
 	}
@@ -402,15 +431,15 @@
 		String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", header);// post璇锋眰application/json绫诲瀷鍙傛暟
 		saveInterfaceLog(body,result,path,pathStr[1]);
 		return result;
-
 	}
+
+
 	public static String startDoPostStringArtemis(String[] pathStr,Map<String, String> querys,Map<String, String> header,String body){
 		Map<String, String> path = getPath(pathStr[0]);
 		header.put("tagId", UUID.randomUUID().toString().replace("-", ""));
 		String result = ArtemisHttpUtil.doPostStringArtemis(path, body, querys, null, "application/json", header);// post璇锋眰application/json绫诲瀷鍙傛暟
 		saveInterfaceLog(body,result,path,pathStr[1]);
 		return result;
-
 	}
 	/**
 	 *	绛剧璁垮棰勭害
@@ -574,10 +603,13 @@
 	 *	鏍规嵁寰俊鍏紬鍙蜂俊鎭幏鍙朅ccessToken
 	 * @return
 	 */
-	public static String wxAccessToken(String configId,String tagId) {
-		String[] wxAccessToken= HKConstants.InterfacePath.wxAccessToken;
-		wxAccessToken[0] = HKConstants.InterfacePath.wxAccessToken+"?tagId="+tagId+"&configId"+configId;
-		return startDoPostStringArtemis(wxAccessToken,"");
+	public static String wxAccessToken(HashMap<String,String> params ) {
+//		String[] wxAccessToken= new String[2];
+//		String url = HKConstants.InterfacePath.wxAccessToken[0]+"?tagId="+tagId+"&configId="+configId;
+//		String t = HKConstants.InterfacePath.wxAccessToken[1];
+//		wxAccessToken[0] = url;
+//		wxAccessToken[1] = t;
+		return startDoGetStringArtemisJson(HKConstants.InterfacePath.wxAccessToken,params);
 	}
 	/**
 	 *	鏍规嵁閰嶇疆寰俊鍏紬鍙风紪鍙锋煡璇㈠井淇″叕浼楀彿淇℃伅
@@ -783,6 +815,73 @@
 		return startDoPostStringArtemis(HKConstants.InterfacePath.energyTrend,body);
 	}
 	/**
+	 * 娑堥槻缁翠繚缁熻
+	 * @param body
+	 * @return
+	 */
+	public static String fireStatistic(String body) {
+		return startDoPostStringArtemis(HKConstants.InterfacePath.fireStatistic,body);
+	}
+	/**
+	 * 娑堥槻缁翠繚姣忔湀鏂板缁熻
+	 * @param body
+	 * @return
+	 */
+	public static String fireStatisticMonth(String body) {
+		return startDoPostStringArtemis(HKConstants.InterfacePath.fireStatisticMonth,body);
+	}
+	/**
+	 * 娑堥槻鐪嬫澘-娑堥槻璁惧鍦ㄧ绾�1
+	 * @param body
+	 * @return
+	 */
+	public static String getFireDevStatusTotal(String body) {
+		return startDoPostStringArtemis(HKConstants.InterfacePath.getFireDevStatusTotal,body);
+	}
+	/**
+	 * 娑堥槻鐪嬫澘-鍚勭被鍨嬭澶囧湪绾跨巼2
+	 * @param body
+	 * @return
+	 */
+	public static String getFireDevStatusList(String body) {
+		return startDoPostStringArtemis(HKConstants.InterfacePath.getFireDevStatusList,body);
+	}
+	/**
+	 *娑堥槻鐪嬫澘-4鎶ヨ淇℃伅缁熻
+	 * @param body
+	 * @return
+	 */
+	public static String findAlarmBaseDataStatistic(String body) {
+		return startDoPostStringArtemis(HKConstants.InterfacePath.findAlarmBaseDataStatistic,body);
+	}
+
+	/**
+	 *瀹夐槻鐪嬫澘-- b
+	 * @param body
+	 * @return
+	 */
+	public static String findHomeAlarmInfoPage(String body) {
+		return startDoPostStringArtemis(HKConstants.InterfacePath.findHomeAlarmInfoPage,body);
+	}
+	/**
+	 *淇濆瓨鐢ㄦ埛鍙妎penId缁戝畾淇℃伅寰俊鍏紬鍙�
+	 * @param body
+	 * @return
+	 */
+	public static String userOpenidSave(String body) {
+		Map<String,String> header = new HashMap<>();
+		header.put("userId","admin");
+		return startDoPostStringArtemis(HKConstants.InterfacePath.userOpenidSave,null,header,body);
+	}
+	/**
+	 *鍒嗛〉鏌ヨ璁惧鐩戞祴鍘嗗彶鏁版嵁
+	 * @param body
+	 * @return
+	 */
+	public static String minitorDataSearch(String body) {
+		return startDoPostStringArtemis(HKConstants.InterfacePath.minitorDataSearch,body);
+	}
+	/**
 	 * 缁熻鍥尯鎬讳綋鐨勫畨闃茶澶囨暟閲忥紝鍦ㄧ嚎鏁般�佸湪绾跨巼銆佺绾挎暟銆佺绾跨巼
 	 * @param body
 	 * @return
@@ -938,9 +1037,9 @@
 		return startDoPostStringArtemis(HKConstants.InterfacePath.applyST,body);
 	}
 
-	public static String getMenuUrl(String menuId, String token) {
+	public static String getMenuUrl(String componentId,String menuId, String token) {
 		String url = HKConstants.InterfacePath.goMenuUrl[0];
-		url = url.replace("${menuId}", menuId).replace("${token}",token);
+		url = url.replace("${componentId}",componentId).replace("${menuId}", menuId).replace("${token}",token);
 		return  url;
 	}
 }

--
Gitblit v1.9.3