去掉人脸
This commit is contained in:
@ -409,6 +409,7 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
||||
if (!checkInRange(req)) {
|
||||
throw new ServiceException("打卡位置不在范围内", HttpStatus.ERROR);
|
||||
}
|
||||
|
||||
}
|
||||
//用户信息校验
|
||||
SubConstructionUser constructionUser = constructionUserService.getBySysUserId(userId);
|
||||
@ -429,15 +430,16 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
||||
// 判断用户是否已经被拉黑
|
||||
constructionBlacklistService.validUserInBlacklist(constructionUser.getSysUserId(), req.getProjectId());
|
||||
Boolean result = false;
|
||||
// 进行人脸比对
|
||||
try {
|
||||
result = constructionUserService.faceComparison(file, userId);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(e.getMessage(), HttpStatus.ERROR);
|
||||
}
|
||||
|
||||
if (!result) {
|
||||
throw new ServiceException("人脸识别失败,请重新识别", HttpStatus.ERROR);
|
||||
// 进行人脸比对 考勤机过来不需进行这一步
|
||||
if (!"1".equals(req.getSource())) {
|
||||
try {
|
||||
result = constructionUserService.faceComparison(file, userId);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(e.getMessage(), HttpStatus.ERROR);
|
||||
}
|
||||
if (!result) {
|
||||
throw new ServiceException("人脸识别失败,请重新识别", HttpStatus.ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
//打卡规则
|
||||
|
||||
Reference in New Issue
Block a user