|
@@ -8,9 +8,7 @@ import com.google.gson.JsonElement;
|
|
|
import com.google.gson.JsonObject;
|
|
|
import com.google.gson.JsonParser;
|
|
|
import com.xjrsoft.XjrSoftApplication;
|
|
|
-import com.xjrsoft.common.constant.GlobalConstant;
|
|
|
import com.xjrsoft.common.mybatis.SqlRunnerAdapter;
|
|
|
-import com.xjrsoft.common.utils.DatasourceUtil;
|
|
|
import com.xjrsoft.common.utils.SqlRunnerAdapterUtil;
|
|
|
import com.xjrsoft.module.base.entity.BaseClass;
|
|
|
import com.xjrsoft.module.evaluate.controller.EvaluateItemController;
|
|
@@ -20,18 +18,15 @@ import com.xjrsoft.module.hikvision.util.ApiUtil;
|
|
|
import com.xjrsoft.module.hikvision.util.DataUtil;
|
|
|
import com.xjrsoft.module.hikvision.util.OutInRecordUtil;
|
|
|
import com.xjrsoft.module.organization.entity.Department;
|
|
|
-import com.xjrsoft.module.schedule.entity.JianyueData;
|
|
|
import com.xjrsoft.module.teacher.entity.XjrUser;
|
|
|
import com.xjrsoft.module.teacher.mapper.FaceImportMapper;
|
|
|
import com.yomahub.liteflow.util.JsonUtil;
|
|
|
-import lombok.var;
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
import org.junit.runner.RunWith;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
|
|
|
|
|
-import javax.sql.DataSource;
|
|
|
import java.sql.SQLException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
@@ -180,7 +175,16 @@ class HikvisionBaseDataTaskTest {
|
|
|
new QueryWrapper<HikvisionData>().lambda().eq(HikvisionData::getTableName, tableName)
|
|
|
);
|
|
|
Map<String, String> baseStudent = dataMap.get(tableName);
|
|
|
- Map<String, String> student = insertStudentOne(tableName, baseStudent, studentList);
|
|
|
+ insertStudentOne(tableName, baseStudent, studentList);
|
|
|
+// sql = "SELECT * FROM wf_room_applicant WHERE delete_mark = 0 AND STATUS = 1";
|
|
|
+// List<Map<String, Object>> wfRoomApplicantList = SqlRunnerAdapter.db().selectList(sql);
|
|
|
+//
|
|
|
+// Map<String, String> baseStudent = dataMap.get(tableName);
|
|
|
+// for (Map<String, Object> objectMap : wfRoomApplicantList) {
|
|
|
+// Long applicantUserId = Long.parseLong(objectMap.get("applicant_user_id").toString());
|
|
|
+// Map<String, String> student = dataUtil.insertStudentOne(tableName, baseStudent, studentList, applicantUserId);
|
|
|
+// }
|
|
|
+
|
|
|
|
|
|
// selectOrg(use, "base_class");
|
|
|
|
|
@@ -241,8 +245,7 @@ class HikvisionBaseDataTaskTest {
|
|
|
" INNER JOIN base_class t3 ON t2.class_id = t3.id" +
|
|
|
" INNER JOIN base_grade t4 ON t3.grade_id = t4.id" +
|
|
|
" WHERE t1.delete_mark = 0 AND t2.delete_mark = 0" +
|
|
|
- " AND t3.class_type IS NOT NULL AND t3.is_graduate = 1" +
|
|
|
- " AND t3.id = 1828994300931256321";
|
|
|
+ " AND t3.class_type IS NOT NULL AND t3.is_graduate = 1";
|
|
|
List<Map<String, Object>> list = SqlRunnerAdapter.db().selectList(sql, String[].class);
|
|
|
Map<Integer, String> clientMap = new HashMap<>();
|
|
|
List<Entity> insertList = new ArrayList<>();
|
|
@@ -292,7 +295,7 @@ class HikvisionBaseDataTaskTest {
|
|
|
paramJson.addProperty("gender", gender);
|
|
|
|
|
|
if(historyMap.containsKey(id)){
|
|
|
- if(!paramJson.toString().equals(historyMap.get(id))){
|
|
|
+ if(historyMap.get(id) ==null || !paramJson.toString().equals(historyMap.get(id))){
|
|
|
updateList.add(paramJson);
|
|
|
}
|
|
|
continue;
|