Procházet zdrojové kódy

增加查询当天查询条件

main
1341924763@qq.com před 4 dny
rodič
revize
e5ab38884f

+ 3
- 2
zs-manager/src/main/java/com/ruoyi/zhushi/service/impl/DkAppServiceImpl.java Zobrazit soubor

@@ -33,6 +33,7 @@ public class DkAppServiceImpl implements DkAppService {
// 判断是否已经打卡,如果已经打卡,则不允许再次打卡
LambdaQueryWrapper<DkCheckInRecord> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(DkCheckInRecord::getSysUserId, appDTO.getUserId());
queryWrapper.apply("DATE(check_in_time) = DATE(NOW())");
List<DkCheckInRecord> dkCheckInRecords = dkRecordMapper.selectList(queryWrapper);
if (dkCheckInRecords.size() > 0){
return "已经打卡,不允许重复打卡!";
@@ -59,7 +60,7 @@ public class DkAppServiceImpl implements DkAppService {
// 允许迟到打卡
if(appDTO1.getAllowLate()){
// 根据允许的范围进行是否可以打卡判断
boolean b = allowCheckIn(workStartTime, appDTO.getLateRange());
boolean b = allowCheckIn(workStartTime, appDTO1.getLateRange());
// true 表示在可以迟到的时间内,进行正常打卡
if(!b){
dkCheckInRecord.setSysUserId(appDTO.getUserId());
@@ -232,7 +233,7 @@ public class DkAppServiceImpl implements DkAppService {
// 判断是否允许提前打卡
if(appDTO1.getAllowEarly()){
// 根据允许的范围进行是否可以打卡判断 true 在允许的范围内, false 不在允许的范围内
boolean b = allowCheckIn(workEndTime, appDTO.getEarlyRange());
boolean b = allowCheckIn(workEndTime, appDTO1.getEarlyRange());
if(!b){
dkCheckInRecord.setCheckInTime(TimeUtils.parseStr2LocalDateTime(appDTO.getClockOut()));
dkCheckInRecord.setClockOut(TimeUtils.parseStr2LocalDateTime(appDTO.getClockOut()));

Načítá se…
Zrušit
Uložit