k94314517
2024-12-13 ad86a0aa39f20e1b8bb511acd6961c7ec59f9251
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 @@
    *   根据微信公众号信息获取AccessToken
    * @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);
   }
   /**
    *   根据配置微信公众号编号查询微信公众号信息
@@ -822,8 +854,9 @@
   public static String findAlarmBaseDataStatistic(String body) {
      return startDoPostStringArtemis(HKConstants.InterfacePath.findAlarmBaseDataStatistic,body);
   }
   /**
    *安防看板-- 分页查询未处理报警信息6
    *安防看板-- b
    * @param body
    * @return
    */
@@ -831,6 +864,16 @@
      return startDoPostStringArtemis(HKConstants.InterfacePath.findHomeAlarmInfoPage,body);
   }
   /**
    *保存用户及openId绑定信息微信公众号
    * @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