|
@@ -1,5 +1,6 @@
|
|
|
package com.huimv.video.dhicc.test.controller;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
import com.dahuatech.icc.exception.ClientException;
|
|
@@ -405,7 +406,10 @@ public class ClientPersonManageControllerTest {
|
|
|
@RequestMapping("/get_person_record_totalpage")
|
|
|
public Object get_person_record_totalpage(@RequestBody Map<String, Object> params) throws ClientException {
|
|
|
Integer farmId = (int) params.get("farmId");
|
|
|
- String timestamp = String.valueOf((new Date()).getTime());
|
|
|
+ String timestamp = (String) params.get("startSwingTime");
|
|
|
+ String endTime = (String) params.get("endSwingTime");
|
|
|
+
|
|
|
+ Integer openType = (Integer) params.get("openType");
|
|
|
Object action = null;
|
|
|
|
|
|
if (farmId == 1) {
|
|
@@ -414,8 +418,19 @@ public class ClientPersonManageControllerTest {
|
|
|
requestSg.setPageNum(1);
|
|
|
requestSg.setPageSize(20);
|
|
|
requestSg.setStartSwingTime(timestamp);
|
|
|
- Object action1 = requestSg.doAction();
|
|
|
- action=action1;
|
|
|
+ requestSg.setEndSwingTime(endTime);
|
|
|
+ requestSg.setOpenType(openType);
|
|
|
+ Object res = requestSg.doAction();
|
|
|
+ JSONObject jsonObject=JSONObject.parseObject((String) res);
|
|
|
+ System.out.println(jsonObject);
|
|
|
+ JSONObject data = (JSONObject) jsonObject.get("data");
|
|
|
+ JSONArray pageData1 = (JSONArray) data.get("pageData");
|
|
|
+ System.out.println(pageData1.size());
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ JSONObject jsonObject1 = new JSONObject();
|
|
|
+ jsonObject1.put("count", pageData1.size());
|
|
|
+ map.put("data", jsonObject1);
|
|
|
+ action = R.ok().put("data", jsonObject1);
|
|
|
}
|
|
|
if (farmId == 22) {
|
|
|
System.out.println("haining");
|
|
@@ -423,8 +438,18 @@ public class ClientPersonManageControllerTest {
|
|
|
requestHn.setPageNum(1);
|
|
|
requestHn.setPageSize(20);
|
|
|
requestHn.setStartSwingTime(timestamp);
|
|
|
- Object action1 = requestHn.doAction();
|
|
|
- action=action1;
|
|
|
+ requestHn.setOpenType(openType);
|
|
|
+ Object res = requestHn.doAction();
|
|
|
+ JSONObject jsonObject=JSONObject.parseObject((String) res);
|
|
|
+ System.out.println(jsonObject);
|
|
|
+ JSONObject data = (JSONObject) jsonObject.get("data");
|
|
|
+ JSONArray pageData1 = (JSONArray) data.get("pageData");
|
|
|
+ System.out.println(pageData1.size());
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ JSONObject jsonObject1 = new JSONObject();
|
|
|
+ jsonObject1.put("count", pageData1.size());
|
|
|
+ map.put("data", jsonObject1);
|
|
|
+ action = R.ok().put("data", jsonObject1);
|
|
|
}
|
|
|
if (farmId == 21) {
|
|
|
System.out.println("cangnan");
|
|
@@ -432,8 +457,18 @@ public class ClientPersonManageControllerTest {
|
|
|
requestCn.setPageNum(1);
|
|
|
requestCn.setPageSize(20);
|
|
|
requestCn.setStartSwingTime(timestamp);
|
|
|
- Object action1 = requestCn.doAction();
|
|
|
- action=action1;
|
|
|
+ requestCn.setOpenType(openType);
|
|
|
+ Object res = requestCn.doAction();
|
|
|
+ JSONObject jsonObject=JSONObject.parseObject((String) res);
|
|
|
+ System.out.println(jsonObject);
|
|
|
+ JSONObject data = (JSONObject) jsonObject.get("data");
|
|
|
+ JSONArray pageData1 = (JSONArray) data.get("pageData");
|
|
|
+ System.out.println(pageData1.size());
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ JSONObject jsonObject1 = new JSONObject();
|
|
|
+ jsonObject1.put("count", pageData1.size());
|
|
|
+ map.put("data", jsonObject1);
|
|
|
+ action = R.ok().put("data", jsonObject1);
|
|
|
}
|
|
|
return action;
|
|
|
}
|