Browse Source

大屏接口

523096025 2 years ago
parent
commit
82402e5a44
26 changed files with 1533 additions and 365 deletions
  1. 12 2
      huimv-farm-video/src/main/java/com/huimv/video/dhicc/controller/ClientController/ClientPersonManageController.java
  2. 4 5
      huimv-farm-video/src/main/java/com/huimv/video/dhicc/controller/ScreenController/ScreenAlarmCountByDay.java
  3. 88 49
      huimv-farm-video/src/main/java/com/huimv/video/dhicc/controller/ScreenController/ScreenCarController.java
  4. 5 4
      huimv-farm-video/src/main/java/com/huimv/video/dhicc/controller/ScreenController/ScreenIndexDataController.java
  5. 12 3
      huimv-farm-video/src/main/java/com/huimv/video/dhicc/controller/ScreenController/ScreenPersonController.java
  6. 1 3
      huimv-farm-video/src/main/java/com/huimv/video/dhicc/controller/ScreenController/ScreenSiZhuController.java
  7. 7 0
      huimv-farm-video/src/main/java/com/huimv/video/dhicc/icc/CommonConstant.java
  8. 12 62
      huimv-farm-video/src/main/java/com/huimv/video/dhicc/service/impl/ClientAllEventServiceImpl.java
  9. 86 5
      huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/ScreenTestController/ScreenAlarmCountByDayTest.java
  10. 132 39
      huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/ScreenTestController/ScreenCarTestController.java
  11. 76 27
      huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/ScreenTestController/ScreenIndexDataTestController.java
  12. 145 49
      huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/ScreenTestController/ScreenPersonTestController.java
  13. 130 81
      huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/ScreenTestController/ScreenSiZhuTestController.java
  14. 3 0
      huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/constant/Constant.java
  15. 3 0
      huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/request/Car/Sg/ClientCarListRequestSg.java
  16. 84 0
      huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/request/screenRequest/cn/ClientCarCombinedCn.java
  17. 74 0
      huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/request/screenRequest/cn/ClientCombinedCountRequestCn.java
  18. 77 0
      huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/request/screenRequest/cn/ClientSendMassageXixiaoPersonRequestCn.java
  19. 84 0
      huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/request/screenRequest/hn/ClientCarCombinedHn.java
  20. 73 0
      huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/request/screenRequest/hn/ClientCombinedCountRequestHn.java
  21. 77 0
      huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/request/screenRequest/hn/ClientSendMassageXixiaoPersonRequestHn.java
  22. 84 0
      huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/request/screenRequest/sg/ClientCarCombinedSg.java
  23. 72 0
      huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/request/screenRequest/sg/ClientCombinedCountRequestSg.java
  24. 5 2
      huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/request/ClientSendMassageXixiaoPersonRequestSg.java
  25. 11 0
      huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/utils/UrlStringUtil.java
  26. 176 34
      huimv-farm-video/src/main/java/com/huimv/video/dhicc/util/GetResponse.java

+ 12 - 2
huimv-farm-video/src/main/java/com/huimv/video/dhicc/controller/ClientController/ClientPersonManageController.java

@@ -10,10 +10,14 @@ import com.dahuatech.icc.oauth.model.v202010.GeneralRequest;
 import com.dahuatech.icc.oauth.model.v202010.GeneralResponse;
 import com.dahuatech.icc.oauth.model.v202010.GeneralResponse;
 import com.huimv.common.utils.StringUtilsWork;
 import com.huimv.common.utils.StringUtilsWork;
 import com.huimv.video.dhicc.result.R;
 import com.huimv.video.dhicc.result.R;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo02;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo03;
 import com.huimv.video.dhicc.util.GetResponse;
 import com.huimv.video.dhicc.util.GetResponse;
 import com.huimv.video.dhicc.util.HttpClient;
 import com.huimv.video.dhicc.util.HttpClient;
 import net.sf.json.JSONObject;
 import net.sf.json.JSONObject;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.FileUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.FileCopyUtils;
 import org.springframework.util.FileCopyUtils;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartFile;
