Преглед изворни кода

Email reminder to WY and TW team first

add_swagger
MSI\2Fi пре 10 месеци
родитељ
комит
ddf0a8ff99
1 измењених фајлова са 3 додато и 3 уклоњено
  1. +3
    -3
      src/main/java/com/ffii/tsms/modules/common/mail/service/MailReminderService.kt

+ 3
- 3
src/main/java/com/ffii/tsms/modules/common/mail/service/MailReminderService.kt Прегледај датотеку

@@ -135,7 +135,7 @@ open class MailReminderService(
}
// val timesheet = timesheetRepository.findByDeletedFalseAndRecordDateBetweenOrderByRecordDate(filteredLastMonthDays.first(),filteredLastMonthDays.last())
val staffs = staffRepository.findAllByEmployTypeAndDeletedFalseAndDepartDateIsNull(FULLTIME)
val teams = teamRepository.findAll().filter { team -> team.deleted == false }
val teams = teamRepository.findAll().filter { team -> team.deleted == false && ( team.code == "WY" || team.code == "TW") }

for (team in teams) {
// if (team.id?.toInt() != 5) continue // remove this when finishes
@@ -224,7 +224,7 @@ open class MailReminderService(
}
// val timesheet = timesheetRepository.findByDeletedFalseAndRecordDateBetweenOrderByRecordDate(firstDay, today)
val staffs = staffRepository.findAllByEmployTypeAndDeletedFalseAndDepartDateIsNull(FULLTIME)
val teams = teamRepository.findAll().filter { team -> team.deleted == false }
val teams = teamRepository.findAll().filter { team -> team.deleted == false && ( team.code == "WY" || team.code == "TW" )}

val dateList = generateSequence(firstDay) { it.plusDays(1) }
.takeWhile { it <= today }
@@ -333,7 +333,7 @@ open class MailReminderService(
)
}
// val timesheet = timesheetRepository.findByDeletedFalseAndRecordDateBetweenOrderByRecordDate(sevenDaysBefore, fourDaysBefore)
val staffs = staffRepository.findAllByEmployTypeAndDeletedFalseAndDepartDateIsNull(FULLTIME) // FT? FT? etc
val staffs = staffRepository.findAllByEmployTypeAndDeletedFalseAndDepartDateIsNull(FULLTIME).filter { staff: Staff? -> staff?.team?.code == "WY" || staff?.team?.code == "TW" } // FT? FT? etc
val staffIds: List<Long> = staffs.map { it.id as Long }

// val timesheetByIdAndRecord = timesheet.groupBy { it.staff?.id to it.recordDate }


Loading…
Откажи
Сачувај