|
@@ -119,7 +119,7 @@ open class MailReminderService( |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
val timesheet = timesheetRepository.findByDeletedFalseAndRecordDateBetweenOrderByRecordDate(filteredLastMonthDays.first(),filteredLastMonthDays.last()) |
|
|
val timesheet = timesheetRepository.findByDeletedFalseAndRecordDateBetweenOrderByRecordDate(filteredLastMonthDays.first(),filteredLastMonthDays.last()) |
|
|
val staffs = staffRepository.findAllByEmployTypeAndDeletedFalse(FULLTIME) |
|
|
|
|
|
|
|
|
val staffs = staffRepository.findAllByEmployTypeAndDeletedFalseAndDepartDateIsNull(FULLTIME) |
|
|
val teams = teamRepository.findAll().filter { team -> team.deleted == false } |
|
|
val teams = teamRepository.findAll().filter { team -> team.deleted == false } |
|
|
|
|
|
|
|
|
for (team in teams) { |
|
|
for (team in teams) { |
|
@@ -177,7 +177,7 @@ open class MailReminderService( |
|
|
|
|
|
|
|
|
//get data |
|
|
//get data |
|
|
val timesheet = timesheetRepository.findByDeletedFalseAndRecordDateBetweenOrderByRecordDate(firstDay, today) |
|
|
val timesheet = timesheetRepository.findByDeletedFalseAndRecordDateBetweenOrderByRecordDate(firstDay, today) |
|
|
val staffs = staffRepository.findAllByEmployTypeAndDeletedFalse(FULLTIME) |
|
|
|
|
|
|
|
|
val staffs = staffRepository.findAllByEmployTypeAndDeletedFalseAndDepartDateIsNull(FULLTIME) |
|
|
val teams = teamRepository.findAll().filter { team -> team.deleted == false } |
|
|
val teams = teamRepository.findAll().filter { team -> team.deleted == false } |
|
|
|
|
|
|
|
|
val dateList = generateSequence(firstDay) { it.plusDays(1) } |
|
|
val dateList = generateSequence(firstDay) { it.plusDays(1) } |
|
@@ -268,7 +268,7 @@ open class MailReminderService( |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
val timesheet = timesheetRepository.findByDeletedFalseAndRecordDateBetweenOrderByRecordDate(sevenDaysBefore, fourDaysBefore) |
|
|
val timesheet = timesheetRepository.findByDeletedFalseAndRecordDateBetweenOrderByRecordDate(sevenDaysBefore, fourDaysBefore) |
|
|
val staffs = staffRepository.findAllByEmployTypeAndDeletedFalse(FULLTIME) // FT? FT? etc |
|
|
|
|
|
|
|
|
val staffs = staffRepository.findAllByEmployTypeAndDeletedFalseAndDepartDateIsNull(FULLTIME) // FT? FT? etc |
|
|
val staffIds: List<Long> = staffs.map { it.id as Long } |
|
|
val staffIds: List<Long> = staffs.map { it.id as Long } |
|
|
|
|
|
|
|
|
val timesheetByIdAndRecord = timesheet.groupBy { it.staff?.id to it.recordDate } |
|
|
val timesheetByIdAndRecord = timesheet.groupBy { it.staff?.id to it.recordDate } |
|
@@ -338,7 +338,7 @@ open class MailReminderService( |
|
|
val timesheet = timesheetRepository.findByDeletedFalseAndRecordDateBetweenOrderByRecordDate(sevenDaysBefore,fourDaysBefore) |
|
|
val timesheet = timesheetRepository.findByDeletedFalseAndRecordDateBetweenOrderByRecordDate(sevenDaysBefore,fourDaysBefore) |
|
|
// just getting my own staff record |
|
|
// just getting my own staff record |
|
|
// change it back later |
|
|
// change it back later |
|
|
val staffs = staffRepository.findAllByEmployTypeAndDeletedFalse(FULLTIME) |
|
|
|
|
|
|
|
|
val staffs = staffRepository.findAllByEmployTypeAndDeletedFalseAndDepartDateIsNull(FULLTIME) |
|
|
val staffIds: List<Long> = staffs.map { it.id as Long } |
|
|
val staffIds: List<Long> = staffs.map { it.id as Long } |
|
|
|
|
|
|
|
|
val timesheetByIdAndRecord = timesheet.groupBy { it.staff?.id to it.recordDate } |
|
|
val timesheetByIdAndRecord = timesheet.groupBy { it.staff?.id to it.recordDate } |
|
|