|
@@ -118,7 +118,7 @@ public class TeacherStatisticsController {
|
|
|
// outInMap.put(inRecord.getUserId(), inRecord);
|
|
|
// }
|
|
|
for (TeacherStatisticsPageVo record : voIPage.getRecords()) {
|
|
|
- LocalDateTime startTime, endTime;
|
|
|
+ LocalDateTime startTime, endTime, amEndTime = null;
|
|
|
AttendanceRuleDetailsUserVo detailsUserVo = teacherTodyRuleByUserId.get(record.getUserId());
|
|
|
if(dto.getTimePeriod() == 1){
|
|
|
startTime = queryDate.atTime(5, 0, 0);
|
|
@@ -138,6 +138,10 @@ public class TeacherStatisticsController {
|
|
|
if(detailsUserVo != null && detailsUserVo.getPmEndTime() != null){
|
|
|
endTime = queryDate.atTime(detailsUserVo.getPmEndTime());
|
|
|
}
|
|
|
+ amEndTime = queryDate.atTime(12, 0, 0);
|
|
|
+ if(detailsUserVo != null && detailsUserVo.getAmEndTime() != null){
|
|
|
+ amEndTime = queryDate.atTime(detailsUserVo.getAmEndTime());
|
|
|
+ }
|
|
|
}else{
|
|
|
startTime = queryDate.atTime(0, 0, 0);
|
|
|
if(detailsUserVo != null && detailsUserVo.getEveningStartTime() != null){
|
|
@@ -180,6 +184,7 @@ public class TeacherStatisticsController {
|
|
|
if(outInRecord != null){
|
|
|
record.setRecordTime(outInRecord.getRecordTime());
|
|
|
record.setStatus(outInRecord.getAttendanceStatus());
|
|
|
+ record.setAttendanceMode("人脸");
|
|
|
}
|
|
|
}else{
|
|
|
//查询该教师是否通过车辆进入
|
|
@@ -190,6 +195,7 @@ public class TeacherStatisticsController {
|
|
|
.le(TeacherOutInRecord::getRecordTime, endTime)
|
|
|
.eq("DATE_FORMAT(record_time, '%Y-%m-%d')", endTime.toLocalDate())
|
|
|
.eq(CarMessageApply::getUserId, record.getUserId())
|
|
|
+ .ge(dto.getTimePeriod() == 2 && amEndTime != null, TeacherOutInRecord::getRecordTime, amEndTime)
|
|
|
.orderByAsc(CarOutInRecord::getRecordTime)
|
|
|
);
|
|
|
if(!list.isEmpty()){
|
|
@@ -197,9 +203,13 @@ public class TeacherStatisticsController {
|
|
|
if(outInRecord != null && outInRecord.getRecordTime().isBefore(startTime)){
|
|
|
record.setRecordTime(outInRecord.getRecordTime());
|
|
|
record.setStatus("到校");
|
|
|
+ record.setAttendanceMode("车辆");
|
|
|
+ record.setCarNumber(outInRecord.getPlanNo());
|
|
|
}else if(outInRecord != null && outInRecord.getRecordTime().isAfter(startTime)){
|
|
|
record.setRecordTime(outInRecord.getRecordTime());
|
|
|
record.setStatus("迟到");
|
|
|
+ record.setAttendanceMode("车辆");
|
|
|
+ record.setCarNumber(outInRecord.getPlanNo());
|
|
|
}
|
|
|
}
|
|
|
}
|