Browse Source

新增:
设备列表信息查询接口

wuweihao 4 years ago
parent
commit
93c76fd348

+ 1 - 1
gis_common/src/main/java/com/gis/common/util/DoorUtils.java

@@ -354,7 +354,7 @@ public class DoorUtils {
     public static Result doPostDecrypt(String url, TreeMap<String, Object> param) throws Exception {
         Map<String, Object> encryptMap = encrypt(param);
         log.warn("request param: " + param.toString());
-
+        log.info("request url: "+ url);
         String result = HttpUtil.post(url, encryptMap);
         log.info("result: {}", result);
         JSONObject resultJson = JSON.parseObject(result);

+ 21 - 0
gis_web/src/main/java/com/gis/web/controller/DoorController.java

@@ -35,6 +35,27 @@ public class DoorController  {
     // 正式环境请求域名
     private static String BASE_URL = "https://tfsmy.chengdu.gov.cn/intelligence-access-control-api";
 
+
+    /**
+     * 2021-04-06 新增接口
+     * 2021-04-07 已测试有数据 510124112006001 4
+     *
+     * 返回数据进行了加密,需要解密
+     *
+     */
+    @ApiOperation(value = "设备列表信息查询", notes = "测试: code:510124112006001, type:设备名称 1-门禁 2-道闸 3-消防栓 4-井盖 5-一体机 6-投屏显示器 7-路灯 8-人脸卡口 9-人员聚集 10-气象站")
+    @GetMapping("findDeviceList/{code}/{type}")
+    public Result findVideoInfo(@PathVariable String code, @PathVariable String type) throws Exception {
+        String apiUrl = BASE_URL + "/bi/findDeviceList";
+        TreeMap<String, Object> reqParam = new TreeMap<>();
+        reqParam.put("code", code);
+        reqParam.put("type", type);
+
+        return DoorUtils.doPostDecrypt(apiUrl, reqParam);
+    }
+
+
+
     @ApiOperation("访客总数、近7天每日统计数(测试:510124112006001)")
     @GetMapping("getVisitorCount/{code}")
     public Result getVisitorCount(@PathVariable String code) throws Exception {