|
@@ -47,7 +47,7 @@ public class ClientDoorController {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- //
|
|
|
|
|
|
+ //大门事件
|
|
@RequestMapping("/ListDoorEvent")
|
|
@RequestMapping("/ListDoorEvent")
|
|
public R ListDoorEvent(@RequestBody Map<String, Object> params1) throws ClientException, ParseException {
|
|
public R ListDoorEvent(@RequestBody Map<String, Object> params1) throws ClientException, ParseException {
|
|
Integer farmId = (int) params1.get("farmId");
|
|
Integer farmId = (int) params1.get("farmId");
|
|
@@ -55,11 +55,16 @@ public class ClientDoorController {
|
|
//返回为空数据
|
|
//返回为空数据
|
|
return R.ok("当前牧场无设备").put("data", null);
|
|
return R.ok("当前牧场无设备").put("data", null);
|
|
}
|
|
}
|
|
- return R.ok("请求成功").put("data", getAllKindEventList(params1)).put("total", CountTimes(params1));
|
|
|
|
|
|
+
|
|
|
|
+ System.out.println("yuyuyuyuyuyu");
|
|
|
|
+ return R.ok("请求成功").put("data", getDoorEvent(params1)).put("total", CountTimes(params1));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
//返回所有的事件 的集合 包括死猪和洗消和大门 --分页参数
|
|
//返回所有的事件 的集合 包括死猪和洗消和大门 --分页参数
|
|
- public GeneralResponse getAllKindEventList(Map<String, Object> params1) throws ClientException {
|
|
|
|
|
|
+ public GeneralResponse getDoorEvent(Map<String, Object> params1) 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();
|
|
@@ -85,6 +90,7 @@ public class ClientDoorController {
|
|
params.put("dbType", 0);
|
|
params.put("dbType", 0);
|
|
params.put("deviceCategory", 1);
|
|
params.put("deviceCategory", 1);
|
|
String[] nodeCodeList = CommonConstant.DoorChannle;
|
|
String[] nodeCodeList = CommonConstant.DoorChannle;
|
|
|
|
+ System.out.println("liebiaodamememememmee"+nodeCodeList);
|
|
params.put("nodeCodeList", nodeCodeList);
|
|
params.put("nodeCodeList", nodeCodeList);
|
|
// String URL = "/evo-apigw/evo-event/1.2.0/alarm-record/page"; //获取事件URL post请求
|
|
// String URL = "/evo-apigw/evo-event/1.2.0/alarm-record/page"; //获取事件URL post请求
|
|
String URL = "/evo-apigw/evo-event/1.2.0/alarm-record/page"; //获取事件URL post请求
|
|
String URL = "/evo-apigw/evo-event/1.2.0/alarm-record/page"; //获取事件URL post请求
|
|
@@ -96,13 +102,12 @@ public class ClientDoorController {
|
|
generalRequest.header("Content-Type", " application/json");
|
|
generalRequest.header("Content-Type", " application/json");
|
|
generalRequest.body(JSON.toJSONString(params));
|
|
generalRequest.body(JSON.toJSONString(params));
|
|
GeneralResponse generalResponse = iClient.doAction(generalRequest, generalRequest.getResponseClass());
|
|
GeneralResponse generalResponse = iClient.doAction(generalRequest, generalRequest.getResponseClass());
|
|
|
|
+ System.out.println("damen");
|
|
return generalResponse;
|
|
return generalResponse;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
public String CountTimes(Map<String, Object> params1) throws ClientException {
|
|
public String CountTimes(Map<String, Object> params1) 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();
|
|
@@ -126,7 +131,7 @@ public class ClientDoorController {
|
|
params.put("dbType", 0);
|
|
params.put("dbType", 0);
|
|
params.put("deviceCategory", 1);
|
|
params.put("deviceCategory", 1);
|
|
String[] nodeCodeList = CommonConstant.DoorChannle;
|
|
String[] nodeCodeList = CommonConstant.DoorChannle;
|
|
-
|
|
|
|
|
|
+ System.out.println(nodeCodeList+"大门 列表");
|
|
params.put("nodeCodeList", nodeCodeList);
|
|
params.put("nodeCodeList", nodeCodeList);
|
|
String URL = "/evo-apigw/evo-event/1.0.0/alarm-record/count-num"; //获取事件URL post请求
|
|
String URL = "/evo-apigw/evo-event/1.0.0/alarm-record/count-num"; //获取事件URL post请求
|
|
IClient iClient = new DefaultClient();
|
|
IClient iClient = new DefaultClient();
|
|
@@ -149,5 +154,4 @@ public class ClientDoorController {
|
|
return jsonObject1.get("value").toString();
|
|
return jsonObject1.get("value").toString();
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
}
|
|
}
|