瀏覽代碼

update filter staff without team

add_swagger
MSI\derek 11 月之前
父節點
當前提交
f446443975
共有 1 個文件被更改,包括 2 次插入2 次删除
  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 查看文件

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


Loading…
取消
儲存