Explorar el Código

update filter staff without team

add_swagger
MSI\derek hace 11 meses
padre
commit
f446443975
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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 Ver fichero

@@ -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


Cargando…
Cancelar
Guardar