yang 3 rokov pred
rodič
commit
1bfdb5a634

+ 34 - 9
huimv-farm-video/src/main/java/com/huimv/video/dhicc/controller/ClientController/ClientCarManageController.java

@@ -101,7 +101,31 @@ public class ClientCarManageController {
     }
 
 
-     //白名单列表
+    //删除基础车辆
+    @RequestMapping("/deleteFromCarBase")
+    public GeneralResponse deleteFromCarBase (@RequestBody Map<String, Object> params
+    ) throws ClientException {
+        Integer farmId= (int) params.get("farmId");
+        if(farmId!=1){
+            return null ;
+        }
+        List<String > carIdList = (List<String>) params.get("carIdList");
+        System.out.println(carIdList);
+
+        String URL = "/evo-apigw/ipms/car/delete/batch";  //获取事件URL    post请求
+        IClient iClient = new DefaultClient();
+        GeneralRequest generalRequest = new GeneralRequest(URL, Method.POST);
+        System.out.println("开始执行");
+        generalRequest.body(JSON.toJSONString(carIdList));
+        System.out.println(JSON.toJSONString(carIdList));
+        //这种已经在配置文件里面安排了账号ip以及密码
+        generalRequest.header("Content-Type", " application/json");
+        //发起请求处理应答
+        GeneralResponse generalResponse = iClient.doAction(generalRequest, generalRequest.getResponseClass());
+        return generalResponse ;
+    }
+
+        //白名单列表
     @RequestMapping("/ShowCarWhiteList")
     public GeneralResponse ShowCarWhiteList (HttpServletRequest request ,@RequestParam(name = "farmId") Integer farmId,
                                        @RequestParam(name = "pageNum") String pageNum,//车辆编号
@@ -211,12 +235,15 @@ public class ClientCarManageController {
         if(farmId!=1){
             return null ;
         }
+        List<String > carIdList = (List<String>) params.get("carIdList");
+        System.out.println(carIdList);
+
         String URL = "/evo-apigw/ipms/carWhiteList/delete/batch";  //获取事件URL    post请求
         IClient iClient = new DefaultClient();
         GeneralRequest generalRequest = new GeneralRequest(URL, Method.POST);
         System.out.println("开始执行");
-        generalRequest.body(JSON.toJSONString(params));
-        System.out.println(JSON.toJSONString(params));
+        generalRequest.body(JSON.toJSONString(carIdList));
+        System.out.println(JSON.toJSONString(carIdList));
         //这种已经在配置文件里面安排了账号ip以及密码
         generalRequest.header("Content-Type", " application/json");
         //发起请求处理应答
@@ -224,9 +251,6 @@ public class ClientCarManageController {
         return generalResponse ;
     }
 
-
-
-
     //从黑名单删除
     @RequestMapping("/deleteFromCarBlackList")
     public GeneralResponse deleteFromCarBlackList (@RequestBody Map<String, Object> params
@@ -235,12 +259,14 @@ public class ClientCarManageController {
         if(farmId!=1){
             return null ;
         }
+        List<String > carIdList = (List<String>) params.get("carIdList");
+        System.out.println(carIdList);
         String URL = "/evo-apigw/ipms/carBlackList/delete/batch";  //获取事件URL    post请求
         IClient iClient = new DefaultClient();
         GeneralRequest generalRequest = new GeneralRequest(URL, Method.POST);
         System.out.println("开始执行");
-        generalRequest.body(JSON.toJSONString(params));
-        System.out.println(JSON.toJSONString(params));
+        generalRequest.body(JSON.toJSONString(carIdList));
+        System.out.println(JSON.toJSONString(carIdList));
         //这种已经在配置文件里面安排了账号ip以及密码
         generalRequest.header("Content-Type", " application/json");
         //发起请求处理应答
@@ -249,7 +275,6 @@ public class ClientCarManageController {
     }
 
 
-
        //从基础表中删除
     @RequestMapping("/deleteFromBaseCarList")
     public GeneralResponse deleteFromBaseCarList (@RequestBody Map<String, Object> params