Przeglądaj źródła

1.日本模板导出 修改 显示迟到1次

2.删除模板没用的元素
3.国内模板迟到超过1分钟算迟到
main
wangqiang 2 dni temu
rodzic
commit
042cd4d840

+ 16
- 3
zs-manager/src/main/java/com/ruoyi/zhushi/service/impl/DkRecordServiceImpl.java Wyświetl plik

dayRecord.setEndTime(null != dk.getClockOut() ? dk.getClockOut().format(DateTimeFormatter.ofPattern("HH:mm:ss")) : ""); dayRecord.setEndTime(null != dk.getClockOut() ? dk.getClockOut().format(DateTimeFormatter.ofPattern("HH:mm:ss")) : "");
// 迟到早退判断 // 迟到早退判断
if(dk.getClockIn() != null && dk.getClockOut() != null){ if(dk.getClockIn() != null && dk.getClockOut() != null){
if(dk.getClockIn().isAfter(workStartTime1)){
if(dk.getClockIn().isAfter(workStartTime1.plusMinutes(1))){
dayRecord.setChidao("●"); dayRecord.setChidao("●");
dayRecord.setRemark("迟到1次"); dayRecord.setRemark("迟到1次");
lateCount ++; lateCount ++;
if (isLeave) { if (isLeave) {
DayRecord record = new DayRecord(); DayRecord record = new DayRecord();
record.setNj("●"); record.setNj("●");
record.setRemark("年假");
record.setRemark("年假1天");
fillTemplateCell(sheet, rowIndex, record); fillTemplateCell(sheet, rowIndex, record);
njCount++; njCount++;
} }


//根据userId获取打卡配置信息 //根据userId获取打卡配置信息
DkAttendanceGroup dkAttendanceGroup = dkMapper.queryConfigByUserId(dkCheckInRecordDTO.getSysUserId()); DkAttendanceGroup dkAttendanceGroup = dkMapper.queryConfigByUserId(dkCheckInRecordDTO.getSysUserId());

// 定义迟到次数
int lateCount = 0;
// 构造excel数据 // 构造excel数据
for(DkCheckInRecordDTO dk : dkCheckInRecordDTOS){ for(DkCheckInRecordDTO dk : dkCheckInRecordDTOS){
// 根据打卡时间获取打卡日期 // 根据打卡时间获取打卡日期
workStartTime1, workEndTime1, workStartTime1, workEndTime1,
lunchStartTime1, lunchEndTime1); lunchStartTime1, lunchEndTime1);
dayRecord.setRbHalf(rbHalf); dayRecord.setRbHalf(rbHalf);

// 迟到判断
if(dk.getClockIn() != null && dk.getClockOut() != null){
if(dk.getClockIn().isAfter(workStartTime1.plusMinutes(1))){
dayRecord.setChidao("●");
dayRecord.setRemark("迟到1次");
lateCount ++;
}

}

dayRecords.add(dayRecord); dayRecords.add(dayRecord);
} }


} }
setCellValue(sheet, rowIndex, 3, startTime); setCellValue(sheet, rowIndex, 3, startTime);
setCellValue(sheet, rowIndex, 4, endTime); setCellValue(sheet, rowIndex, 4, endTime);
setCellValue(sheet, rowIndex, 8, record.getRemark());
} }


/** /**

BIN
zs-manager/src/main/resources/template/template-riben.xlsx Wyświetl plik


Ładowanie…
Anuluj
Zapisz