5
0

2 Коміти 15e10e521c ... 9a0ffd0f47

Автор SHA1 Опис Дата
  brealinxx 9a0ffd0f47 Merge branch 'dev' of https://git.yingcaibx.com/tl/api into dev 5 місяців тому
  brealinxx b22f93c469 进出记录修改 5 місяців тому

+ 10 - 12
src/main/java/com/xjrsoft/module/hikvision/util/OutInRecordUtil.java

@@ -122,16 +122,16 @@ public class OutInRecordUtil {
             }
             if (personId == null) continue;
 
-            int status = item.get("inAndOutType").getAsInt();
-//            int status = -1;
-//            switch (statusInt){
-//                case 0:
-//                    status = 1;
-//                    break;
-//                case 1:
-//                    status = 0;
-//                    break;
-//            }
+            int statusInt = item.get("inAndOutType").getAsInt();
+            int status = -1;
+            switch (statusInt){
+                case 0:
+                    status = 1;
+                    break;
+                case 1:
+                    status = 0;
+                    break;
+            }
 
             String uri = item.get("picUri").isJsonNull() ? null : item.get("picUri").getAsString();
             String recordTime = item.get("eventTime").isJsonNull() ? null : item.get("eventTime").getAsString();
@@ -465,8 +465,6 @@ 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);
     }

+ 0 - 1
src/main/java/com/xjrsoft/module/outint/controller/StudentOutInRecordController.java

@@ -80,7 +80,6 @@ public class StudentOutInRecordController {
                 .leftJoin(BaseClass.class,BaseClass::getId,StudentOutInRecord::getClassId,ext->ext.selectAs(BaseClass::getName,StudentOutInRecordPageVo::getClassCn))
                 .leftJoin(XjrUser.class,XjrUser::getId,StudentOutInRecord::getTeacherId,ext->ext.selectAs(XjrUser::getName,StudentOutInRecordPageVo::getTeacherCn))
                 .leftJoin(BaseStudentSchoolRoll.class,BaseStudentSchoolRoll::getUserId,StudentOutInRecord::getUserId)
-                .leftJoin(DictionaryDetail.class, DictionaryDetail::getCode, XjrUser::getGender,ext -> ext.selectAs(DictionaryDetail::getName, StudentOutInRecordPageVo::getGender))
                 .leftJoin(DictionaryDetail.class,DictionaryDetail::getCode, BaseStudentSchoolRoll::getStduyStatus, ext->ext.selectAs(DictionaryDetail::getName, StudentOutInRecordPageVo::getStduyStatusCn))
                 ;
 

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

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

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

@@ -83,8 +83,8 @@ class HikvisionBaseDataTaskTest {
 
     @Test
     void test() throws Exception {
-//        DataSource datasource = DatasourceUtil.getDataSource(GlobalConstant.DEFAULT_DATASOURCE_KEY);
-//        Db use = Db.use(datasource);
+        DataSource datasource = DatasourceUtil.getDataSource(GlobalConstant.DEFAULT_DATASOURCE_KEY);
+        Db use = Db.use(datasource);
 //        String sql = "SELECT distinct table_name FROM hikvision_data WHERE 1 = 1";
 //        List<JianyueData> query = use.query(sql, JianyueData.class);
 //        Set<String> tables = new HashSet<>();
@@ -138,7 +138,7 @@ class HikvisionBaseDataTaskTest {
 //        selectCar(use, carTableName);
 
 //        outInRecordUtil.GetVehicleRecord(use,faceImportMapper);
-//        outInRecordUtil.GetTeacherAndStudentRecords(use,faceImportMapper);
+        outInRecordUtil.GetTeacherAndStudentRecords(use,faceImportMapper);
 ////        selecAllPersonById(use);
 //        selectResource(use);
     }