brealinxx 5 mesiacov pred
rodič
commit
47d9aa0d50

+ 4 - 2
src/main/java/com/xjrsoft/module/hikvision/util/OutInRecordUtil.java

@@ -105,7 +105,7 @@ public class OutInRecordUtil {
 
             JsonObject responseJson = new Gson().fromJson(response, JsonObject.class);
             int totalCount = responseJson.getAsJsonObject("data").get("totalPage").getAsInt();
-            hasMorePages = pageNo.getAndIncrement() * pageSize < totalCount;
+            hasMorePages = pageNo.getAndIncrement() < totalCount;
         }
         // Process the records
         InsertTeacherStudentRecords(use, responseBuilder, faceImportMapper);
@@ -326,7 +326,7 @@ public class OutInRecordUtil {
 
             JsonObject responseJson = new Gson().fromJson(response, JsonObject.class);
             int totalCount = responseJson.getAsJsonObject("data").get("total").getAsInt();
-            hasMorePages = pageNo.getAndIncrement() * pageSize < totalCount;
+            hasMorePages = pageNo.getAndIncrement() < totalCount;
         }
 
         InsertVisitRecords(use, responseBuilder,responseDoorBuilder,faceImportMapper);
@@ -469,6 +469,8 @@ public class OutInRecordUtil {
         JsonObject paramJson = new JsonObject();
         paramJson.addProperty("pageNo", pageNo.get());
         paramJson.addProperty("pageSize", pageSize);
+        paramJson.addProperty("startTime", "2024-06-01T00:00:00Z");
+        paramJson.addProperty("endTime", "2024-06-12T00:00:00Z");
 
         return apiUtil.doPost(apiPath, String.valueOf(paramJson), null);
     }

+ 1 - 1
src/main/resources/application.yml

@@ -5,7 +5,7 @@ server:
 spring:
   # 环境 dev|pre|prod
   profiles:
-    active: prod
+    active: dev
   # jackson时间格式化
   jackson:
     time-zone: GMT+8

+ 1 - 1
src/test/java/com/xjrsoft/module/job/HikvisionBaseDataTaskTest.java

@@ -105,7 +105,7 @@ class HikvisionBaseDataTaskTest {
 //        selectCar(use, carTableName);
 
 //        outInRecordUtil.GetVehicleRecord(use,faceImportMapper);
-        outInRecordUtil.GetVehicleRecord(use,faceImportMapper);
+        outInRecordUtil.GetTeacherAndStudentRecords(use,faceImportMapper);
 ////        selecAllPersonById(use);
 //        selectResource(use);
     }