Bläddra i källkod

update filter staff without team

add_swagger
MSI\derek 11 månader sedan
förälder
incheckning
f446443975
1 ändrade filer med 2 tillägg och 2 borttagningar
  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 Visa fil

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


Laddar…
Avbryt
Spara