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