|
@@ -280,20 +280,38 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
|
|
|
Long serviceId = sopCrmInfo.getServiceUnitId();
|
|
|
Long flowId = sopCrmInfo.getFlowId();
|
|
|
RoleTypeEnum roleType = sysRoleService.findRoleTypeByUserCrm(userId, crmNo);
|
|
|
-
|
|
|
String signDate = DateFormatUtils.format(signTime, SystemConstant.DEFAULT_DATE_DAY_PATTERN);
|
|
|
String currentDayStr = DateFormatUtils.format(System.currentTimeMillis(), SystemConstant.DEFAULT_DATE_DAY_PATTERN);
|
|
|
if (!currentDayStr.equals(signDate)) {
|
|
|
throw ExceptionResultEnum.ERROR.exception("打卡失败,时间异常");
|
|
|
}
|
|
|
|
|
|
+ // 新增打卡历史记录
|
|
|
+ TBDingHistory history = new TBDingHistory();
|
|
|
+ history.setSopNo(sopNo);
|
|
|
+ history.setSignDate(signDate);
|
|
|
+ history.setDateType(dateType);
|
|
|
+ history.setSignTime(signTime);
|
|
|
+ history.setAxisX(axisX);
|
|
|
+ history.setAxisY(axisY);
|
|
|
+ history.setFaceOpen(faceOpen);
|
|
|
+ history.setFacePass(facePass);
|
|
|
+ history.setFacePhotoPath(facePhotoPath);
|
|
|
+ history.setMatchScore(score);
|
|
|
+ history.setCreateId(userId);
|
|
|
+ tbDingHistoryService.save(history);
|
|
|
+
|
|
|
+ if (faceOpen && !facePass){
|
|
|
+ log.error("人脸识别不通过,score :" + score);
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("人脸识别不通过!");
|
|
|
+ }
|
|
|
+
|
|
|
List<TBDing> tbDingList = this.list(new QueryWrapper<TBDing>().lambda()
|
|
|
.eq(TBDing::getSopNo, sopNo)
|
|
|
.eq(TBDing::getUserId, userId)
|
|
|
.eq(TBDing::getSignDate, signDate));
|
|
|
|
|
|
List<String> otherSopNoList = tbSopInfoService.findFlowPassageByCrmNo(crmNo);
|
|
|
-
|
|
|
if (CollectionUtils.isEmpty(tbDingList)) {
|
|
|
// 没有这天的打卡记录 - 新增打卡记录
|
|
|
TBDing tbDing = new TBDing();
|
|
@@ -363,21 +381,6 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
|
|
|
}
|
|
|
this.updateBatchById(recordList);
|
|
|
}
|
|
|
-
|
|
|
- // 新增打卡历史记录
|
|
|
- TBDingHistory history = new TBDingHistory();
|
|
|
- history.setSopNo(sopNo);
|
|
|
- history.setSignDate(signDate);
|
|
|
- history.setDateType(dateType);
|
|
|
- history.setSignTime(signTime);
|
|
|
- history.setAxisX(axisX);
|
|
|
- history.setAxisY(axisY);
|
|
|
- history.setFaceOpen(faceOpen);
|
|
|
- history.setFacePass(facePass);
|
|
|
- history.setFacePhotoPath(facePhotoPath);
|
|
|
- history.setMatchScore(score);
|
|
|
- history.setCreateId(userId);
|
|
|
- tbDingHistoryService.save(history);
|
|
|
}
|
|
|
|
|
|
/**
|