|
|
@@ -5,7 +5,6 @@ import com.zd.algorithm.api.face.feign.RemoteFaceService;
|
|
|
import com.zd.algorithm.api.xxp.feign.RemoteXxpService;
|
|
|
import com.zd.base.app.domain.board.DutyPersonVo;
|
|
|
import com.zd.base.app.domain.board.LabXxpSubjectVo;
|
|
|
-import com.zd.common.core.security.TokenService;
|
|
|
import com.zd.common.core.utils.DateUtils;
|
|
|
import com.zd.common.core.utils.FileConfigUtils;
|
|
|
import com.zd.common.core.utils.StringUtils;
|
|
|
@@ -20,8 +19,8 @@ import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
-import java.rmi.Remote;
|
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
@@ -397,7 +396,7 @@ public class LabBoardApi {
|
|
|
@GetMapping(value = "/getCardIsOpen")
|
|
|
public ResultData getCardIsOpen(@RequestParam("labId") Long labId,@RequestParam("cardNum") String cardNum) {
|
|
|
Integer isOpen=0;
|
|
|
- ResultData resultData=remoteDutyService.securityNumList(labId);
|
|
|
+ ResultData resultData=remoteDutyService.securityNumList(labId,cardNum);
|
|
|
if(resultData==null && resultData.getCode()!=HttpStatus.SUCCESS){
|
|
|
return ResultData.fail("未识别到身份信息,请联系管理人员录入卡号信息");
|
|
|
}
|
|
|
@@ -405,13 +404,7 @@ public class LabBoardApi {
|
|
|
if(null==resultObj){
|
|
|
return ResultData.fail("未识别到身份信息,请联系管理人员录入卡号信息");
|
|
|
}
|
|
|
- List<Map<String, Object>> cardList= (List<Map<String, Object>>) resultObj;
|
|
|
- for(Map<String, Object> map:cardList){
|
|
|
- if(String.valueOf(map.get("cardNum")).equals(cardNum)){
|
|
|
- isOpen=1;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
+ isOpen=1;
|
|
|
return ResultData.success(isOpen);
|
|
|
}
|
|
|
|
|
|
@@ -424,7 +417,7 @@ public class LabBoardApi {
|
|
|
@ApiOperation(value = "刷卡验证")
|
|
|
@GetMapping(value = "/cardValidate")
|
|
|
public ResultData cardValidate(@RequestParam("labId") Long labId,@RequestParam("cardNum") String cardNum) {
|
|
|
- ResultData resultData=remoteDutyService.securityNumList(labId);
|
|
|
+ ResultData resultData=remoteDutyService.securityNumList(labId,cardNum);
|
|
|
if(resultData==null && resultData.getCode()!=HttpStatus.SUCCESS){
|
|
|
return ResultData.fail("未识别到身份信息,请联系管理人员录入卡号信息");
|
|
|
}
|
|
|
@@ -432,14 +425,7 @@ public class LabBoardApi {
|
|
|
if(null==resultObj){
|
|
|
return ResultData.fail("未识别到身份信息,请联系管理人员录入卡号信息");
|
|
|
}
|
|
|
- List<Map<String, Object>> cardList= (List<Map<String, Object>>) resultObj;
|
|
|
- for(Map<String, Object> map:cardList){
|
|
|
- System.out.println(String.valueOf(map.get("cardNum")));
|
|
|
- if(String.valueOf(map.get("cardNum")).equals(cardNum)){
|
|
|
- return ResultData.success(map);
|
|
|
- }
|
|
|
- }
|
|
|
- return ResultData.fail("未识别到身份信息,请联系管理人员录入卡号信息");
|
|
|
+ return resultData;
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -498,9 +484,26 @@ public class LabBoardApi {
|
|
|
return remoteDutyService.pwdValidate(cardNum,pwd,subjectId,userId);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 大海里找鱼
|
|
|
+ * @param faceCompare
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@ApiOperation(value = "人脸识别")
|
|
|
@GetMapping(value = "/multiFaceDetection")
|
|
|
public ResultData multiFaceDetection(@RequestBody FaceCompare faceCompare){
|
|
|
return remoteFaceService.multiFaceDetection(faceCompare);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 人脸识别获取特征值
|
|
|
+ * @param file
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @ApiOperation(value = "人脸识别获取特征值")
|
|
|
+ @GetMapping(value = "/faceFeature")
|
|
|
+ public ResultData faceFeature(@RequestParam("file") MultipartFile file){
|
|
|
+ return remoteFaceService.faceFeature(file);
|
|
|
+ }
|
|
|
}
|