|
@@ -3672,14 +3672,11 @@ open class ReportService( |
|
|
val targetTeam = team.code |
|
|
val targetTeam = team.code |
|
|
_timesheets = timesheets.filter { ts -> |
|
|
_timesheets = timesheets.filter { ts -> |
|
|
// val staffTeam = ts.staff!!.team.code |
|
|
// val staffTeam = ts.staff!!.team.code |
|
|
println(ts.staff!!.id!!) |
|
|
|
|
|
println(ts.id) |
|
|
|
|
|
println(ts.recordDate) |
|
|
|
|
|
val staffTeam = teamlog.find { |
|
|
val staffTeam = teamlog.find { |
|
|
it.staff.id == ts.staff!!.id |
|
|
it.staff.id == ts.staff!!.id |
|
|
&& it.from <= ts.recordDate && (it.to == null || it.to >= ts.recordDate) |
|
|
&& it.from <= ts.recordDate && (it.to == null || it.to >= ts.recordDate) |
|
|
&& it.deleted == false |
|
|
&& it.deleted == false |
|
|
}!!.team.code |
|
|
|
|
|
|
|
|
}?.team?.code ?: ts.staff?.team?.code |
|
|
val projectTeam = ts.project!!.teamLead!!.team.code |
|
|
val projectTeam = ts.project!!.teamLead!!.team.code |
|
|
projectTeam != staffTeam && |
|
|
projectTeam != staffTeam && |
|
|
(staffTeam == targetTeam || projectTeam == targetTeam ) |
|
|
(staffTeam == targetTeam || projectTeam == targetTeam ) |
|
@@ -3691,7 +3688,7 @@ open class ReportService( |
|
|
it.staff.id == ts.staff!!.id |
|
|
it.staff.id == ts.staff!!.id |
|
|
&& it.from.isBefore(ts.recordDate) && (it.to == null || it.to.isAfter(ts.recordDate)) |
|
|
&& it.from.isBefore(ts.recordDate) && (it.to == null || it.to.isAfter(ts.recordDate)) |
|
|
&& it.deleted == false |
|
|
&& it.deleted == false |
|
|
}!!.team.code |
|
|
|
|
|
|
|
|
}?.team?.code ?: ts.staff?.team?.code |
|
|
val projectTeam = ts.project!!.teamLead!!.team.code |
|
|
val projectTeam = ts.project!!.teamLead!!.team.code |
|
|
projectTeam != staffTeam |
|
|
projectTeam != staffTeam |
|
|
} |
|
|
} |
|
@@ -3700,8 +3697,6 @@ open class ReportService( |
|
|
// this team charging others |
|
|
// this team charging others |
|
|
// get the grade and salary data of the record |
|
|
// get the grade and salary data of the record |
|
|
val _grade = gradeLog.find { |
|
|
val _grade = gradeLog.find { |
|
|
println("it staff: ${it.staff.id} ; ts staff: ${ts.staff!!.id}") |
|
|
|
|
|
println(it.staff.id == ts.staff!!.id) |
|
|
|
|
|
it.staff != null && it.staff.id == ts.staff!!.id |
|
|
it.staff != null && it.staff.id == ts.staff!!.id |
|
|
&& it.from <= ts.recordDate && (it.to == null || it.to >=ts.recordDate) |
|
|
&& it.from <= ts.recordDate && (it.to == null || it.to >=ts.recordDate) |
|
|
&& it.deleted == false |
|
|
&& it.deleted == false |
|
@@ -4220,7 +4215,7 @@ open class ReportService( |
|
|
it.staff.id == ts.staff!!.id |
|
|
it.staff.id == ts.staff!!.id |
|
|
&& it.from.isBefore(ts.recordDate) && (it.to == null || it.to.isAfter(ts.recordDate)) |
|
|
&& it.from.isBefore(ts.recordDate) && (it.to == null || it.to.isAfter(ts.recordDate)) |
|
|
&& it.deleted == false |
|
|
&& it.deleted == false |
|
|
}!!.team.code |
|
|
|
|
|
|
|
|
}?.team?.code ?: ts.staff?.team?.code |
|
|
val projectTeam = ts.project!!.teamLead!!.team.code |
|
|
val projectTeam = ts.project!!.teamLead!!.team.code |
|
|
projectTeam != staffTeam && |
|
|
projectTeam != staffTeam && |
|
|
(staffTeam == targetTeam || projectTeam == targetTeam ) |
|
|
(staffTeam == targetTeam || projectTeam == targetTeam ) |
|
@@ -4234,7 +4229,7 @@ open class ReportService( |
|
|
it.from.isBefore(ts.recordDate) && (it.to == null || it.to.isAfter(ts.recordDate)) |
|
|
it.from.isBefore(ts.recordDate) && (it.to == null || it.to.isAfter(ts.recordDate)) |
|
|
&& |
|
|
&& |
|
|
it.deleted == false |
|
|
it.deleted == false |
|
|
}!!.team.code |
|
|
|
|
|
|
|
|
}?.team?.code ?: ts.staff?.team?.code |
|
|
val projectTeam = ts.project!!.teamLead!!.team.code |
|
|
val projectTeam = ts.project!!.teamLead!!.team.code |
|
|
projectTeam != staffTeam |
|
|
projectTeam != staffTeam |
|
|
} |
|
|
} |
|
|