@@ -290,10 +290,20 @@ open class StaffsService( | |||||
userRepository.save(user) | userRepository.save(user) | ||||
} | } | ||||
// salaryEffectiveService.saveSalaryEffective(staff.id!!, salary.salaryPoint.toLong()) | // salaryEffectiveService.saveSalaryEffective(staff.id!!, salary.salaryPoint.toLong()) | ||||
salaryEffectiveService.updateSalaryEffective(staff.id!!, req.salaryEffectiveInfo?.sortedBy { it.date }, req.delSalaryEffectiveInfo) | |||||
teamLogService.editTeamLog(req.teamHistory, req.delTeamHistory) | |||||
gradeLogService.editGradeLog(req.gradeHistory, req.delGradeHistory) | |||||
positionLogService.editPositionLog(req.positionHistory, req.delPositionHistory) | |||||
if ( | |||||
!req.teamHistory.isNullOrEmpty() && | |||||
!req.delTeamHistory.isNullOrEmpty() && | |||||
!req.gradeHistory.isNullOrEmpty() && | |||||
!req.delGradeHistory.isNullOrEmpty() && | |||||
!req.positionHistory.isNullOrEmpty() && | |||||
!req.delPositionHistory.isNullOrEmpty() | |||||
) { | |||||
salaryEffectiveService.updateSalaryEffective(staff.id!!, req.salaryEffectiveInfo?.sortedBy { it.date }, req.delSalaryEffectiveInfo) | |||||
teamLogService.editTeamLog(req.teamHistory, req.delTeamHistory) | |||||
gradeLogService.editGradeLog(req.gradeHistory, req.delGradeHistory) | |||||
positionLogService.editPositionLog(req.positionHistory, req.delPositionHistory) | |||||
} | |||||
return staffRepository.save(staff) | return staffRepository.save(staff) | ||||
} | } | ||||
@@ -38,13 +38,13 @@ data class NewStaffRequest( | |||||
val departReason: String?, | val departReason: String?, | ||||
val remark: String?, | val remark: String?, | ||||
val salaryEffectiveInfo: List<SalaryEffectiveInfo>?, | val salaryEffectiveInfo: List<SalaryEffectiveInfo>?, | ||||
val teamHistory: List<TeamHistory>, | |||||
val gradeHistory: List<GradeHistory>, | |||||
val positionHistory: List<PositionHistory>, | |||||
val delSalaryEffectiveInfo: List<Long>, | |||||
val delTeamHistory: List<Long>, | |||||
val delGradeHistory: List<Long>, | |||||
val delPositionHistory: List<Long>, | |||||
val teamHistory: List<TeamHistory>?, | |||||
val gradeHistory: List<GradeHistory>?, | |||||
val positionHistory: List<PositionHistory>?, | |||||
val delSalaryEffectiveInfo: List<Long>?, | |||||
val delTeamHistory: List<Long>?, | |||||
val delGradeHistory: List<Long>?, | |||||
val delPositionHistory: List<Long>?, | |||||
) | ) | ||||
data class SalaryEffectiveInfo( | data class SalaryEffectiveInfo( | ||||