@@ -35,7 +39,12 @@ import java.util.*;
 @RestController
 @RestController
 @RequestMapping("person")
 @RequestMapping("person")
 public class ClientPersonManageController {
 public class ClientPersonManageController {
-
+    @Autowired
+    private OauthConfigBaseInfo oauthConfigBaseInfo;
+    @Autowired
+    private OauthConfigBaseInfo02 oauthConfigBaseInfo02;
+    @Autowired
+    private OauthConfigBaseInfo03 oauthConfigBaseInfo03;
     //添加图片
     //添加图片
     @RequestMapping("/addPersonPicture")
     @RequestMapping("/addPersonPicture")
     public R addPersonPicture(@RequestParam(name = "file") MultipartFile multipartFile) throws ClientException, IOException {
     public R addPersonPicture(@RequestParam(name = "file") MultipartFile multipartFile) throws ClientException, IOException {
@@ -212,7 +221,8 @@ public class ClientPersonManageController {
         GeneralResponse generalResponse = iClient.doAction(generalRequest, generalRequest.getResponseClass());
         GeneralResponse generalResponse = iClient.doAction(generalRequest, generalRequest.getResponseClass());
         JSONObject jsonObject = JSONObject.fromObject(generalResponse.getResult());
         JSONObject jsonObject = JSONObject.fromObject(generalResponse.getResult());
         GetResponse getResponse = new GetResponse();
         GetResponse getResponse = new GetResponse();
-        return R.ok("请求成功").put("data", jsonObject).put("total", getResponse.SendMassageGetPagePersonAlarm((String) params1.get("startSwingTime"), (String) params1.get("endSwingTime")));
+        //TODO
+        return R.ok("请求成功").put("data", jsonObject).put("total", getResponse.SendMassageGetPagePersonAlarm((String) params1.get("startSwingTime"), (String) params1.get("endSwingTime"),0,null,oauthConfigBaseInfo));
     }
     }
 
 
 
 

+ 4 - 5
huimv-farm-video/src/main/java/com/huimv/video/dhicc/controller/ScreenController/ScreenAlarmCountByDay.java

@@ -20,8 +20,7 @@ import java.util.*;
 
 
 
 
 @RestController
 @RestController
-@RequestMapping("/screen/alarmCount")
-
+@RequestMapping("/test/screen/alarmCount")
 public class ScreenAlarmCountByDay {
 public class ScreenAlarmCountByDay {
     @Autowired
     @Autowired
     private OauthConfigBaseInfo oauthConfigBaseInfo;
     private OauthConfigBaseInfo oauthConfigBaseInfo;
@@ -55,15 +54,15 @@ public class ScreenAlarmCountByDay {
         //洗消 一周
         //洗消 一周
         Map map1 = new HashMap();
         Map map1 = new HashMap();
         map1.put("name", "车辆洗消");
         map1.put("name", "车辆洗消");
-        map1.put("value", getResponse.SendMassageXixiaoPerson(formatB, formatA,farmId,oauthConfigBaseInfo));
+//        map1.put("value", getResponse.SendMassageXixiaoPerson(formatB, formatA,oauthConfigBaseInfo));
         //人员通过一周---异常
         //人员通过一周---异常
         Map map2 = new HashMap();
         Map map2 = new HashMap();
         map2.put("name", "人员违规");
         map2.put("name", "人员违规");
-        map2.put("value", getResponse.SendMassageGetPagePersonAlarm(formatB, formatA));
+//        map2.put("value", getResponse.SendMassageGetPagePersonAlarm(formatB, formatA,oauthConfigBaseInfo));
         //车辆一周
         //车辆一周
         Map map3 = new HashMap();
         Map map3 = new HashMap();
         map3.put("name", "死猪运输");
         map3.put("name", "死猪运输");
-        map3.put("value", getResponse.SendMassageSiZhuRecord(formatB, formatA));
+//        map3.put("value", getResponse.SendMassageSiZhuRecord(formatB, formatA));
         //烘干事件一周
         //烘干事件一周
         Map map4 = new HashMap();
         Map map4 = new HashMap();
         map4.put("name", "车辆烘干");
         map4.put("name", "车辆烘干");

+ 88 - 49
huimv-farm-video/src/main/java/com/huimv/video/dhicc/controller/ScreenController/ScreenCarController.java

@@ -13,8 +13,7 @@ import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.*;
 
 
 @RestController
 @RestController
-@RequestMapping("/screen/car")
-
+@RequestMapping("/test/screen/car")
 //没有连接ICC的数据库 所以操作比较麻烦
 //没有连接ICC的数据库 所以操作比较麻烦
 public class ScreenCarController {
 public class ScreenCarController {
 
 
@@ -31,12 +30,6 @@ public class ScreenCarController {
     // https://36.26.62.70:447/evo-apigw/ipms/carcapture/find/conditions?pageNum=1&pageSize=10&queryTimeBegin=2021-12-01+00%3A00%3A00&queryTimeEnd=2021-12-01+23%3A59%3A59&_=1638356246174
     // https://36.26.62.70:447/evo-apigw/ipms/carcapture/find/conditions?pageNum=1&pageSize=10&queryTimeBegin=2021-12-01+00%3A00%3A00&queryTimeEnd=2021-12-01+23%3A59%3A59&_=1638356246174
     @RequestMapping("/count_car_record")
     @RequestMapping("/count_car_record")
     public R ddgetCarRecord(HttpServletRequest request, @RequestParam(name = "farmId") Integer farmId) throws ClientException {
     public R ddgetCarRecord(HttpServletRequest request, @RequestParam(name = "farmId") Integer farmId) throws ClientException {
-
-        if (farmId != 1) {
-            //返回为空数据
-            return R.ok("当前牧场无设备").put("data", null);
-        }
-
         GetResponse getResponse = new GetResponse();
         GetResponse getResponse = new GetResponse();
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         Calendar c = Calendar.getInstance();
         Calendar c = Calendar.getInstance();
@@ -79,49 +72,95 @@ public class ScreenCarController {
         String formatH = format.format(H);
         String formatH = format.format(H);
 
 
         List result = new ArrayList();
         List result = new ArrayList();
-
-        Map map1 = new HashMap();
-        map1.put("time", splitTime(B));
-        map1.put("value", getResponse.SendMassageGetPage(formatB, formatA));
-
-        Map map2 = new HashMap();
-        map2.put("time", splitTime(C));
-        map2.put("value", getResponse.SendMassageGetPage(formatC, formatB));
-
-        Map map3 = new HashMap();
-        map3.put("time", splitTime(D));
-        map3.put("value", getResponse.SendMassageGetPage(formatD, formatC));
-
-        Map map4 = new HashMap();
-        map4.put("time", splitTime(E));
-        map4.put("value", getResponse.SendMassageGetPage(formatE, formatD));
-
-
-        Map map5 = new HashMap();
-        map5.put("time", splitTime(F));
-        map5.put("value", getResponse.SendMassageGetPage(formatF, formatE));
-
-
-        Map map6 = new HashMap();
-        map6.put("time", splitTime(G));
-        map6.put("value", getResponse.SendMassageGetPage(formatG, formatF));
-
-        Map map7 = new HashMap();
-        map7.put("time", splitTime(H));
-        map7.put("value", getResponse.SendMassageGetPage(formatH, formatG));
-
-        result.add(map1);
-        result.add(map2);
-        result.add(map3);
-        result.add(map4);
-        result.add(map5);
-        result.add(map6);
-        result.add(map7);
-        //翻转
-        Collections.reverse(result);
-        return R.ok("请求成功").put("data", result);
+        if(farmId == 1){
+            Map map1 = new HashMap();
+            map1.put("time", splitTime(B));
+            map1.put("value", getResponse.SendMassageGetPage(formatB, formatA));
+
+            Map map2 = new HashMap();
+            map2.put("time", splitTime(C));
+            map2.put("value", getResponse.SendMassageGetPage(formatC, formatB));
+
+            Map map3 = new HashMap();
+            map3.put("time", splitTime(D));
+            map3.put("value", getResponse.SendMassageGetPage(formatD, formatC));
+
+            Map map4 = new HashMap();
+            map4.put("time", splitTime(E));
+            map4.put("value", getResponse.SendMassageGetPage(formatE, formatD));
+
+
+            Map map5 = new HashMap();
+            map5.put("time", splitTime(F));
+            map5.put("value", getResponse.SendMassageGetPage(formatF, formatE));
+
+
+            Map map6 = new HashMap();
+            map6.put("time", splitTime(G));
+            map6.put("value", getResponse.SendMassageGetPage(formatG, formatF));
+
+            Map map7 = new HashMap();
+            map7.put("time", splitTime(H));
+            map7.put("value", getResponse.SendMassageGetPage(formatH, formatG));
+
+            result.add(map1);
+            result.add(map2);
+            result.add(map3);
+            result.add(map4);
+            result.add(map5);
+            result.add(map6);
+            result.add(map7);
+            //翻转
+            Collections.reverse(result);
+            return R.ok("请求成功").put("data", result);
+        }
+        //海宁
+        if (farmId == 22){
+            Map map1 = new HashMap();
+            map1.put("time", splitTime(B));
+            map1.put("value", getResponse.SendMassageGetPage(formatB, formatA));
+
+            Map map2 = new HashMap();
+            map2.put("time", splitTime(C));
+            map2.put("value", getResponse.SendMassageGetPage(formatC, formatB));
+
+            Map map3 = new HashMap();
+            map3.put("time", splitTime(D));
+            map3.put("value", getResponse.SendMassageGetPage(formatD, formatC));
+
+            Map map4 = new HashMap();
+            map4.put("time", splitTime(E));
+            map4.put("value", getResponse.SendMassageGetPage(formatE, formatD));
+
+
+            Map map5 = new HashMap();
+            map5.put("time", splitTime(F));
+            map5.put("value", getResponse.SendMassageGetPage(formatF, formatE));
+
+
+            Map map6 = new HashMap();
+            map6.put("time", splitTime(G));
+            map6.put("value", getResponse.SendMassageGetPage(formatG, formatF));
+
+            Map map7 = new HashMap();
+            map7.put("time", splitTime(H));
+            map7.put("value", getResponse.SendMassageGetPage(formatH, formatG));
+
+            result.add(map1);
+            result.add(map2);
+            result.add(map3);
+            result.add(map4);
+            result.add(map5);
+            result.add(map6);
+            result.add(map7);
+            //翻转
+            Collections.reverse(result);
+            return R.ok("请求成功").put("data", result);
+        }
+        return null;
     }
     }
 
 
+
     public String splitTime(Date date) {
     public String splitTime(Date date) {
         Calendar calendar = Calendar.getInstance();
         Calendar calendar = Calendar.getInstance();
         calendar.setTime(date);
         calendar.setTime(date);

+ 5 - 4
huimv-farm-video/src/main/java/com/huimv/video/dhicc/controller/ScreenController/ScreenIndexDataController.java

@@ -3,6 +3,7 @@ package com.huimv.video.dhicc.controller.ScreenController;
 
 
 import com.dahuatech.icc.exception.ClientException;
 import com.dahuatech.icc.exception.ClientException;
 import com.dahuatech.icc.oauth.model.v202010.GeneralResponse;
 import com.dahuatech.icc.oauth.model.v202010.GeneralResponse;
+import com.huimv.video.dhicc.icc.CommonConstant;
 import com.huimv.video.dhicc.result.R;
 import com.huimv.video.dhicc.result.R;
 import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
 import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
 import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo02;
 import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo02;
@@ -22,7 +23,7 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Map;
 
 
 @RestController
 @RestController
-@RequestMapping("/screen/index")
+@RequestMapping("/test/screen/index")
 public class ScreenIndexDataController {
 public class ScreenIndexDataController {
     @Autowired
     @Autowired
     private OauthConfigBaseInfo oauthConfigBaseInfo;
     private OauthConfigBaseInfo oauthConfigBaseInfo;
@@ -64,7 +65,7 @@ public class ScreenIndexDataController {
         //人员刷脸成功
         //人员刷脸成功
         map.put("personPassSuccess", getResponse.SendMassageGetPagePerson(formatB, formatA));
         map.put("personPassSuccess", getResponse.SendMassageGetPagePerson(formatB, formatA));
         //人员刷脸失败
         //人员刷脸失败
-        map.put("personPassFail", getResponse.SendMassageGetPagePersonAlarm(formatB, formatA));
+//        map.put("personPassFail", getResponse.SendMassageGetPagePersonAlarm(formatB, formatA,oauthConfigBaseInfo));
         //车辆出数量统计
         //车辆出数量统计
         map.put("carPassOut", getResponse.SendMassageCarOut(formatB, formatA));
         map.put("carPassOut", getResponse.SendMassageCarOut(formatB, formatA));
         //车辆进
         //车辆进
@@ -74,9 +75,9 @@ public class ScreenIndexDataController {
         //七日死猪事件
         //七日死猪事件
         map.put("SevenDaySiZhu", getResponse.SendCountSiZhu(formatC, formatA));
         map.put("SevenDaySiZhu", getResponse.SendCountSiZhu(formatC, formatA));
         //今日洗消
         //今日洗消
-        map.put("tadayXiXiao", getResponse.SendMassageXixiaoPerson(formatB, formatA,farmId,oauthConfigBaseInfo));
+        map.put("tadayXiXiao", getResponse.SendMassageXixiaoPerson(formatB, formatA,oauthConfigBaseInfo, CommonConstant.XixiaoChannle));
         //七日洗消事件
         //七日洗消事件
-        map.put("SevenDayXIxiao", getResponse.SendMassageXixiaoPerson(formatC, formatA,farmId,oauthConfigBaseInfo));
+        map.put("SevenDayXIxiao", getResponse.SendMassageXixiaoPerson(formatC, formatA,oauthConfigBaseInfo,CommonConstant.SIZhuChannle));
         //大门七日记录数
         //大门七日记录数
         map.put("SevenDayGate", getResponse.SendMassageGateCount(formatC, formatA));
         map.put("SevenDayGate", getResponse.SendMassageGateCount(formatC, formatA));
         //大门今日记录数
         //大门今日记录数

+ 12 - 3
huimv-farm-video/src/main/java/com/huimv/video/dhicc/controller/ScreenController/ScreenPersonController.java

@@ -4,7 +4,11 @@ package com.huimv.video.dhicc.controller.ScreenController;
 import com.dahuatech.icc.exception.ClientException;
 import com.dahuatech.icc.exception.ClientException;
 import com.dahuatech.icc.oauth.model.v202010.GeneralResponse;
 import com.dahuatech.icc.oauth.model.v202010.GeneralResponse;
 import com.huimv.video.dhicc.result.R;
 import com.huimv.video.dhicc.result.R;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo02;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo03;
 import com.huimv.video.dhicc.util.GetResponse;
 import com.huimv.video.dhicc.util.GetResponse;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.bind.annotation.RestController;
@@ -15,9 +19,14 @@ import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.*;
 
 
 @RestController
 @RestController
-@RequestMapping("/screen/person")
+@RequestMapping("/test/screen/person")
 public class ScreenPersonController {
 public class ScreenPersonController {
-
+    @Autowired
+    private OauthConfigBaseInfo oauthConfigBaseInfo;
+    @Autowired
+    private OauthConfigBaseInfo02 oauthConfigBaseInfo02;
+    @Autowired
+    private OauthConfigBaseInfo03 oauthConfigBaseInfo03;
     //成功通行记录
     //成功通行记录
     @RequestMapping("/count_person_record")
     @RequestMapping("/count_person_record")
     public R ddgetCarRecord(HttpServletRequest request, @RequestParam(name = "farmId") Integer farmId) throws ClientException, ParseException {
     public R ddgetCarRecord(HttpServletRequest request, @RequestParam(name = "farmId") Integer farmId) throws ClientException, ParseException {
@@ -138,7 +147,7 @@ public class ScreenPersonController {
 
 
         Map map1 = new HashMap();
         Map map1 = new HashMap();
         map1.put("value1", getResponse.SendMassageGetPagePerson(formatB, formatA));
         map1.put("value1", getResponse.SendMassageGetPagePerson(formatB, formatA));
-        map1.put("value2", getResponse.SendMassageGetPagePersonAlarm(formatB, formatA));
+//        map1.put("value2", getResponse.SendMassageGetPagePersonAlarm(formatB, formatA,oauthConfigBaseInfo));
 
 
         System.out.println();
         System.out.println();
         return R.ok("请求成功").put("data", map1);
         return R.ok("请求成功").put("data", map1);

+ 1 - 3
huimv-farm-video/src/main/java/com/huimv/video/dhicc/controller/ScreenController/ScreenSiZhuController.java

@@ -22,7 +22,7 @@ import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.*;
 
 
 @RestController
 @RestController
-@RequestMapping("/screen/sizhu")
+@RequestMapping("/test/screen/sizhu")
 public class ScreenSiZhuController {
 public class ScreenSiZhuController {
     /**
     /**
      * xuyao   直接都写在这里了
      * xuyao   直接都写在这里了
@@ -37,8 +37,6 @@ public class ScreenSiZhuController {
         if (farmId != 1) {
         if (farmId != 1) {
             return R.ok("当前牧场无设备").put("data", null);
             return R.ok("当前牧场无设备").put("data", null);
         }
         }
-
-
         List result = new ArrayList();
         List result = new ArrayList();
         Map map1 = new HashMap();
         Map map1 = new HashMap();
         map1.put("value1", getPastSevenDay());
         map1.put("value1", getPastSevenDay());

File diff suppressed because it is too large
+ 7 - 0
huimv-farm-video/src/main/java/com/huimv/video/dhicc/icc/CommonConstant.java


+ 12 - 62
huimv-farm-video/src/main/java/com/huimv/video/dhicc/service/impl/ClientAllEventServiceImpl.java

@@ -12,9 +12,13 @@ import com.huimv.common.utils.StringUtilsWork;
 import com.huimv.video.dhicc.icc.CommonConstant;
 import com.huimv.video.dhicc.icc.CommonConstant;
 import com.huimv.video.dhicc.result.R;
 import com.huimv.video.dhicc.result.R;
 import com.huimv.video.dhicc.service.IClientAllEventService;
 import com.huimv.video.dhicc.service.IClientAllEventService;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo02;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo03;
 import com.huimv.video.dhicc.util.GetResponse;
 import com.huimv.video.dhicc.util.GetResponse;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 import net.sf.json.JSONObject;
 import net.sf.json.JSONObject;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -38,6 +42,12 @@ import java.util.Map;
 @Service
 @Service
 @Slf4j
 @Slf4j
 public class ClientAllEventServiceImpl implements IClientAllEventService {
 public class ClientAllEventServiceImpl implements IClientAllEventService {
+    @Autowired
+    private OauthConfigBaseInfo oauthConfigBaseInfo;
+    @Autowired
+    private OauthConfigBaseInfo02 oauthConfigBaseInfo02;
+    @Autowired
+    private OauthConfigBaseInfo03 oauthConfigBaseInfo03;
 
 
     @Override
     @Override
     public R getEventBySort(Integer farmId, Integer sort, String startDateText, String endDateText, Integer pageNum, Integer pageSize, HttpServletRequest request) throws ClientException {
     public R getEventBySort(Integer farmId, Integer sort, String startDateText, String endDateText, Integer pageNum, Integer pageSize, HttpServletRequest request) throws ClientException {
@@ -312,8 +322,8 @@ public class ClientAllEventServiceImpl implements IClientAllEventService {
         GeneralResponse generalResponse = iClient.doAction(generalRequest, generalRequest.getResponseClass());
         GeneralResponse generalResponse = iClient.doAction(generalRequest, generalRequest.getResponseClass());
         JSONObject jsonObject = JSONObject.fromObject(generalResponse.getResult());
         JSONObject jsonObject = JSONObject.fromObject(generalResponse.getResult());
         GetResponse getResponse = new GetResponse();
         GetResponse getResponse = new GetResponse();
-
-        return R.ok("请求成功").put("data", generalResponse).put("total", getResponse.SendMassageGetPagePersonAlarm((String) params1.get("startSwingTime"), (String) params1.get("endSwingTime")));
+        //TODO
+        return R.ok("请求成功").put("data", generalResponse).put("total", getResponse.SendMassageGetPagePersonAlarm((String) params1.get("startSwingTime"), (String) params1.get("endSwingTime"),0,null,oauthConfigBaseInfo));
     }
     }
 
 
     //查询人员违规记录 by Yangdi
     //查询人员违规记录 by Yangdi
@@ -402,65 +412,5 @@ public class ClientAllEventServiceImpl implements IClientAllEventService {
 //        return generalResponse;
 //        return generalResponse;
 //    }
 //    }
 
 
-    public static void main(String[] args) throws ClientException {
-
-        Map<String, Object> params1 = new HashMap<>();
-
-        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-        Calendar c = Calendar.getInstance();
-        Date date = new Date();
-        c.setTime(date);
-        c.set(Calendar.HOUR_OF_DAY, 0);
-        c.set(Calendar.MINUTE, 0);
-        c.set(Calendar.SECOND, 0);
-        //调整天数
-        c.add(Calendar.DATE, 0);
-        Date A = c.getTime();
-        String formatA = format.format(A);
-        c.set(Calendar.HOUR, +24);
-        Date d = c.getTime();
-        String formatD = format.format(d);
-        System.out.println(formatA + formatD);
-
-        System.out.println("########### formatA>>" + formatA);
-        System.out.println("########### formatD>>" + formatD);
 
 
-        params1.put("pageNum", 1);
-        params1.put("pageSize", 20);
-        params1.put("startSwingTime", formatA);
-        params1.put("endSwingTime", formatD);
-//        params1.put("startSwingTime","2021-12-24 00:00:00");
-//        params1.put("endSwingTime","2021-12-24 23:59:59");
-
-        params1.put("containDomain", "1");
-        params1.put("openResult", 0); //刷脸失败
-        String URL = "/evo-apigw/evo-accesscontrol/1.0.0/card/accessControl/swingCardRecord/bycondition/combined?systime=";
-        IClient iClient = new DefaultClient();
-        GeneralRequest generalRequest = new GeneralRequest(URL + Long.valueOf(String.valueOf((new Date()).getTime())), Method.POST);
-        generalRequest.header("Content-Type", " application/json");
-        generalRequest.body(JSON.toJSONString(params1));
-        GeneralResponse generalResponse = iClient.doAction(generalRequest, generalRequest.getResponseClass());
-//        System.out.println("## generalResponse>>"+generalResponse.toString());
-        JSONObject jsonObject = JSONObject.fromObject(generalResponse.getResult());
-//        System.out.println("## getResult>>"+generalResponse.getResult());
-        GetResponse getResponse = new GetResponse();
-
-        System.out.println("total>>" + getResponse.SendMassageGetPagePersonAlarm((String) params1.get("startSwingTime"), (String) params1.get("endSwingTime")));
-        System.out.println(jsonObject.toString());
-//        System.out.println("## 1>>"+JSON.toJSONString(generalResponse.getResult()));
-//        JSON.parseObject(JSON.toJSONString(generalResponse.getResult()));
-//        com.alibaba.fastjson.JSONObject resultJo = (com.alibaba.fastjson.JSONObject) com.alibaba.fastjson.JSONObject.toJSON(generalResponse.getResult());
-//        System.out.println("## resultJo>>"+resultJo);
-        com.alibaba.fastjson.JSONObject grObj = (com.alibaba.fastjson.JSONObject) com.alibaba.fastjson.JSONObject.toJSON(generalResponse);
-        System.out.println("grObj>>" + grObj);
-        com.alibaba.fastjson.JSONObject resultJo = grObj.getJSONObject("result");
-        System.out.println("resultJo>>" + resultJo);
-        com.alibaba.fastjson.JSONObject dataJo = resultJo.getJSONObject("data");
-        System.out.println("dataJo>>" + dataJo);
-        JSONArray pageDataJa = dataJo.getJSONArray("pageData");
-        System.out.println("pageDataJa>>" + pageDataJa);
-        System.out.println("pageDataJa.size>>" + pageDataJa.size());
-
-
-    }
 }
 }

+ 86 - 5
huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/ScreenTestController/ScreenAlarmCountByDayTest.java

@@ -3,6 +3,7 @@ package com.huimv.video.dhicc.test.ScreenTestController;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.dahuatech.icc.exception.ClientException;
 import com.dahuatech.icc.exception.ClientException;
 import com.huimv.video.dhicc.entity.SysTelecomEvent;
 import com.huimv.video.dhicc.entity.SysTelecomEvent;
+import com.huimv.video.dhicc.icc.CommonConstant;
 import com.huimv.video.dhicc.result.R;
 import com.huimv.video.dhicc.result.R;
 import com.huimv.video.dhicc.service.ISysTelecomEventService;
 import com.huimv.video.dhicc.service.ISysTelecomEventService;
 import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
 import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
@@ -21,7 +22,7 @@ import java.util.*;
 
 
 
 
 @RestController
 @RestController
-@RequestMapping("/screen/alarmCount/test")
+@RequestMapping("/screen/alarmCount")
 public class ScreenAlarmCountByDayTest {
 public class ScreenAlarmCountByDayTest {
 
 
 
 
@@ -55,15 +56,15 @@ public class ScreenAlarmCountByDayTest {
             //洗消 一周
             //洗消 一周
             Map map1 = new HashMap();
             Map map1 = new HashMap();
             map1.put("name", "车辆洗消");
             map1.put("name", "车辆洗消");
-            map1.put("value", getResponse.SendMassageXixiaoPerson(formatB, formatA,farmId,oauthConfigBaseInfo));
+            map1.put("value", getResponse.SendMassageXixiaoPerson(formatB, formatA,oauthConfigBaseInfo,CommonConstant.XixiaoChannle));
             //人员通过一周---异常
             //人员通过一周---异常
             Map map2 = new HashMap();
             Map map2 = new HashMap();
             map2.put("name", "人员违规");
             map2.put("name", "人员违规");
-            map2.put("value", getResponse.SendMassageGetPagePersonAlarm(formatB, formatA));
+            map2.put("value", getResponse.SendMassageGetPagePersonAlarm(formatB, formatA,0,null,oauthConfigBaseInfo));
             //车辆一周
             //车辆一周
             Map map3 = new HashMap();
             Map map3 = new HashMap();
             map3.put("name", "死猪运输");
             map3.put("name", "死猪运输");
-            map3.put("value", getResponse.SendMassageSiZhuRecord(formatB, formatA));
+            map3.put("value", getResponse.SendMassageXixiaoPerson(formatB, formatA,oauthConfigBaseInfo, CommonConstant.SIZhuChannle));
             //烘干事件一周
             //烘干事件一周
             Map map4 = new HashMap();
             Map map4 = new HashMap();
             map4.put("name", "车辆烘干");
             map4.put("name", "车辆烘干");
@@ -77,6 +78,86 @@ public class ScreenAlarmCountByDayTest {
             Collections.reverse(result);
             Collections.reverse(result);
             return R.ok("请求成功").put("data", result);
             return R.ok("请求成功").put("data", result);
         }
         }
-        return null;
+
+        if (21 == farmId) {
+            System.out.println("苍南");
+            GetResponse getResponse = new GetResponse();
+            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            Calendar c = Calendar.getInstance();
+            Date date = new Date();
+            c.setTime(date);
+            Date A = c.getTime();
+            String formatA = format.format(A);
+            c.add(Calendar.DATE, -7);
+            Date B = c.getTime();
+            String formatB = format.format(B);
+            List result = new ArrayList();
+
+            //洗消 一周
+            Map map1 = new HashMap();
+            map1.put("name", "车辆洗消");
+            map1.put("value", getResponse.SendMassageXixiaoPerson03(formatB, formatA,oauthConfigBaseInfo03,CommonConstant.Cn_XixiaoChannle));
+            //人员通过一周---异常
+            Map map2 = new HashMap();
+            map2.put("name", "人员违规");
+            map2.put("value", getResponse.SendMassageGetPagePersonAlarm03(formatB, formatA,0,null,oauthConfigBaseInfo03));
+            //车辆一周
+            Map map3 = new HashMap();
+            map3.put("name", "死猪运输");
+            map3.put("value", getResponse.SendMassageXixiaoPerson03(formatB, formatA,oauthConfigBaseInfo03, CommonConstant.Cn_SIZhuChannle));
+            //烘干事件一周
+            Map map4 = new HashMap();
+            map4.put("name", "车辆烘干");
+            map4.put("value", sysTelecomEventService.count(Wrappers.<SysTelecomEvent>lambdaQuery()
+                    .between(SysTelecomEvent::getEventTime, formatB, formatA).eq(SysTelecomEvent::getFarmId,farmId)) + "");
+            result.add(map1);
+            result.add(map2);
+            result.add(map3);
+            result.add(map4);
+            //翻转
+            Collections.reverse(result);
+            return R.ok("请求成功").put("data", result);
+        }
+
+        if (22 == farmId) {
+            System.out.println("海宁");
+            GetResponse getResponse = new GetResponse();
+            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            Calendar c = Calendar.getInstance();
+            Date date = new Date();
+            c.setTime(date);
+            Date A = c.getTime();
+            String formatA = format.format(A);
+            c.add(Calendar.DATE, -7);
+            Date B = c.getTime();
+            String formatB = format.format(B);
+            List result = new ArrayList();
+
+            //洗消 一周
+            Map map1 = new HashMap();
+            map1.put("name", "车辆洗消");
+            map1.put("value", getResponse.SendMassageXixiaoPerson02(formatB, formatA,oauthConfigBaseInfo02,CommonConstant.Hn_XixiaoChannle));
+            //人员通过一周---异常
+            Map map2 = new HashMap();
+            map2.put("name", "人员违规");
+            map2.put("value", getResponse.SendMassageGetPagePersonAlarm02(formatB, formatA,0,null,oauthConfigBaseInfo02));
+            //车辆一周
+            Map map3 = new HashMap();
+            map3.put("name", "死猪运输");
+            map3.put("value", getResponse.SendMassageXixiaoPerson02(formatB, formatA,oauthConfigBaseInfo02, CommonConstant.Hn_SIZhuChannle));
+            //烘干事件一周
+            Map map4 = new HashMap();
+            map4.put("name", "车辆烘干");
+            map4.put("value", sysTelecomEventService.count(Wrappers.<SysTelecomEvent>lambdaQuery()
+                    .between(SysTelecomEvent::getEventTime, formatB, formatA).eq(SysTelecomEvent::getFarmId,farmId)) + "");
+            result.add(map1);
+            result.add(map2);
+            result.add(map3);
+            result.add(map4);
+            //翻转
+            Collections.reverse(result);
+            return R.ok("请求成功").put("data", result);
+        }
+        return R.ok("当前牧场无设备").put("data", null);
     }
     }
 }
 }

+ 132 - 39
huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/ScreenTestController/ScreenCarTestController.java

@@ -3,7 +3,11 @@ package com.huimv.video.dhicc.test.ScreenTestController;
 
 
 import com.dahuatech.icc.exception.ClientException;
 import com.dahuatech.icc.exception.ClientException;
 import com.huimv.video.dhicc.result.R;
 import com.huimv.video.dhicc.result.R;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo02;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo03;
 import com.huimv.video.dhicc.util.GetResponse;
 import com.huimv.video.dhicc.util.GetResponse;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.bind.annotation.RestController;
@@ -13,11 +17,15 @@ import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.*;
 
 
 @RestController
 @RestController
-@RequestMapping("/screen/car/test")
-
+@RequestMapping("/screen/car")
 //没有连接ICC的数据库 所以操作比较麻烦
 //没有连接ICC的数据库 所以操作比较麻烦
 public class ScreenCarTestController {
 public class ScreenCarTestController {
-
+    @Autowired
+    private OauthConfigBaseInfo oauthConfigBaseInfo;
+    @Autowired
+    private OauthConfigBaseInfo02 oauthConfigBaseInfo02;
+    @Autowired
+    private OauthConfigBaseInfo03 oauthConfigBaseInfo03;
 
 
     //过车的数据//这个是车辆闸机的过车数据
     //过车的数据//这个是车辆闸机的过车数据
 
 
@@ -32,11 +40,6 @@ public class ScreenCarTestController {
     @RequestMapping("/count_car_record")
     @RequestMapping("/count_car_record")
     public R ddgetCarRecord(HttpServletRequest request, @RequestParam(name = "farmId") Integer farmId) throws ClientException {
     public R ddgetCarRecord(HttpServletRequest request, @RequestParam(name = "farmId") Integer farmId) throws ClientException {
 
 
-        if (farmId != 1) {
-            //返回为空数据
-            return R.ok("当前牧场无设备").put("data", null);
-        }
-
         GetResponse getResponse = new GetResponse();
         GetResponse getResponse = new GetResponse();
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         Calendar c = Calendar.getInstance();
         Calendar c = Calendar.getInstance();
@@ -80,46 +83,136 @@ public class ScreenCarTestController {
 
 
         List result = new ArrayList();
         List result = new ArrayList();
 
 
-        Map map1 = new HashMap();
-        map1.put("time", splitTime(B));
-        map1.put("value", getResponse.SendMassageGetPage(formatB, formatA));
+        if (1 == farmId){
+            Map map1 = new HashMap();
+            map1.put("time", splitTime(B));
+            map1.put("value", getResponse.carCount(formatB, formatA,null,oauthConfigBaseInfo));
+
+            Map map2 = new HashMap();
+            map2.put("time", splitTime(C));
+            map2.put("value", getResponse.carCount(formatC, formatB,null,oauthConfigBaseInfo));
 
 
-        Map map2 = new HashMap();
-        map2.put("time", splitTime(C));
-        map2.put("value", getResponse.SendMassageGetPage(formatC, formatB));
+            Map map3 = new HashMap();
+            map3.put("time", splitTime(D));
+            map3.put("value", getResponse.carCount(formatD, formatC,null,oauthConfigBaseInfo));
 
 
-        Map map3 = new HashMap();
-        map3.put("time", splitTime(D));
-        map3.put("value", getResponse.SendMassageGetPage(formatD, formatC));
+            Map map4 = new HashMap();
+            map4.put("time", splitTime(E));
+            map4.put("value", getResponse.carCount(formatE, formatD,null,oauthConfigBaseInfo));
 
 
-        Map map4 = new HashMap();
-        map4.put("time", splitTime(E));
-        map4.put("value", getResponse.SendMassageGetPage(formatE, formatD));
 
 
+            Map map5 = new HashMap();
+            map5.put("time", splitTime(F));
+            map5.put("value", getResponse.carCount(formatF, formatE,null,oauthConfigBaseInfo));
 
 
-        Map map5 = new HashMap();
-        map5.put("time", splitTime(F));
-        map5.put("value", getResponse.SendMassageGetPage(formatF, formatE));
 
 
+            Map map6 = new HashMap();
+            map6.put("time", splitTime(G));
+            map6.put("value", getResponse.carCount(formatG, formatF,null,oauthConfigBaseInfo));
+
+            Map map7 = new HashMap();
+            map7.put("time", splitTime(H));
+            map7.put("value", getResponse.carCount(formatH, formatG,null,oauthConfigBaseInfo));
+
+            result.add(map1);
+            result.add(map2);
+            result.add(map3);
+            result.add(map4);
+            result.add(map5);
+            result.add(map6);
+            result.add(map7);
+            //翻转
+            Collections.reverse(result);
+            return R.ok("请求成功").put("data", result);
+        }
+        //海宁
+        if (22 == farmId){
+            Map map1 = new HashMap();
+            map1.put("time", splitTime(B));
+            map1.put("value", getResponse.carCount02(formatB, formatA,null,oauthConfigBaseInfo02));
+
+            Map map2 = new HashMap();
+            map2.put("time", splitTime(C));
+            map2.put("value", getResponse.carCount02(formatB, formatA,null,oauthConfigBaseInfo02));
+
+            Map map3 = new HashMap();
+            map3.put("time", splitTime(D));
+            map3.put("value", getResponse.carCount02(formatD, formatC,null,oauthConfigBaseInfo02));
+
+            Map map4 = new HashMap();
+            map4.put("time", splitTime(E));
+            map4.put("value", getResponse.carCount02(formatE, formatD,null,oauthConfigBaseInfo02));
+
+
+            Map map5 = new HashMap();
+            map5.put("time", splitTime(F));
+            map5.put("value", getResponse.carCount02(formatF, formatE,null,oauthConfigBaseInfo02));
+
+
+            Map map6 = new HashMap();
+            map6.put("time", splitTime(G));
+            map6.put("value", getResponse.carCount02(formatG, formatF,null,oauthConfigBaseInfo02));
+
+            Map map7 = new HashMap();
+            map7.put("time", splitTime(H));
+            map7.put("value", getResponse.carCount02(formatH, formatG,null,oauthConfigBaseInfo02));
+
+            result.add(map1);
+            result.add(map2);
+            result.add(map3);
+            result.add(map4);
+            result.add(map5);
+            result.add(map6);
+            result.add(map7);
+            //翻转
+            Collections.reverse(result);
+            return R.ok("请求成功").put("data", result);
+        }
+        //苍南
+        if (23 == farmId){
 
 
-        Map map6 = new HashMap();
-        map6.put("time", splitTime(G));
-        map6.put("value", getResponse.SendMassageGetPage(formatG, formatF));
+            Map map1 = new HashMap();
+            map1.put("time", splitTime(B));
+            map1.put("value", getResponse.carCount03(formatB, formatA,null,oauthConfigBaseInfo03));
 
 
-        Map map7 = new HashMap();
-        map7.put("time", splitTime(H));
-        map7.put("value", getResponse.SendMassageGetPage(formatH, formatG));
+            Map map2 = new HashMap();
+            map2.put("time", splitTime(C));
+            map2.put("value", getResponse.carCount03(formatB, formatA,null,oauthConfigBaseInfo03));
 
 
-        result.add(map1);
-        result.add(map2);
-        result.add(map3);
-        result.add(map4);
-        result.add(map5);
-        result.add(map6);
-        result.add(map7);
-        //翻转
-        Collections.reverse(result);
-        return R.ok("请求成功").put("data", result);
+            Map map3 = new HashMap();
+            map3.put("time", splitTime(D));
+            map3.put("value", getResponse.carCount03(formatD, formatC,null,oauthConfigBaseInfo03));
+
+            Map map4 = new HashMap();
+            map4.put("time", splitTime(E));
+            map4.put("value", getResponse.carCount03(formatE, formatD,null,oauthConfigBaseInfo03));
+
+
+            Map map5 = new HashMap();
+            map5.put("time", splitTime(F));
+            map5.put("value", getResponse.carCount03(formatF, formatE,null,oauthConfigBaseInfo03));
+
+
+            Map map6 = new HashMap();
+            map6.put("time", splitTime(G));
+            map6.put("value", getResponse.carCount03(formatG, formatF,null,oauthConfigBaseInfo03));
+
+            Map map7 = new HashMap();
+            map7.put("time", splitTime(H));
+            map7.put("value", getResponse.carCount03(formatH, formatG,null,oauthConfigBaseInfo03));
+
+            result.add(map1);
+            result.add(map2);
+            result.add(map3);
+            result.add(map4);
+            result.add(map5);
+            result.add(map6);
+            result.add(map7);
+            //翻转
+            Collections.reverse(result);
+            return R.ok("请求成功").put("data", result);
+        }
+        return R.ok("当前牧场无设备").put("data", null);
     }
     }
 
 
     public String splitTime(Date date) {
     public String splitTime(Date date) {

+ 76 - 27
huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/ScreenTestController/ScreenIndexDataTestController.java

@@ -2,6 +2,7 @@ package com.huimv.video.dhicc.test.ScreenTestController;
 
 
 
 
 import com.dahuatech.icc.exception.ClientException;
 import com.dahuatech.icc.exception.ClientException;
+import com.huimv.video.dhicc.icc.CommonConstant;
 import com.huimv.video.dhicc.result.R;
 import com.huimv.video.dhicc.result.R;
 import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
 import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
 import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo02;
 import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo02;
@@ -21,7 +22,7 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Map;
 
 
 @RestController
 @RestController
-@RequestMapping("/screen/index/test")
+@RequestMapping("/screen/index")
 public class ScreenIndexDataTestController {
 public class ScreenIndexDataTestController {
 
 
     @Autowired
     @Autowired
@@ -33,11 +34,6 @@ public class ScreenIndexDataTestController {
     //返回大屏首页的数据
     //返回大屏首页的数据
     @RequestMapping("/dataList")
     @RequestMapping("/dataList")
     public R indexDataList(HttpServletRequest request, @RequestParam(name = "farmId") Integer farmId) throws ClientException, ParseException {
     public R indexDataList(HttpServletRequest request, @RequestParam(name = "farmId") Integer farmId) throws ClientException, ParseException {
-        if (farmId != 1) {
-            //返回为空数据
-            return R.ok("当前牧场无设备").put("data", null);
-        }
-
         GetResponse getResponse = new GetResponse();
         GetResponse getResponse = new GetResponse();
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         Map map = new HashMap<>();
         Map map = new HashMap<>();
@@ -61,28 +57,81 @@ public class ScreenIndexDataTestController {
         String formatC = format.format(C);
         String formatC = format.format(C);
 
 
         System.out.println(formatA + formatB);
         System.out.println(formatA + formatB);
-        //人员刷脸成功
-        map.put("personPassSuccess", getResponse.SendMassageGetPagePerson(formatB, formatA));
-        //人员刷脸失败
-        map.put("personPassFail", getResponse.SendMassageGetPagePersonAlarm(formatB, formatA));
-        //车辆出数量统计
-        map.put("carPassOut", getResponse.SendMassageCarOut(formatB, formatA));
-        //车辆进
-        map.put("carPassIn", getResponse.SendMassageCarIn(formatB, formatA));
-        //死猪
-        map.put("tadaySiZhu", getResponse.SendCountSiZhu(formatB, formatA));
-        //七日死猪事件
-        map.put("SevenDaySiZhu", getResponse.SendCountSiZhu(formatC, formatA));
-        //今日洗消
-        map.put("tadayXiXiao", getResponse.SendMassageXixiaoPerson(formatB, formatA,farmId,oauthConfigBaseInfo));
-        //七日洗消事件
-        map.put("SevenDayXIxiao", getResponse.SendMassageXixiaoPerson(formatC, formatA,farmId,oauthConfigBaseInfo));
-        //大门七日记录数
-        map.put("SevenDayGate", getResponse.SendMassageGateCount(formatC, formatA));
-        //大门今日记录数
-        map.put("tadayGate", getResponse.SendMassageGateCount(formatB, formatA));
+        if (farmId ==1){
+            //人员刷脸成功
+            map.put("personPassSuccess", getResponse.SendMassageGetPagePersonAlarm(formatB, formatA,null,61,oauthConfigBaseInfo));
+            //人员刷脸失败
+            map.put("personPassFail", getResponse.SendMassageGetPagePersonAlarm(formatB, formatA,0,null,oauthConfigBaseInfo));
+            //车辆出数量统计
+            map.put("carPassOut", getResponse.carCount(formatB, formatA,"9",oauthConfigBaseInfo));
+            //车辆进
+            map.put("carPassIn", getResponse.carCount(formatB, formatA,"8",oauthConfigBaseInfo));
+            //死猪
+            map.put("tadaySiZhu", getResponse.SendMassageXixiaoPerson(formatB, formatA,oauthConfigBaseInfo,CommonConstant.SIZhuChannle));
+            //七日死猪事件
+            map.put("SevenDaySiZhu", getResponse.SendMassageXixiaoPerson(formatC, formatA,oauthConfigBaseInfo,CommonConstant.SIZhuChannle));
+            //今日洗消
+            map.put("tadayXiXiao", getResponse.SendMassageXixiaoPerson(formatB, formatA,oauthConfigBaseInfo, CommonConstant.XixiaoChannle));
+            //七日洗消事件
+            map.put("SevenDayXIxiao", getResponse.SendMassageXixiaoPerson(formatC, formatA,oauthConfigBaseInfo, CommonConstant.XixiaoChannle));
+            //大门七日记录数
+            map.put("SevenDayGate", getResponse.SendMassageXixiaoPerson(formatC, formatA,oauthConfigBaseInfo,CommonConstant.DoorChannle));
+            //大门今日记录数
+            map.put("tadayGate", getResponse.SendMassageXixiaoPerson(formatB, formatA,oauthConfigBaseInfo,CommonConstant.DoorChannle));
+
+            return R.ok("请求成功").put("data", map);
+        }
+        //海宁
+        if (farmId == 22){
+            //人员刷脸成功
+            map.put("personPassSuccess", getResponse.SendMassageGetPagePersonAlarm02(formatB, formatA,null,61,oauthConfigBaseInfo02));
+            //人员刷脸失败
+            map.put("personPassFail", getResponse.SendMassageGetPagePersonAlarm02(formatB, formatA,0,null,oauthConfigBaseInfo02));
+            //车辆出数量统计
+            map.put("carPassOut", getResponse.carCount02(formatB, formatA,"9",oauthConfigBaseInfo02));
+            //车辆进
+            map.put("carPassIn", getResponse.carCount02(formatB, formatA,"8",oauthConfigBaseInfo02));
+            //死猪
+            map.put("tadaySiZhu", getResponse.SendMassageXixiaoPerson02(formatB, formatA,oauthConfigBaseInfo02,CommonConstant.SIZhuChannle));
+            //七日死猪事件
+            map.put("SevenDaySiZhu", getResponse.SendMassageXixiaoPerson02(formatC, formatA,oauthConfigBaseInfo02,CommonConstant.SIZhuChannle));
+            //今日洗消
+            map.put("tadayXiXiao", getResponse.SendMassageXixiaoPerson02(formatB, formatA,oauthConfigBaseInfo02, CommonConstant.XixiaoChannle));
+            //七日洗消事件
+            map.put("SevenDayXIxiao", getResponse.SendMassageXixiaoPerson02(formatC, formatA,oauthConfigBaseInfo02, CommonConstant.XixiaoChannle));
+            //大门七日记录数
+            map.put("SevenDayGate", getResponse.SendMassageXixiaoPerson02(formatC, formatA,oauthConfigBaseInfo02,CommonConstant.DoorChannle));
+            //大门今日记录数
+            map.put("tadayGate", getResponse.SendMassageXixiaoPerson02(formatB, formatA,oauthConfigBaseInfo02,CommonConstant.DoorChannle));
 
 
-        return R.ok("请求成功").put("data", map);
+            return R.ok("请求成功").put("data", map);
+        }
+        //苍南
+        if (farmId == 21){
+            //人员刷脸成功
+            map.put("personPassSuccess", getResponse.SendMassageGetPagePersonAlarm(formatB, formatA,null,61,oauthConfigBaseInfo));
+            //人员刷脸失败
+            map.put("personPassFail", getResponse.SendMassageGetPagePersonAlarm(formatB, formatA,0,null,oauthConfigBaseInfo));
+            //车辆出数量统计
+            map.put("carPassOut", getResponse.carCount(formatB, formatA,"9",oauthConfigBaseInfo));
+            //车辆进
+            map.put("carPassIn", getResponse.carCount(formatB, formatA,"8",oauthConfigBaseInfo));
+            //死猪
+            map.put("tadaySiZhu", getResponse.SendMassageXixiaoPerson(formatB, formatA,oauthConfigBaseInfo,CommonConstant.SIZhuChannle));
+            //七日死猪事件
+            map.put("SevenDaySiZhu", getResponse.SendMassageXixiaoPerson(formatC, formatA,oauthConfigBaseInfo,CommonConstant.SIZhuChannle));
+            //今日洗消
+            map.put("tadayXiXiao", getResponse.SendMassageXixiaoPerson(formatB, formatA,oauthConfigBaseInfo, CommonConstant.XixiaoChannle));
+            //七日洗消事件
+            map.put("SevenDayXIxiao", getResponse.SendMassageXixiaoPerson(formatC, formatA,oauthConfigBaseInfo, CommonConstant.XixiaoChannle));
+            //大门七日记录数
+            map.put("SevenDayGate", getResponse.SendMassageXixiaoPerson(formatC, formatA,oauthConfigBaseInfo,CommonConstant.DoorChannle));
+            //大门今日记录数
+            map.put("tadayGate", getResponse.SendMassageXixiaoPerson(formatB, formatA,oauthConfigBaseInfo,CommonConstant.DoorChannle));
+
+            return R.ok("请求成功").put("data", map);
+        }
 
 
+        return R.ok("当前牧场无设备").put("data", null);
     }
     }
 }
 }

+ 145 - 49
huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/ScreenTestController/ScreenPersonTestController.java

@@ -3,7 +3,11 @@ package com.huimv.video.dhicc.test.ScreenTestController;
 
 
 import com.dahuatech.icc.exception.ClientException;
 import com.dahuatech.icc.exception.ClientException;
 import com.huimv.video.dhicc.result.R;
 import com.huimv.video.dhicc.result.R;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo02;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo03;
 import com.huimv.video.dhicc.util.GetResponse;
 import com.huimv.video.dhicc.util.GetResponse;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.bind.annotation.RestController;
@@ -14,18 +18,17 @@ import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.*;
 
 
 @RestController
 @RestController
-@RequestMapping("/screen/person/test")
+@RequestMapping("/screen/person")
 public class ScreenPersonTestController {
 public class ScreenPersonTestController {
-
+    @Autowired
+    private OauthConfigBaseInfo oauthConfigBaseInfo;
+    @Autowired
+    private OauthConfigBaseInfo02 oauthConfigBaseInfo02;
+    @Autowired
+    private OauthConfigBaseInfo03 oauthConfigBaseInfo03;
     //成功通行记录
     //成功通行记录
     @RequestMapping("/count_person_record")
     @RequestMapping("/count_person_record")
     public R ddgetCarRecord(HttpServletRequest request, @RequestParam(name = "farmId") Integer farmId) throws ClientException, ParseException {
     public R ddgetCarRecord(HttpServletRequest request, @RequestParam(name = "farmId") Integer farmId) throws ClientException, ParseException {
-
-        if (farmId != 1) {
-            //返回为空数据
-            return R.ok("当前牧场无设备").put("data", null);
-        }
-
         GetResponse getResponse = new GetResponse();
         GetResponse getResponse = new GetResponse();
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         Calendar c = Calendar.getInstance();
         Calendar c = Calendar.getInstance();
@@ -66,47 +69,140 @@ public class ScreenPersonTestController {
         Date H = c.getTime();
         Date H = c.getTime();
         String formatH = format.format(H);
         String formatH = format.format(H);
 
 
-        List result = new ArrayList();
+        if (farmId == 1) {
+            List result = new ArrayList();
 
 
-        Map map1 = new HashMap();
-        map1.put("time", splitTimeByHoure(B));
-        map1.put("value", getResponse.SendMassageGetPage(formatB, formatA));
-
-        Map map2 = new HashMap();
-        map2.put("time", splitTimeByHoure(C));
-        map2.put("value", getResponse.SendMassageGetPage(formatC, formatB));
-
-        Map map3 = new HashMap();
-        map3.put("time", splitTimeByHoure(D));
-        map3.put("value", getResponse.SendMassageGetPage(formatD, formatC));
-
-        Map map4 = new HashMap();
-        map4.put("time", splitTimeByHoure(E));
-        map4.put("value", getResponse.SendMassageGetPage(formatE, formatD));
-
-        Map map5 = new HashMap();
-        map5.put("time", splitTimeByHoure(F));
-        map5.put("value", getResponse.SendMassageGetPage(formatF, formatE));
-
-
-        Map map6 = new HashMap();
-        map6.put("time", splitTimeByHoure(G));
-        map6.put("value", getResponse.SendMassageGetPage(formatG, formatF));
-
-        Map map7 = new HashMap();
-        map7.put("time", splitTimeByHoure(H));
-        map7.put("value", getResponse.SendMassageGetPage(formatH, formatG));
-
-        result.add(map1);
-        result.add(map2);
-        result.add(map3);
-        result.add(map4);
-        result.add(map5);
-        result.add(map6);
-        result.add(map7);
-        //翻转
-        Collections.reverse(result);
-        return R.ok("请求成功").put("data", result);
+            Map map1 = new HashMap();
+            map1.put("time", splitTimeByHoure(B));
+            map1.put("value", getResponse.SendMassageGetPagePersonAlarm(formatB, formatA,null,61,oauthConfigBaseInfo));
+
+            Map map2 = new HashMap();
+            map2.put("time", splitTimeByHoure(C));
+            map2.put("value", getResponse.SendMassageGetPagePersonAlarm(formatC, formatB,null,61,oauthConfigBaseInfo));
+
+            Map map3 = new HashMap();
+            map3.put("time", splitTimeByHoure(D));
+            map3.put("value", getResponse.SendMassageGetPagePersonAlarm(formatD, formatC,null,61,oauthConfigBaseInfo));
+
+            Map map4 = new HashMap();
+            map4.put("time", splitTimeByHoure(E));
+            map4.put("value", getResponse.SendMassageGetPagePersonAlarm(formatE, formatD,null,61,oauthConfigBaseInfo));
+
+            Map map5 = new HashMap();
+            map5.put("time", splitTimeByHoure(F));
+            map5.put("value", getResponse.SendMassageGetPagePersonAlarm(formatF, formatE,null,61,oauthConfigBaseInfo));
+
+
+            Map map6 = new HashMap();
+            map6.put("time", splitTimeByHoure(G));
+            map6.put("value", getResponse.SendMassageGetPagePersonAlarm(formatG, formatF,null,61,oauthConfigBaseInfo));
+
+            Map map7 = new HashMap();
+            map7.put("time", splitTimeByHoure(H));
+            map7.put("value", getResponse.SendMassageGetPagePersonAlarm(formatH, formatG,null,61,oauthConfigBaseInfo));
+
+            result.add(map1);
+            result.add(map2);
+            result.add(map3);
+            result.add(map4);
+            result.add(map5);
+            result.add(map6);
+            result.add(map7);
+            //翻转
+            Collections.reverse(result);
+            return R.ok("请求成功").put("data", result);
+        }
+        if (farmId == 22) {
+            List result = new ArrayList();
+
+            Map map1 = new HashMap();
+            map1.put("time", splitTimeByHoure(B));
+            map1.put("value", getResponse.SendMassageGetPagePersonAlarm02(formatB, formatA,null,61,oauthConfigBaseInfo02));
+
+            Map map2 = new HashMap();
+            map2.put("time", splitTimeByHoure(C));
+            map2.put("value", getResponse.SendMassageGetPagePersonAlarm02(formatC, formatB,null,61,oauthConfigBaseInfo02));
+
+            Map map3 = new HashMap();
+            map3.put("time", splitTimeByHoure(D));
+            map3.put("value", getResponse.SendMassageGetPagePersonAlarm02(formatD, formatC,null,61,oauthConfigBaseInfo02));
+
+            Map map4 = new HashMap();
+            map4.put("time", splitTimeByHoure(E));
+            map4.put("value", getResponse.SendMassageGetPagePersonAlarm02(formatE, formatD,null,61,oauthConfigBaseInfo02));
+
+            Map map5 = new HashMap();
+            map5.put("time", splitTimeByHoure(F));
+            map5.put("value", getResponse.SendMassageGetPagePersonAlarm02(formatF, formatE,null,61,oauthConfigBaseInfo02));
+
+
+            Map map6 = new HashMap();
+            map6.put("time", splitTimeByHoure(G));
+            map6.put("value", getResponse.SendMassageGetPagePersonAlarm02(formatG, formatF,null,61,oauthConfigBaseInfo02));
+
+            Map map7 = new HashMap();
+            map7.put("time", splitTimeByHoure(H));
+            map7.put("value", getResponse.SendMassageGetPagePersonAlarm02(formatH, formatG,null,61,oauthConfigBaseInfo02));
+
+            result.add(map1);
+            result.add(map2);
+            result.add(map3);
+            result.add(map4);
+            result.add(map5);
+            result.add(map6);
+            result.add(map7);
+            //翻转
+            Collections.reverse(result);
+            return R.ok("请求成功").put("data", result);
+        }
+
+        if (farmId == 21) {
+            List result = new ArrayList();
+
+            Map map1 = new HashMap();
+            map1.put("time", splitTimeByHoure(B));
+            map1.put("value", getResponse.SendMassageGetPagePersonAlarm03(formatB, formatA,null,61,oauthConfigBaseInfo03));
+
+            Map map2 = new HashMap();
+            map2.put("time", splitTimeByHoure(C));
+            map2.put("value", getResponse.SendMassageGetPagePersonAlarm03(formatC, formatB,null,61,oauthConfigBaseInfo03));
+
+            Map map3 = new HashMap();
+            map3.put("time", splitTimeByHoure(D));
+            map3.put("value", getResponse.SendMassageGetPagePersonAlarm03(formatD, formatC,null,61,oauthConfigBaseInfo03));
+
+            Map map4 = new HashMap();
+            map4.put("time", splitTimeByHoure(E));
+            map4.put("value", getResponse.SendMassageGetPagePersonAlarm03(formatE, formatD,null,61,oauthConfigBaseInfo03));
+
+            Map map5 = new HashMap();
+            map5.put("time", splitTimeByHoure(F));
+            map5.put("value", getResponse.SendMassageGetPagePersonAlarm03(formatF, formatE,null,61,oauthConfigBaseInfo03));
+
+
+            Map map6 = new HashMap();
+            map6.put("time", splitTimeByHoure(G));
+            map6.put("value", getResponse.SendMassageGetPagePersonAlarm03(formatG, formatF,null,61,oauthConfigBaseInfo03));
+
+            Map map7 = new HashMap();
+            map7.put("time", splitTimeByHoure(H));
+            map7.put("value", getResponse.SendMassageGetPagePersonAlarm03(formatH, formatG,null,61,oauthConfigBaseInfo03));
+
+            result.add(map1);
+            result.add(map2);
+            result.add(map3);
+            result.add(map4);
+            result.add(map5);
+            result.add(map6);
+            result.add(map7);
+            //翻转
+            Collections.reverse(result);
+            return R.ok("请求成功").put("data", result);
+        }
+
+
+
+        return R.ok("当前牧场无设备").put("data", null);
     }
     }
 
 
 
 
@@ -137,7 +233,7 @@ public class ScreenPersonTestController {
 
 
         Map map1 = new HashMap();
         Map map1 = new HashMap();
         map1.put("value1", getResponse.SendMassageGetPagePerson(formatB, formatA));
         map1.put("value1", getResponse.SendMassageGetPagePerson(formatB, formatA));
-        map1.put("value2", getResponse.SendMassageGetPagePersonAlarm(formatB, formatA));
+//        map1.put("value2", getResponse.SendMassageGetPagePersonAlarm(formatB, formatA,oauthConfigBaseInfo));
 
 
         System.out.println();
         System.out.println();
         return R.ok("请求成功").put("data", map1);
         return R.ok("请求成功").put("data", map1);

+ 130 - 81
huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/ScreenTestController/ScreenSiZhuTestController.java

@@ -2,6 +2,7 @@ package com.huimv.video.dhicc.test.ScreenTestController;
 
 
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.ObjectUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.dahuatech.hutool.http.Method;
 import com.dahuatech.hutool.http.Method;
 import com.dahuatech.icc.exception.ClientException;
 import com.dahuatech.icc.exception.ClientException;
 import com.dahuatech.icc.oauth.http.DefaultClient;
 import com.dahuatech.icc.oauth.http.DefaultClient;
@@ -10,8 +11,18 @@ import com.dahuatech.icc.oauth.model.v202010.GeneralRequest;
 import com.dahuatech.icc.oauth.model.v202010.GeneralResponse;
 import com.dahuatech.icc.oauth.model.v202010.GeneralResponse;
 import com.huimv.video.dhicc.icc.CommonConstant;
 import com.huimv.video.dhicc.icc.CommonConstant;
 import com.huimv.video.dhicc.result.R;
 import com.huimv.video.dhicc.result.R;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo02;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo03;
+import com.huimv.video.dhicc.test.request.XunZhengRequest.Cn.XunZhengRequestCn;
+import com.huimv.video.dhicc.test.request.XunZhengRequest.Hn.XunZhengRequestHn;
+import com.huimv.video.dhicc.test.request.XunZhengRequest.Sg.XunZhengCountRequestSg;
+import com.huimv.video.dhicc.test.request.XunZhengRequest.Sg.XunZhengRequestSg;
+import com.huimv.video.dhicc.test.token.Token;
 import com.huimv.video.dhicc.util.GetResponse;
 import com.huimv.video.dhicc.util.GetResponse;
+import jdk.nashorn.internal.runtime.regexp.JoniRegExp;
 import net.sf.json.JSONObject;
 import net.sf.json.JSONObject;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.bind.annotation.RestController;
@@ -22,8 +33,15 @@ import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.*;
 
 
 @RestController
 @RestController
-@RequestMapping("/screen/sizhu/test")
+@RequestMapping("/screen/sizhu")
 public class ScreenSiZhuTestController {
 public class ScreenSiZhuTestController {
+    @Autowired
+    private OauthConfigBaseInfo oauthConfigBaseInfo;
+    @Autowired
+    private OauthConfigBaseInfo02 oauthConfigBaseInfo02;
+    @Autowired
+    private OauthConfigBaseInfo03 oauthConfigBaseInfo03;
+
     /**
     /**
      * xuyao   直接都写在这里了
      * xuyao   直接都写在这里了
      *
      *
@@ -34,41 +52,27 @@ public class ScreenSiZhuTestController {
      */
      */
     @RequestMapping("/count_sizhu_record")
     @RequestMapping("/count_sizhu_record")
     public R count_sizhu_record(HttpServletRequest request, @RequestParam(name = "farmId") Integer farmId) throws ClientException, ParseException {
     public R count_sizhu_record(HttpServletRequest request, @RequestParam(name = "farmId") Integer farmId) throws ClientException, ParseException {
-        if (farmId != 1) {
-            return R.ok("当前牧场无设备").put("data", null);
-        }
-
-
-        List result = new ArrayList();
         Map map1 = new HashMap();
         Map map1 = new HashMap();
-        map1.put("value1", getPastSevenDay());
-        map1.put("value2", getDay());
-        map1.put("value3", getLatestOne());
-        return R.ok("请求成功").put("data", map1);
+        map1.put("value1", getPastSevenDay(farmId));
+        map1.put("value2", getDay(farmId));
+        String latestOne = getLatestOne(farmId);
+        map1.put("value3",latestOne );
+        if (StringUtils.isNotBlank(latestOne)){
+            return R.ok("请求成功").put("data", map1);
+        }
+        return R.ok("当前牧场无设备").put("data", null);
     }
     }
-
-
-    /**
-     * xuyao   直接都写在这里了
-     *
-     * @param request
-     * @return 查询事件
-     * @throws ClientException
-     * @throws ParseException  写一个查左右的  事件都拿过来 存起来 建新的表来处理
-     */
     @RequestMapping("/SiZhuList")
     @RequestMapping("/SiZhuList")
     public R SiZhuList(HttpServletRequest request, @RequestParam(name = "farmId") Integer farmId) throws ClientException, ParseException {
     public R SiZhuList(HttpServletRequest request, @RequestParam(name = "farmId") Integer farmId) throws ClientException, ParseException {
-
-        if (farmId != 1) {
-            return R.ok("当前牧场无设备").put("data", null);
+        GeneralResponse siZhuList = getSiZhuList(farmId);
+        if (ObjectUtil.isNotEmpty(siZhuList)){
+            return R.ok("请求成功").put("data", siZhuList);
         }
         }
-
-        return R.ok("请求成功").put("data", getSiZhuList());
+        return R.ok("当前牧场无设备").put("data", null);
     }
     }
 
 
-
     //过去七天的值
     //过去七天的值
-    public String getPastSevenDay() throws ClientException {
+    public String getPastSevenDay(Integer farmId) throws ClientException {
         GetResponse getResponse = new GetResponse();
         GetResponse getResponse = new GetResponse();
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         Calendar c = Calendar.getInstance();
         Calendar c = Calendar.getInstance();
@@ -83,12 +87,22 @@ public class ScreenSiZhuTestController {
         c.add(Calendar.DATE, -7);
         c.add(Calendar.DATE, -7);
         Date B = c.getTime();
         Date B = c.getTime();
         String formatB = format.format(B);
         String formatB = format.format(B);
-        return getResponse.SendCountSiZhu(formatB, formatA);
+        if (farmId == 1){
+            return  getResponse.SendMassageXixiaoPerson(formatB, formatA,oauthConfigBaseInfo,CommonConstant.SIZhuChannle);
+        }
+        if (farmId == 22){
+            return  getResponse.SendMassageXixiaoPerson02(formatB, formatA,oauthConfigBaseInfo02,CommonConstant.SIZhuChannle);
+        }
+        if (farmId == 21){
+            return  getResponse.SendMassageXixiaoPerson03(formatB, formatA,oauthConfigBaseInfo03,CommonConstant.SIZhuChannle);
+        }
+        return "0";
+
     }
     }
 
 
 
 
     //今天的数据
     //今天的数据
-    public String getDay() throws ClientException {
+    public String getDay(Integer farmId) throws ClientException {
         GetResponse getResponse = new GetResponse();
         GetResponse getResponse = new GetResponse();
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         Calendar c = Calendar.getInstance();
         Calendar c = Calendar.getInstance();
@@ -103,12 +117,21 @@ public class ScreenSiZhuTestController {
         c.add(Calendar.DATE, -1);
         c.add(Calendar.DATE, -1);
         Date B = c.getTime();
         Date B = c.getTime();
         String formatB = format.format(B);
         String formatB = format.format(B);
-        return getResponse.SendCountSiZhu(formatB, formatA);
+        if (farmId == 1){
+            return  getResponse.SendMassageXixiaoPerson(formatB, formatA,oauthConfigBaseInfo,CommonConstant.SIZhuChannle);
+        }
+        if (farmId == 22){
+            return  getResponse.SendMassageXixiaoPerson02(formatB, formatA,oauthConfigBaseInfo02,CommonConstant.SIZhuChannle);
+        }
+        if (farmId == 21){
+            return  getResponse.SendMassageXixiaoPerson03(formatB, formatA,oauthConfigBaseInfo03,CommonConstant.SIZhuChannle);
+        }
+        return "0";
     }
     }
 
 
 
 
     //最新一条的数据
     //最新一条的数据
-    public String getLatestOne() throws ClientException {
+    public String getLatestOne(Integer farmId)   {
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         Calendar c = Calendar.getInstance();
         Calendar c = Calendar.getInstance();
         Date date = new Date();
         Date date = new Date();
@@ -121,43 +144,56 @@ public class ScreenSiZhuTestController {
         c.set(Calendar.HOUR_OF_DAY, +24);
         c.set(Calendar.HOUR_OF_DAY, +24);
         Date d = c.getTime();
         Date d = c.getTime();
         String formatD = format.format(d);
         String formatD = format.format(d);
-        Map<String, Object> params = new HashMap<>();
-        params.put("alarmStartDateString", formatA);
-        params.put("alarmEndDateString", formatD);
-        params.put("pageNum", 1);
-        params.put("pageSize", 1);
-        params.put("alarmType", 303);
-        params.put("dbType", 0);
-        params.put("deviceCategory", 1);
-        //死猪通道
-        String[] nodeCodeList = CommonConstant.SIZhuChannle;
-        params.put("nodeCodeList", nodeCodeList);
-        String URL = "/evo-apigw/evo-event/1.2.0/alarm-record/page"; //获取事件URL    post请求
-        IClient iClient = new DefaultClient();
-        String NewUrl = URL;
-        //这种已经在配置文件里面安排了账号ip以及密码
-        GeneralRequest generalRequest = new GeneralRequest(NewUrl, Method.POST);
-        System.out.println(NewUrl);
-        generalRequest.header("Content-Type", " application/json");
-        generalRequest.body(JSON.toJSONString(params));
-        GeneralResponse generalResponse = iClient.doAction(generalRequest, generalRequest.getResponseClass());
-
-
-        JSONObject jsondata = (JSONObject) JSONObject.fromObject(generalResponse.getResult()).get("data");
-        String substring = jsondata.get("pageData").toString().substring(1, jsondata.get("pageData").toString().length() - 1);
-        if (ObjectUtil.isNotEmpty(substring)){
-            JSONObject jsonObject1 = JSONObject.fromObject(substring);
-            Object alarmDate = jsonObject1.get("alarmDate");
-
-            return alarmDate.toString();
+        String result ="";
+        if (farmId == 1){
+            System.out.println("曙光");
+            XunZhengRequestSg requestSg = new XunZhengRequestSg(oauthConfigBaseInfo);
+            requestSg.setPageNum(1);
+            requestSg.setPageSize(1);
+            requestSg.setAlarmStartDateString(formatA);
+            requestSg.setAlarmEndDateString(formatD);
+            requestSg.setEventType(1);
+            result = requestSg.doAction();
         }
         }
-        return null;
+        if (farmId == 22){
+            System.out.println("海宁");
+            XunZhengRequestHn requestSg = new XunZhengRequestHn(oauthConfigBaseInfo02);
+            requestSg.setPageNum(1);
+            requestSg.setPageSize(1);
+            requestSg.setAlarmStartDateString(formatA);
+            requestSg.setAlarmEndDateString(formatD);
+            requestSg.setEventType(1);
+            result = requestSg.doAction();
+        }
+        if (farmId == 21){
+            System.out.println("苍南");
+            XunZhengRequestCn requestSg = new XunZhengRequestCn(oauthConfigBaseInfo03);
+            requestSg.setPageNum(1);
+            requestSg.setPageSize(1);
+            requestSg.setAlarmStartDateString(formatA);
+            requestSg.setAlarmEndDateString(formatD);
+            requestSg.setEventType(1);
+            result = requestSg.doAction();
+        }
+        if (!"".equals(result)){
+            JSONObject jsonObject = JSONObject.fromObject(result);
+            System.out.println(jsonObject);
+            JSONObject data = (JSONObject)jsonObject.get("data");
+            String substring = data.get("pageData").toString().substring(1, data.get("pageData").toString().length() - 1);
+            if (ObjectUtil.isNotEmpty(substring)){
+                JSONObject jsonObject1 = JSONObject.fromObject(substring);
+                Object alarmDate = jsonObject1.get("alarmDate");
+                return alarmDate.toString();
+            }
+        }
+
+        return result;
 
 
     }
     }
 
 
 
 
     //返回所有的死猪事件
     //返回所有的死猪事件
-    public GeneralResponse getSiZhuList() throws ClientException {
+    public GeneralResponse getSiZhuList(Integer farmId) throws ClientException {
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         Calendar c = Calendar.getInstance();
         Calendar c = Calendar.getInstance();
         Date date = new Date();
         Date date = new Date();
@@ -171,24 +207,37 @@ public class ScreenSiZhuTestController {
         Date d = c.getTime();
         Date d = c.getTime();
         String formatD = format.format(d);
         String formatD = format.format(d);
         Map<String, Object> params = new HashMap<>();
         Map<String, Object> params = new HashMap<>();
-        params.put("alarmStartDateString", formatA);
-        params.put("alarmEndDateString", formatD);
-        params.put("pageNum", 1);
-        params.put("pageSize", 10);
-        params.put("alarmType", 303);
-        params.put("dbType", 0);
-        params.put("deviceCategory", 1);
-        //死猪通道
-        String[] nodeCodeList = CommonConstant.SIZhuChannle;
-        params.put("nodeCodeList", nodeCodeList);
-        String URL = "/evo-apigw/evo-event/1.2.0/alarm-record/page";  //获取事件URL    post请求
-        IClient iClient = new DefaultClient();
-        //这种已经在配置文件里面安排了账号ip以及密码
-        GeneralRequest generalRequest = new GeneralRequest(URL, Method.POST);
-        generalRequest.header("Content-Type", " application/json");
-        generalRequest.body(JSON.toJSONString(params));
-        GeneralResponse generalResponse = iClient.doAction(generalRequest, generalRequest.getResponseClass());
-        return generalResponse;
+        if (farmId == 1){
+            XunZhengRequestSg requestSg = new XunZhengRequestSg(oauthConfigBaseInfo);
+            requestSg.setPageNum(1);
+            requestSg.setPageSize(10);
+            requestSg.setAlarmStartDateString(formatA);
+            requestSg.setAlarmEndDateString(formatD);
+            requestSg.setEventType(1);
+            String result = requestSg.doAction();
+            System.out.println(result);
+        }
+        if (farmId == 22){
+            XunZhengRequestHn requestSg = new XunZhengRequestHn(oauthConfigBaseInfo02);
+            requestSg.setPageNum(1);
+            requestSg.setPageSize(10);
+            requestSg.setAlarmStartDateString(formatA);
+            requestSg.setAlarmEndDateString(formatD);
+            requestSg.setEventType(1);
+            String result = requestSg.doAction();
+            System.out.println(result);
+        }
+        if (farmId == 21){
+            XunZhengRequestCn requestSg = new XunZhengRequestCn(oauthConfigBaseInfo03);
+            requestSg.setPageNum(1);
+            requestSg.setPageSize(10);
+            requestSg.setAlarmStartDateString(formatA);
+            requestSg.setAlarmEndDateString(formatD);
+            requestSg.setEventType(1);
+            String result = requestSg.doAction();
+            System.out.println(result);
+        }
+        return null;
     }
     }
 }
 }
 
 

+ 3 - 0
huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/constant/Constant.java

@@ -311,4 +311,7 @@ public class Constant {
     public static final String DEPARTMENT_LIST_URL = "/evo-apigw/evo-brm/1.2.0/department/page";
     public static final String DEPARTMENT_LIST_URL = "/evo-apigw/evo-brm/1.2.0/department/page";
 
 
     public static final String MASSAGE_XIXIAO_PERSION = "/evo-apigw/evo-event/1.0.0/alarm-record/count-num";
     public static final String MASSAGE_XIXIAO_PERSION = "/evo-apigw/evo-event/1.0.0/alarm-record/count-num";
+    public static final String  COMBINED_COUNT = "/evo-apigw/evo-accesscontrol/1.0.0/card/accessControl/swingCardRecord/bycondition/combinedCount";
+
+    public static final String  CAR_COMBINED_COUNT = "/evo-apigw/ipms/carcapture/find/conditions?queryTimeBegin={queryTimeBegin}&queryTimeEnd={queryTimeEnd}&carDirect={carDirect}";
 }
 }

+ 3 - 0
huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/request/Car/Sg/ClientCarListRequestSg.java

@@ -20,6 +20,9 @@ public class ClientCarListRequestSg extends BaseRequest<Object> {
     private Integer pageNum;
     private Integer pageNum;
 
 
     private Integer pageSize;
     private Integer pageSize;
+    private Integer queryTimeBegin;
+    private Integer queryTimeEnd;
+    private Integer carDirect;
 
 
 //    private String method;
 //    private String method;
 //
 //

+ 84 - 0
huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/request/screenRequest/cn/ClientCarCombinedCn.java

@@ -0,0 +1,84 @@
+package com.huimv.video.dhicc.test.request.screenRequest.cn;
+
+import com.alibaba.fastjson.JSON;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo03;
+import com.huimv.video.dhicc.test.constant.Constant;
+import com.huimv.video.dhicc.test.request.BaseRequest;
+import com.huimv.video.dhicc.test.request.BaseRequest03;
+import com.huimv.video.dhicc.test.utils.HttpURLConnectionUtil;
+import com.huimv.video.dhicc.test.utils.HttpsURLConnectionUtil;
+import com.huimv.video.dhicc.test.utils.UrlStringUtil;
+import com.huimv.video.dhicc.test.utils.UrlUtil;
+import lombok.Data;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@Data
+public class ClientCarCombinedCn extends BaseRequest03<Object> {
+
+
+    private String carDirect;
+    private String queryTimeBegin;
+    private String queryTimeEnd;
+//    private String pageSize;
+//    private String pageNum;
+
+//    private String method;
+//
+//    private Map<String,Object> data;
+
+
+    public ClientCarCombinedCn() {
+    }
+
+    public ClientCarCombinedCn(OauthConfigBaseInfo03 oauthConfigBaseInfo) {
+
+        super(oauthConfigBaseInfo, Constant.HTTP_GET, oauthConfigBaseInfo.getHttpConfigInfo().getPrefixUrl() + Constant.CAR_COMBINED_COUNT, true);
+    }
+
+    @Override
+    public String  doAction() {
+        //重置url信息,替换版本号
+        if(carDirect ==null){
+            this.setUrl(this.getUrl().replace("{carDirect}",""));
+        }else {
+            this.setUrl(this.getUrl().replace("{carDirect}",carDirect));
+        }
+
+        this.setUrl(this.getUrl().replace("{queryTimeBegin}", UrlStringUtil.replaceUrl(queryTimeBegin)));
+        this.setUrl(this.getUrl().replace("{queryTimeEnd}",UrlStringUtil.replaceUrl(queryTimeEnd)));
+        this.setUrl(UrlUtil.dealVersion(this.getUrl()));
+        //设置请求参数
+        setBody();
+        //发送请求
+        String res = isEnableHttpTest() ? HttpURLConnectionUtil.doGet03(this) : HttpsURLConnectionUtil.doGet03(this);
+        System.out.println(res);
+        //获取响应
+//        JSONObject jsonObject = JSONObject.parseObject(res);
+//        Object data = jsonObject.get("data");
+//        GeneralResponse devicePageResponse = JSON.parseObject(res, GeneralResponse.class);
+//        System.out.println(data);
+        return res;
+    }
+
+
+    private void setBody() {
+        //设置请求参数
+        Map<String, Object> map = new HashMap<>();
+        map.put("queryTimeBegin", this.queryTimeBegin);
+        map.put("queryTimeEnd", this.queryTimeEnd);
+        map.put("carDirect", this.carDirect);
+//        map.put("method", this.method);
+//        map.put("data", this.data);
+        this.setBody(JSON.toJSONString(map));
+
+    }
+
+
+
+    public boolean isEnableHttpTest() {
+        return super.getOauthConfigBaseInfo().getHttpConfigInfo().isEnableHttpTest();
+    }
+}

+ 74 - 0
huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/request/screenRequest/cn/ClientCombinedCountRequestCn.java

@@ -0,0 +1,74 @@
+package com.huimv.video.dhicc.test.request.screenRequest.cn;
+
+import com.alibaba.fastjson.JSON;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo02;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo03;
+import com.huimv.video.dhicc.test.constant.Constant;
+import com.huimv.video.dhicc.test.request.BaseRequest02;
+import com.huimv.video.dhicc.test.request.BaseRequest03;
+import com.huimv.video.dhicc.test.utils.HttpURLConnectionUtil;
+import com.huimv.video.dhicc.test.utils.HttpsURLConnectionUtil;
+import com.huimv.video.dhicc.test.utils.UrlUtil;
+import lombok.Data;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@Data
+public class ClientCombinedCountRequestCn extends BaseRequest03<Object> {
+
+
+    private String startSwingTime;
+
+    private String endSwingTime;
+    private String containDomain;
+    private Integer openResult;
+    private Integer openType;
+//    private String method;
+//
+//    private Map<String,Object> data;
+private void setBody() {
+    //设置请求参数
+    Map<String, Object> map = new HashMap<>();
+    map.put("startSwingTime", this.startSwingTime);
+    map.put("endSwingTime", this.endSwingTime);
+    map.put("containDomain", this.containDomain);
+    map.put("openResult", this.openResult);
+    map.put("poenType", this.openType);
+//        map.put("method", this.method);
+//        map.put("data", this.data);
+    this.setBody(JSON.toJSONString(map));
+
+}
+
+
+    public ClientCombinedCountRequestCn() {
+    }
+
+    public ClientCombinedCountRequestCn(OauthConfigBaseInfo03 oauthConfigBaseInfo) {
+        super(oauthConfigBaseInfo, Constant.HTTP_POST, oauthConfigBaseInfo.getHttpConfigInfo().getPrefixUrl() + Constant.COMBINED_COUNT, true);
+    }
+
+    @Override
+    public String  doAction() {
+        //重置url信息,替换版本号
+        this.setUrl(UrlUtil.dealVersion(this.getUrl()));
+        //设置请求参数
+        setBody();
+        //发送请求
+        String res = isEnableHttpTest() ? HttpURLConnectionUtil.doPost(this.getUrl(), this.getBody(), this.getHeader()) : HttpsURLConnectionUtil.doPost(this.getUrl(), this.getBody(), this.getHeader());
+        System.out.println(res);
+        //获取响应
+//        JSONObject jsonObject = JSONObject.parseObject(res);
+//        Object data = jsonObject.get("data");
+//        GeneralResponse devicePageResponse = JSON.parseObject(res, GeneralResponse.class);
+//        System.out.println(data);
+        return res;
+    }
+
+
+
+    public boolean isEnableHttpTest() {
+        return super.getOauthConfigBaseInfo().getHttpConfigInfo().isEnableHttpTest();
+    }
+}

+ 77 - 0
huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/request/screenRequest/cn/ClientSendMassageXixiaoPersonRequestCn.java

@@ -0,0 +1,77 @@
+package com.huimv.video.dhicc.test.request.screenRequest.cn;
+
+import com.alibaba.fastjson.JSON;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo03;
+import com.huimv.video.dhicc.test.constant.Constant;
+import com.huimv.video.dhicc.test.request.BaseRequest;
+import com.huimv.video.dhicc.test.request.BaseRequest03;
+import com.huimv.video.dhicc.test.utils.HttpURLConnectionUtil;
+import com.huimv.video.dhicc.test.utils.HttpsURLConnectionUtil;
+import com.huimv.video.dhicc.test.utils.UrlUtil;
+import lombok.Data;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@Data
+public class ClientSendMassageXixiaoPersonRequestCn extends BaseRequest03<Object> {
+
+
+    private String alarmStartDateString;
+
+    private String alarmEndDateString;
+    private Integer alarmType;
+    private Integer dbType;
+    private Integer deviceCategory;
+    private String[] nodeCodeList;
+
+//    private String method;
+//
+//    private Map<String,Object> data;
+
+
+    public ClientSendMassageXixiaoPersonRequestCn() {
+    }
+
+    public ClientSendMassageXixiaoPersonRequestCn(OauthConfigBaseInfo03 oauthConfigBaseInfo) {
+        super(oauthConfigBaseInfo, Constant.HTTP_POST, oauthConfigBaseInfo.getHttpConfigInfo().getPrefixUrl() + Constant.MASSAGE_XIXIAO_PERSION, true);
+    }
+
+    @Override
+    public String  doAction() {
+        //重置url信息,替换版本号
+        this.setUrl(UrlUtil.dealVersion(this.getUrl()));
+        //设置请求参数
+        setBody();
+        //发送请求
+        String res = isEnableHttpTest() ? HttpURLConnectionUtil.doPost(this.getUrl(), this.getBody(), this.getHeader()) : HttpsURLConnectionUtil.doPost(this.getUrl(), this.getBody(), this.getHeader());
+        System.out.println(res);
+        //获取响应
+//        JSONObject jsonObject = JSONObject.parseObject(res);
+//        Object data = jsonObject.get("data");
+//        GeneralResponse devicePageResponse = JSON.parseObject(res, GeneralResponse.class);
+//        System.out.println(data);
+        return res;
+    }
+
+    private void setBody() {
+        //设置请求参数
+        Map<String, Object> map = new HashMap<>();
+        map.put("alarmStartDateString", this.alarmStartDateString);
+        map.put("alarmEndDateString", this.alarmEndDateString);
+        map.put("alarmType", this.alarmType);
+        map.put("dbType", this.dbType);
+        map.put("deviceCategory", this.deviceCategory);
+        map.put("nodeCodeList", this.nodeCodeList);
+//        map.put("method", this.method);
+//        map.put("data", this.data);
+        this.setBody(JSON.toJSONString(map));
+
+    }
+
+
+    public boolean isEnableHttpTest() {
+        return super.getOauthConfigBaseInfo().getHttpConfigInfo().isEnableHttpTest();
+    }
+}

+ 84 - 0
huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/request/screenRequest/hn/ClientCarCombinedHn.java

@@ -0,0 +1,84 @@
+package com.huimv.video.dhicc.test.request.screenRequest.hn;
+
+import com.alibaba.fastjson.JSON;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo02;
+import com.huimv.video.dhicc.test.constant.Constant;
+import com.huimv.video.dhicc.test.request.BaseRequest;
+import com.huimv.video.dhicc.test.request.BaseRequest02;
+import com.huimv.video.dhicc.test.utils.HttpURLConnectionUtil;
+import com.huimv.video.dhicc.test.utils.HttpsURLConnectionUtil;
+import com.huimv.video.dhicc.test.utils.UrlStringUtil;
+import com.huimv.video.dhicc.test.utils.UrlUtil;
+import lombok.Data;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@Data
+public class ClientCarCombinedHn extends BaseRequest02<Object> {
+
+
+    private String carDirect;
+    private String queryTimeBegin;
+    private String queryTimeEnd;
+//    private String pageSize;
+//    private String pageNum;
+
+//    private String method;
+//
+//    private Map<String,Object> data;
+
+
+    public ClientCarCombinedHn() {
+    }
+
+    public ClientCarCombinedHn(OauthConfigBaseInfo02 oauthConfigBaseInfo) {
+
+        super(oauthConfigBaseInfo, Constant.HTTP_GET, oauthConfigBaseInfo.getHttpConfigInfo().getPrefixUrl() + Constant.CAR_COMBINED_COUNT, true);
+    }
+
+    @Override
+    public String  doAction() {
+        //重置url信息,替换版本号
+        if(carDirect ==null){
+            this.setUrl(this.getUrl().replace("{carDirect}",""));
+        }else {
+            this.setUrl(this.getUrl().replace("{carDirect}",carDirect));
+        }
+
+        this.setUrl(this.getUrl().replace("{queryTimeBegin}", UrlStringUtil.replaceUrl(queryTimeBegin)));
+        this.setUrl(this.getUrl().replace("{queryTimeEnd}",UrlStringUtil.replaceUrl(queryTimeEnd)));
+        this.setUrl(UrlUtil.dealVersion(this.getUrl()));
+        //设置请求参数
+        setBody();
+        //发送请求
+        String res = isEnableHttpTest() ? HttpURLConnectionUtil.doGet02(this) : HttpsURLConnectionUtil.doGet02(this);
+        System.out.println(res);
+        //获取响应
+//        JSONObject jsonObject = JSONObject.parseObject(res);
+//        Object data = jsonObject.get("data");
+//        GeneralResponse devicePageResponse = JSON.parseObject(res, GeneralResponse.class);
+//        System.out.println(data);
+        return res;
+    }
+
+
+    private void setBody() {
+        //设置请求参数
+        Map<String, Object> map = new HashMap<>();
+        map.put("queryTimeBegin", this.queryTimeBegin);
+        map.put("queryTimeEnd", this.queryTimeEnd);
+        map.put("carDirect", this.carDirect);
+//        map.put("method", this.method);
+//        map.put("data", this.data);
+        this.setBody(JSON.toJSONString(map));
+
+    }
+
+
+
+    public boolean isEnableHttpTest() {
+        return super.getOauthConfigBaseInfo().getHttpConfigInfo().isEnableHttpTest();
+    }
+}

+ 73 - 0
huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/request/screenRequest/hn/ClientCombinedCountRequestHn.java

@@ -0,0 +1,73 @@
+package com.huimv.video.dhicc.test.request.screenRequest.hn;
+
+import com.alibaba.fastjson.JSON;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo02;
+import com.huimv.video.dhicc.test.constant.Constant;
+import com.huimv.video.dhicc.test.request.BaseRequest;
+import com.huimv.video.dhicc.test.request.BaseRequest02;
+import com.huimv.video.dhicc.test.utils.HttpURLConnectionUtil;
+import com.huimv.video.dhicc.test.utils.HttpsURLConnectionUtil;
+import com.huimv.video.dhicc.test.utils.UrlUtil;
+import lombok.Data;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@Data
+public class ClientCombinedCountRequestHn extends BaseRequest02<Object> {
+
+
+    private String startSwingTime;
+
+    private String endSwingTime;
+    private String containDomain;
+    private Integer openResult;
+    private Integer openType;
+//    private String method;
+//
+//    private Map<String,Object> data;
+private void setBody() {
+    //设置请求参数
+    Map<String, Object> map = new HashMap<>();
+    map.put("startSwingTime", this.startSwingTime);
+    map.put("endSwingTime", this.endSwingTime);
+    map.put("containDomain", this.containDomain);
+    map.put("openResult", this.openResult);
+//        map.put("method", this.method);
+//        map.put("data", this.data);
+    this.setBody(JSON.toJSONString(map));
+
+}
+
+
+    public ClientCombinedCountRequestHn() {
+    }
+
+    public ClientCombinedCountRequestHn(OauthConfigBaseInfo02 oauthConfigBaseInfo) {
+        super(oauthConfigBaseInfo, Constant.HTTP_POST, oauthConfigBaseInfo.getHttpConfigInfo().getPrefixUrl() + Constant.COMBINED_COUNT, true);
+    }
+
+    @Override
+    public String  doAction() {
+        //重置url信息,替换版本号
+        this.setUrl(UrlUtil.dealVersion(this.getUrl()));
+        //设置请求参数
+        setBody();
+        //发送请求
+        String res = isEnableHttpTest() ? HttpURLConnectionUtil.doPost(this.getUrl(), this.getBody(), this.getHeader()) : HttpsURLConnectionUtil.doPost(this.getUrl(), this.getBody(), this.getHeader());
+        System.out.println(res);
+        //获取响应
+//        JSONObject jsonObject = JSONObject.parseObject(res);
+//        Object data = jsonObject.get("data");
+//        GeneralResponse devicePageResponse = JSON.parseObject(res, GeneralResponse.class);
+//        System.out.println(data);
+        return res;
+    }
+
+
+
+    public boolean isEnableHttpTest() {
+        return super.getOauthConfigBaseInfo().getHttpConfigInfo().isEnableHttpTest();
+    }
+}

+ 77 - 0
huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/request/screenRequest/hn/ClientSendMassageXixiaoPersonRequestHn.java

@@ -0,0 +1,77 @@
+package com.huimv.video.dhicc.test.request.screenRequest.hn;
+
+import com.alibaba.fastjson.JSON;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo02;
+import com.huimv.video.dhicc.test.constant.Constant;
+import com.huimv.video.dhicc.test.request.BaseRequest;
+import com.huimv.video.dhicc.test.request.BaseRequest02;
+import com.huimv.video.dhicc.test.utils.HttpURLConnectionUtil;
+import com.huimv.video.dhicc.test.utils.HttpsURLConnectionUtil;
+import com.huimv.video.dhicc.test.utils.UrlUtil;
+import lombok.Data;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@Data
+public class ClientSendMassageXixiaoPersonRequestHn extends BaseRequest02<Object> {
+
+
+    private String alarmStartDateString;
+
+    private String alarmEndDateString;
+    private Integer alarmType;
+    private Integer dbType;
+    private Integer deviceCategory;
+    private String[] nodeCodeList;
+
+//    private String method;
+//
+//    private Map<String,Object> data;
+
+
+    public ClientSendMassageXixiaoPersonRequestHn() {
+    }
+
+    public ClientSendMassageXixiaoPersonRequestHn(OauthConfigBaseInfo02 oauthConfigBaseInfo) {
+        super(oauthConfigBaseInfo, Constant.HTTP_POST, oauthConfigBaseInfo.getHttpConfigInfo().getPrefixUrl() + Constant.MASSAGE_XIXIAO_PERSION, true);
+    }
+
+    @Override
+    public String  doAction() {
+        //重置url信息,替换版本号
+        this.setUrl(UrlUtil.dealVersion(this.getUrl()));
+        //设置请求参数
+        setBody();
+        //发送请求
+        String res = isEnableHttpTest() ? HttpURLConnectionUtil.doPost(this.getUrl(), this.getBody(), this.getHeader()) : HttpsURLConnectionUtil.doPost(this.getUrl(), this.getBody(), this.getHeader());
+        System.out.println(res);
+        //获取响应
+//        JSONObject jsonObject = JSONObject.parseObject(res);
+//        Object data = jsonObject.get("data");
+//        GeneralResponse devicePageResponse = JSON.parseObject(res, GeneralResponse.class);
+//        System.out.println(data);
+        return res;
+    }
+
+    private void setBody() {
+        //设置请求参数
+        Map<String, Object> map = new HashMap<>();
+        map.put("alarmStartDateString", this.alarmStartDateString);
+        map.put("alarmEndDateString", this.alarmEndDateString);
+        map.put("alarmType", this.alarmType);
+        map.put("dbType", this.dbType);
+        map.put("deviceCategory", this.deviceCategory);
+        map.put("nodeCodeList", this.nodeCodeList);
+//        map.put("method", this.method);
+//        map.put("data", this.data);
+        this.setBody(JSON.toJSONString(map));
+
+    }
+
+
+    public boolean isEnableHttpTest() {
+        return super.getOauthConfigBaseInfo().getHttpConfigInfo().isEnableHttpTest();
+    }
+}

+ 84 - 0
huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/request/screenRequest/sg/ClientCarCombinedSg.java

@@ -0,0 +1,84 @@
+package com.huimv.video.dhicc.test.request.screenRequest.sg;
+
+import com.alibaba.fastjson.JSON;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo02;
+import com.huimv.video.dhicc.test.constant.Constant;
+import com.huimv.video.dhicc.test.request.BaseRequest;
+import com.huimv.video.dhicc.test.request.BaseRequest02;
+import com.huimv.video.dhicc.test.utils.HttpURLConnectionUtil;
+import com.huimv.video.dhicc.test.utils.HttpsURLConnectionUtil;
+import com.huimv.video.dhicc.test.utils.UrlStringUtil;
+import com.huimv.video.dhicc.test.utils.UrlUtil;
+import lombok.Data;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@Data
+public class ClientCarCombinedSg extends BaseRequest<Object> {
+
+
+    private String carDirect;
+    private String queryTimeBegin;
+    private String queryTimeEnd;
+//    private String pageSize;
+//    private String pageNum;
+
+//    private String method;
+//
+//    private Map<String,Object> data;
+
+
+    public ClientCarCombinedSg() {
+    }
+
+    public ClientCarCombinedSg(OauthConfigBaseInfo oauthConfigBaseInfo) {
+
+        super(oauthConfigBaseInfo, Constant.HTTP_GET, oauthConfigBaseInfo.getHttpConfigInfo().getPrefixUrl() + Constant.CAR_COMBINED_COUNT, true);
+    }
+
+    @Override
+    public String  doAction() {
+        //重置url信息,替换版本号
+        if(carDirect ==null){
+            this.setUrl(this.getUrl().replace("{carDirect}",""));
+        }else {
+            this.setUrl(this.getUrl().replace("{carDirect}",carDirect));
+        }
+
+        this.setUrl(this.getUrl().replace("{queryTimeBegin}", UrlStringUtil.replaceUrl(queryTimeBegin)));
+        this.setUrl(this.getUrl().replace("{queryTimeEnd}",UrlStringUtil.replaceUrl(queryTimeEnd)));
+        this.setUrl(UrlUtil.dealVersion(this.getUrl()));
+        //设置请求参数
+        setBody();
+        //发送请求
+        String res = isEnableHttpTest() ? HttpURLConnectionUtil.doGet(this) : HttpsURLConnectionUtil.doGet(this);
+        System.out.println(res);
+        //获取响应
+//        JSONObject jsonObject = JSONObject.parseObject(res);
+//        Object data = jsonObject.get("data");
+//        GeneralResponse devicePageResponse = JSON.parseObject(res, GeneralResponse.class);
+//        System.out.println(data);
+        return res;
+    }
+
+
+    private void setBody() {
+        //设置请求参数
+        Map<String, Object> map = new HashMap<>();
+        map.put("queryTimeBegin", this.queryTimeBegin);
+        map.put("queryTimeEnd", this.queryTimeEnd);
+        map.put("carDirect", this.carDirect);
+//        map.put("method", this.method);
+//        map.put("data", this.data);
+        this.setBody(JSON.toJSONString(map));
+
+    }
+
+
+
+    public boolean isEnableHttpTest() {
+        return super.getOauthConfigBaseInfo().getHttpConfigInfo().isEnableHttpTest();
+    }
+}

+ 72 - 0
huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/request/screenRequest/sg/ClientCombinedCountRequestSg.java

@@ -0,0 +1,72 @@
+package com.huimv.video.dhicc.test.request.screenRequest.sg;
+
+import com.alibaba.fastjson.JSON;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
+import com.huimv.video.dhicc.test.constant.Constant;
+import com.huimv.video.dhicc.test.request.BaseRequest;
+import com.huimv.video.dhicc.test.utils.HttpURLConnectionUtil;
+import com.huimv.video.dhicc.test.utils.HttpsURLConnectionUtil;
+import com.huimv.video.dhicc.test.utils.UrlUtil;
+import lombok.Data;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@Data
+public class ClientCombinedCountRequestSg extends BaseRequest<Object> {
+
+
+    private String startSwingTime;
+
+    private String endSwingTime;
+    private String containDomain;
+    private Integer openResult;
+    private Integer openType;
+//    private String method;
+//
+//    private Map<String,Object> data;
+private void setBody() {
+    //设置请求参数
+    Map<String, Object> map = new HashMap<>();
+    map.put("startSwingTime", this.startSwingTime);
+    map.put("endSwingTime", this.endSwingTime);
+    map.put("containDomain", this.containDomain);
+    map.put("openResult", this.openResult);
+    map.put("openType", this.openType);
+//        map.put("method", this.method);
+//        map.put("data", this.data);
+    this.setBody(JSON.toJSONString(map));
+
+}
+
+
+    public ClientCombinedCountRequestSg() {
+    }
+
+    public ClientCombinedCountRequestSg(OauthConfigBaseInfo oauthConfigBaseInfo) {
+        super(oauthConfigBaseInfo, Constant.HTTP_POST, oauthConfigBaseInfo.getHttpConfigInfo().getPrefixUrl() + Constant.COMBINED_COUNT, true);
+    }
+
+    @Override
+    public String  doAction() {
+        //重置url信息,替换版本号
+        this.setUrl(UrlUtil.dealVersion(this.getUrl()));
+        //设置请求参数
+        setBody();
+        //发送请求
+        String res = isEnableHttpTest() ? HttpURLConnectionUtil.doPost(this.getUrl(), this.getBody(), this.getHeader()) : HttpsURLConnectionUtil.doPost(this.getUrl(), this.getBody(), this.getHeader());
+        System.out.println(res);
+        //获取响应
+//        JSONObject jsonObject = JSONObject.parseObject(res);
+//        Object data = jsonObject.get("data");
+//        GeneralResponse devicePageResponse = JSON.parseObject(res, GeneralResponse.class);
+//        System.out.println(data);
+        return res;
+    }
+
+
+
+    public boolean isEnableHttpTest() {
+        return super.getOauthConfigBaseInfo().getHttpConfigInfo().isEnableHttpTest();
+    }
+}

+ 5 - 2
huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/request/ClientSendMassageXixiaoPersonRequestSg.java

@@ -1,10 +1,13 @@
-package com.huimv.video.dhicc.test.request;
+package com.huimv.video.dhicc.test.request.screenRequest.sg;
 
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
 import com.dahuatech.icc.oauth.model.v202010.GeneralResponse;
 import com.dahuatech.icc.oauth.model.v202010.GeneralResponse;
 import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
 import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
+import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo03;
 import com.huimv.video.dhicc.test.constant.Constant;
 import com.huimv.video.dhicc.test.constant.Constant;
+import com.huimv.video.dhicc.test.request.BaseRequest;
+import com.huimv.video.dhicc.test.request.BaseRequest03;
 import com.huimv.video.dhicc.test.utils.HttpURLConnectionUtil;
 import com.huimv.video.dhicc.test.utils.HttpURLConnectionUtil;
 import com.huimv.video.dhicc.test.utils.HttpsURLConnectionUtil;
 import com.huimv.video.dhicc.test.utils.HttpsURLConnectionUtil;
 import com.huimv.video.dhicc.test.utils.UrlUtil;
 import com.huimv.video.dhicc.test.utils.UrlUtil;
@@ -14,7 +17,7 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Map;
 
 
 @Data
 @Data
-public class ClientSendMassageXixiaoPersonRequestSg extends BaseRequest<Object>{
+public class ClientSendMassageXixiaoPersonRequestSg extends BaseRequest<Object> {
 
 
 
 
     private String alarmStartDateString;
     private String alarmStartDateString;

+ 11 - 0
huimv-farm-video/src/main/java/com/huimv/video/dhicc/test/utils/UrlStringUtil.java

@@ -0,0 +1,11 @@
+package com.huimv.video.dhicc.test.utils;
+
+
+public class UrlStringUtil {
+
+    public static String replaceUrl (String date){
+        date = date.replace(" ","%20");
+        date = date.replace(":","%3A");
+        return date;
+    }
+}

+ 176 - 34
huimv-farm-video/src/main/java/com/huimv/video/dhicc/util/GetResponse.java

@@ -8,23 +8,22 @@ import com.dahuatech.icc.oauth.http.IClient;
 import com.dahuatech.icc.oauth.model.v202010.GeneralRequest;
 import com.dahuatech.icc.oauth.model.v202010.GeneralRequest;
 import com.dahuatech.icc.oauth.model.v202010.GeneralResponse;
 import com.dahuatech.icc.oauth.model.v202010.GeneralResponse;
 
 
-import com.huimv.common.utils.StringUtilsWork;
 import com.huimv.video.dhicc.icc.CommonConstant;
 import com.huimv.video.dhicc.icc.CommonConstant;
 import com.huimv.video.dhicc.result.R;
 import com.huimv.video.dhicc.result.R;
 import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
 import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
 import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo02;
 import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo02;
 import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo03;
 import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo03;
-import com.huimv.video.dhicc.test.request.ClientCarListRequestSg;
-import com.huimv.video.dhicc.test.request.ClientSendMassageXixiaoPersonRequestSg;
-import jdk.nashorn.internal.ir.IfNode;
+import com.huimv.video.dhicc.test.request.screenRequest.cn.ClientCarCombinedCn;
+import com.huimv.video.dhicc.test.request.screenRequest.cn.ClientCombinedCountRequestCn;
+import com.huimv.video.dhicc.test.request.screenRequest.cn.ClientSendMassageXixiaoPersonRequestCn;
+import com.huimv.video.dhicc.test.request.screenRequest.hn.ClientCarCombinedHn;
+import com.huimv.video.dhicc.test.request.screenRequest.hn.ClientCombinedCountRequestHn;
+import com.huimv.video.dhicc.test.request.screenRequest.hn.ClientSendMassageXixiaoPersonRequestHn;
+import com.huimv.video.dhicc.test.request.screenRequest.sg.ClientCarCombinedSg;
+import com.huimv.video.dhicc.test.request.screenRequest.sg.ClientCombinedCountRequestSg;
+import com.huimv.video.dhicc.test.request.screenRequest.sg.ClientSendMassageXixiaoPersonRequestSg;
 import net.sf.json.JSONObject;
 import net.sf.json.JSONObject;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
 
 
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
 import java.util.Date;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Map;
@@ -39,6 +38,49 @@ public class GetResponse {
      * @return
      * @return
      * @throws ClientException
      * @throws ClientException
      */
      */
+    public String carCount(String begin, String end ,String direct,OauthConfigBaseInfo oauthConfigBaseInfo) throws ClientException {
+
+        ClientCarCombinedSg requestSg = new ClientCarCombinedSg(oauthConfigBaseInfo);
+        requestSg.setCarDirect(direct);
+        requestSg.setQueryTimeBegin(begin);
+        requestSg.setQueryTimeEnd(end);
+        System.out.println(requestSg);
+        String res = requestSg.doAction();
+        JSONObject jsonObject = JSONObject.fromObject(res);
+        Object data = jsonObject.get("data");
+        JSONObject jsonObject1 = JSONObject.fromObject(data);
+        System.out.println(jsonObject1);
+        return jsonObject1.get("totalRows").toString();
+    }
+    public String carCount02(String begin, String end ,String direct,OauthConfigBaseInfo02 oauthConfigBaseInfo) throws ClientException {
+
+        ClientCarCombinedHn requestSg = new ClientCarCombinedHn(oauthConfigBaseInfo);
+        requestSg.setCarDirect(direct);
+        requestSg.setQueryTimeBegin(begin);
+        requestSg.setQueryTimeEnd(end);
+        System.out.println(requestSg);
+        String res = requestSg.doAction();
+        JSONObject jsonObject = JSONObject.fromObject(res);
+        Object data = jsonObject.get("data");
+        JSONObject jsonObject1 = JSONObject.fromObject(data);
+        System.out.println(jsonObject1);
+        return jsonObject1.get("totalRows").toString();
+    }
+    public String carCount03(String begin, String end ,String direct,OauthConfigBaseInfo03 oauthConfigBaseInfo) throws ClientException {
+
+        ClientCarCombinedCn requestSg = new ClientCarCombinedCn(oauthConfigBaseInfo);
+        requestSg.setCarDirect(direct);
+        requestSg.setQueryTimeBegin(begin);
+        requestSg.setQueryTimeEnd(end);
+        System.out.println(requestSg);
+        String res = requestSg.doAction();
+        JSONObject jsonObject = JSONObject.fromObject(res);
+        Object data = jsonObject.get("data");
+        JSONObject jsonObject1 = JSONObject.fromObject(data);
+        System.out.println(jsonObject1);
+        return jsonObject1.get("totalRows").toString();
+    }
+
     public String SendMassageGetPage(String begin, String end) throws ClientException {
     public String SendMassageGetPage(String begin, String end) throws ClientException {
         //条件只有开始结束时间  有问题 这个是条数  有统计条数的专门接口
         //条件只有开始结束时间  有问题 这个是条数  有统计条数的专门接口
         //时间参数这里之前让前端传了  我这里只做转发  现在自己加上去
         //时间参数这里之前让前端传了  我这里只做转发  现在自己加上去
@@ -158,7 +200,51 @@ public class GetResponse {
      * @return
      * @return
      * @throws ClientException
      * @throws ClientException
      */
      */
-    public String SendMassageGetPagePersonAlarm(String begin, String end) throws ClientException {
+    public String SendMassageGetPagePersonAlarm(String begin, String end,Integer opentResult,Integer openType,OauthConfigBaseInfo oauthConfigBaseInfo) throws ClientException {
+        ClientCombinedCountRequestSg requestSg = new ClientCombinedCountRequestSg(oauthConfigBaseInfo);
+        requestSg.setContainDomain("1");
+        requestSg.setEndSwingTime(end);
+        requestSg.setOpenResult(opentResult);
+        requestSg.setStartSwingTime(begin);
+        requestSg.setOpenType(openType);
+        System.out.println(requestSg);
+        String res = requestSg.doAction();
+        JSONObject jsonObject = JSONObject.fromObject(res);
+        Object data = jsonObject.get("data");
+        System.out.println(data);
+        return data.toString();
+    }
+
+    public String SendMassageGetPagePersonAlarm02(String begin, String end,Integer opentResult,Integer openType,OauthConfigBaseInfo02 oauthConfigBaseInfo) throws ClientException {
+        ClientCombinedCountRequestHn requestSg = new ClientCombinedCountRequestHn(oauthConfigBaseInfo);
+        requestSg.setContainDomain("1");
+        requestSg.setEndSwingTime(end);
+        requestSg.setOpenResult(opentResult);
+        requestSg.setStartSwingTime(begin);
+        requestSg.setOpenType(openType);
+        System.out.println(requestSg);
+        String res = requestSg.doAction();
+        JSONObject jsonObject = JSONObject.fromObject(res);
+        Object data = jsonObject.get("data");
+        System.out.println(data);
+        return data.toString();
+    }
+
+    public String SendMassageGetPagePersonAlarm03(String begin, String end,Integer opentResult,Integer openType,OauthConfigBaseInfo03 oauthConfigBaseInfo) throws ClientException {
+        ClientCombinedCountRequestCn requestSg = new ClientCombinedCountRequestCn(oauthConfigBaseInfo);
+        requestSg.setContainDomain("1");
+        requestSg.setEndSwingTime(end);
+        requestSg.setOpenResult(opentResult);
+        requestSg.setStartSwingTime(begin);
+        requestSg.setOpenType(openType);
+        System.out.println(requestSg);
+        String res = requestSg.doAction();
+        JSONObject jsonObject = JSONObject.fromObject(res);
+        Object data = jsonObject.get("data");
+        System.out.println(data);
+        return data.toString();
+    }
+   /* public String SendMassageGetPagePersonAlarm(String begin, String end) throws ClientException {
         Map<String, Object> params = new HashMap<>();
         Map<String, Object> params = new HashMap<>();
         params.put("startSwingTime", begin);
         params.put("startSwingTime", begin);
         params.put("endSwingTime", end);
         params.put("endSwingTime", end);
@@ -183,7 +269,7 @@ public class GetResponse {
         JSONObject jsonObject = JSONObject.fromObject(generalResponse.getResult());
         JSONObject jsonObject = JSONObject.fromObject(generalResponse.getResult());
         Object data = jsonObject.get("data");
         Object data = jsonObject.get("data");
         return data.toString();
         return data.toString();
-    }
+    }*/
 
 
 
 
   /*  public static void main(String[] args) throws ClientException {
   /*  public static void main(String[] args) throws ClientException {
@@ -234,29 +320,55 @@ public class GetResponse {
      * @return
      * @return
      * @throws ClientException
      * @throws ClientException
      */
      */
-    public String SendMassageXixiaoPerson(String begin, String end,Integer farmId,OauthConfigBaseInfo oauthConfigBaseInfo) throws ClientException {
-        String res = "";
-        if(farmId ==1){
-            ClientSendMassageXixiaoPersonRequestSg requestSg = new ClientSendMassageXixiaoPersonRequestSg(oauthConfigBaseInfo);
-            requestSg.setAlarmStartDateString(begin);
-            requestSg.setAlarmEndDateString(end);
-            requestSg.setAlarmType(303);
-            requestSg.setDbType(0);
-            requestSg.setDeviceCategory(1);
-            requestSg.setNodeCodeList(CommonConstant.XixiaoChannle);
-            System.out.println(requestSg);
-             res = requestSg.doAction();
-            JSONObject jsonObject = JSONObject.fromObject(res);
-            Object data = jsonObject.get("data");
-            JSONObject jsonObject1 = JSONObject.fromObject(data);
-            System.out.println(jsonObject1);
-            return jsonObject1.get("value").toString();
-        }
-        return null;
-
-
+    public String SendMassageXixiaoPerson(String begin, String end,OauthConfigBaseInfo oauthConfigBaseInfo,String[] constantChannle) throws ClientException {
+        ClientSendMassageXixiaoPersonRequestSg requestSg = new ClientSendMassageXixiaoPersonRequestSg(oauthConfigBaseInfo);
+        requestSg.setAlarmStartDateString(begin);
+        requestSg.setAlarmEndDateString(end);
+        requestSg.setAlarmType(303);
+        requestSg.setDbType(0);
+        requestSg.setDeviceCategory(1);
+        requestSg.setNodeCodeList(constantChannle);
+        System.out.println(requestSg);
+         String res = requestSg.doAction();
+        JSONObject jsonObject = JSONObject.fromObject(res);
+        Object data = jsonObject.get("data");
+        JSONObject jsonObject1 = JSONObject.fromObject(data);
+        System.out.println(jsonObject1);
+        return jsonObject1.get("value").toString();
     }
     }
 
 
+    public String SendMassageXixiaoPerson02(String begin, String end, OauthConfigBaseInfo02 oauthConfigBaseInfo, String[] constantChannle) throws ClientException {
+        ClientSendMassageXixiaoPersonRequestHn requestSg = new ClientSendMassageXixiaoPersonRequestHn(oauthConfigBaseInfo);
+        requestSg.setAlarmStartDateString(begin);
+        requestSg.setAlarmEndDateString(end);
+        requestSg.setAlarmType(303);
+        requestSg.setDbType(0);
+        requestSg.setDeviceCategory(1);
+        requestSg.setNodeCodeList(constantChannle);
+        System.out.println(requestSg);
+        String res = requestSg.doAction();
+        JSONObject jsonObject = JSONObject.fromObject(res);
+        Object data = jsonObject.get("data");
+        JSONObject jsonObject1 = JSONObject.fromObject(data);
+        System.out.println(jsonObject1);
+        return jsonObject1.get("value").toString();
+    }
+    public String SendMassageXixiaoPerson03(String begin, String end, OauthConfigBaseInfo03 oauthConfigBaseInfo, String[] constantChannle) throws ClientException {
+        ClientSendMassageXixiaoPersonRequestCn requestSg = new ClientSendMassageXixiaoPersonRequestCn(oauthConfigBaseInfo);
+        requestSg.setAlarmStartDateString(begin);
+        requestSg.setAlarmEndDateString(end);
+        requestSg.setAlarmType(303);
+        requestSg.setDbType(0);
+        requestSg.setDeviceCategory(1);
+        requestSg.setNodeCodeList(constantChannle);
+        System.out.println(requestSg);
+        String res = requestSg.doAction();
+        JSONObject jsonObject = JSONObject.fromObject(res);
+        Object data = jsonObject.get("data");
+        JSONObject jsonObject1 = JSONObject.fromObject(data);
+        System.out.println(jsonObject1);
+        return jsonObject1.get("value").toString();
+    }
 
 
     /**
     /**
      * //查大门 ---时间次数的接口-----
      * //查大门 ---时间次数的接口-----
@@ -344,7 +456,7 @@ public class GetResponse {
      * @return
      * @return
      * @throws ClientException
      * @throws ClientException
      */
      */
-    public String SendMassageSiZhuRecord(String begin, String end) throws ClientException {
+    public String SendMassageSiZhuRecord(String begin, String end,OauthConfigBaseInfo oauthConfigBaseInfo) throws ClientException {
         Map<String, Object> params = new HashMap<>();
         Map<String, Object> params = new HashMap<>();
         params.put("alarmStartDateString", begin);
         params.put("alarmStartDateString", begin);
         params.put("alarmEndDateString", end);
         params.put("alarmEndDateString", end);
@@ -374,6 +486,36 @@ public class GetResponse {
         System.out.println(jsonObject1);
         System.out.println(jsonObject1);
         return jsonObject1.get("value").toString();
         return jsonObject1.get("value").toString();
     }
     }
+   /* public String SendMassageSiZhuRecord(String begin, String end,OauthConfigBaseInfo oauthConfigBaseInfo) throws ClientException {
+        Map<String, Object> params = new HashMap<>();
+        params.put("alarmStartDateString", begin);
+        params.put("alarmEndDateString", end);
+        params.put("alarmType", 303);
+        params.put("dbType", 0);
+        params.put("deviceCategory", 1);
+        //死猪的通道
+        String[] nodeCodeList = CommonConstant.SIZhuChannle;
+        params.put("nodeCodeList", nodeCodeList);
+        String URL = "/evo-apigw/evo-event/1.0.0/alarm-record/count-num";  //获取事件URL    post请求
+        IClient iClient = new DefaultClient();
+        String NewUrl = URL;
+        System.out.println("开始执行");
+        //这种已经在配置文件里面安排了账号ip以及密码
+        GeneralRequest generalRequest = new GeneralRequest(NewUrl, Method.POST);
+        System.out.println(NewUrl);
+        generalRequest.header("Content-Type", " application/json");
+        System.out.println(JSON.toJSONString(params));
+        //里面是
+        generalRequest.body(JSON.toJSONString(params));
+        //发起请求处理应答
+        GeneralResponse generalResponse = iClient.doAction(generalRequest, generalRequest.getResponseClass());
+        System.out.println("执行结束");
+        JSONObject jsonObject = JSONObject.fromObject(generalResponse.getResult());
+        Object data = jsonObject.get("data");
+        JSONObject jsonObject1 = JSONObject.fromObject(data);
+        System.out.println(jsonObject1);
+        return jsonObject1.get("value").toString();
+    }*/
 
 
 
 
     public Object SendMassagePost(String param, String Url, String chooseMethod) throws ClientException {
     public Object SendMassagePost(String param, String Url, String chooseMethod) throws ClientException {