|
|
@@ -1,6 +1,7 @@
|
|
|
package com.xjrsoft.module.hikvision.util;
|
|
|
|
|
|
import com.google.gson.JsonObject;
|
|
|
+import com.xjrsoft.module.personnel.entity.TeacherFaceProcess;
|
|
|
import com.xjrsoft.module.teacher.mapper.FaceImportMapper;
|
|
|
|
|
|
import java.io.ByteArrayOutputStream;
|
|
|
@@ -18,7 +19,7 @@ public class FaceImportUtil {
|
|
|
|
|
|
public static String ImportTeacherFace(Long id) {
|
|
|
JsonObject paramJson = new JsonObject();
|
|
|
- paramJson.addProperty("personId", faceImportMapper.GetTeacherHikvisionIdById(id));
|
|
|
+ paramJson.addProperty("personId", faceImportMapper.GetStudentHikvisionIdById(id));
|
|
|
paramJson.addProperty("faceData", ImageToBase64(faceImportMapper.GetTeacherHikvisionImgById(id)));
|
|
|
|
|
|
Map<String, String> querys = new HashMap<>();
|
|
|
@@ -64,35 +65,4 @@ public class FaceImportUtil {
|
|
|
}
|
|
|
return base64String;
|
|
|
}
|
|
|
-
|
|
|
- // public String AddFace(Long id){
|
|
|
-// JsonObject paramJson = new JsonObject();
|
|
|
-// paramJson.addProperty("name", teacherFaceImportMapper.GetHikvisionIdById(id));
|
|
|
-// paramJson.addProperty("description", "none");
|
|
|
-//
|
|
|
-// Map<String, String> querys = new HashMap<>();
|
|
|
-//
|
|
|
-// String apiPath = "/api/frs/v1/face/group/single/addition";
|
|
|
-// String response = ApiUtil.doPost(apiPath, String.valueOf(paramJson), querys);
|
|
|
-//// ObjectMapper mapper = new ObjectMapper();
|
|
|
-//// try {
|
|
|
-//// JsonNode rootNode = mapper.readTree(response);
|
|
|
-//// JsonNode dataNode = rootNode.path("data");
|
|
|
-//// JsonNode indexCodeNode = dataNode.path("indexCode");
|
|
|
-////
|
|
|
-//// if (indexCodeNode != null && !indexCodeNode.isNull()) {
|
|
|
-//// String indexCode = indexCodeNode.asText();
|
|
|
-//// return indexCode;
|
|
|
-//// } else {
|
|
|
-//// System.out.println("IndexCode is null or not present");
|
|
|
-//// return null;
|
|
|
-//// }
|
|
|
-//// } catch (JsonProcessingException e) {
|
|
|
-//// e.printStackTrace();
|
|
|
-//// return null;
|
|
|
-//// } catch (Exception e) {
|
|
|
-//// e.printStackTrace();
|
|
|
-//// return null;
|
|
|
-//// }
|
|
|
-// }
|
|
|
}
|