Sfoglia il codice sorgente

update filter staff without team

add_swagger
MSI\derek 11 mesi fa
parent
commit
f446443975
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. +2
    -2
      src/main/java/com/ffii/tsms/modules/common/mail/service/MailReminderService.kt

+ 2
- 2
src/main/java/com/ffii/tsms/modules/common/mail/service/MailReminderService.kt Vedi File

@@ -125,7 +125,7 @@ open class MailReminderService(
for (team in teams) {
// if (team.id?.toInt() != 5) continue // remove this when finishes
val teamLead = team.staff
val teamMembers: List<Staff> = staffs.filter { it.team.id == team.id }
val teamMembers: List<Staff> = staffs.filter { it.team != null && it.team.id == team.id }
if (teamMembers.isEmpty()) continue
val teamMembersIds: List<Long?> = teamMembers.map { it.id }.sorted()
val filteredTimesheet = timesheet.filter { teamMembersIds.contains(it.staff?.id) }
@@ -191,7 +191,7 @@ open class MailReminderService(
for (team in teams) {
// if (team.id?.toInt() != 5) continue // just for testing with fewer records, remove this when finishes
val teamLead = team.staff
val teamMembers: List<Staff> = staffs.filter { it.team.id == team.id }
val teamMembers: List<Staff> = staffs.filter { it.team != null &&it.team.id == team.id }
if (teamMembers.isEmpty()) continue
val teamMembersIds: List<Long?> = teamMembers.map { it.id }.sorted()
// getting the naughty list


Caricamento…
Annulla
Salva