Bläddra i källkod

update

add_swagger
MSI\derek 11 månader sedan
förälder
incheckning
4b0b0f701a
2 ändrade filer med 21 tillägg och 11 borttagningar
  1. +14
    -4
      src/main/java/com/ffii/tsms/modules/data/service/StaffsService.kt
  2. +7
    -7
      src/main/java/com/ffii/tsms/modules/data/web/models/NewStaffRequest.kt

+ 14
- 4
src/main/java/com/ffii/tsms/modules/data/service/StaffsService.kt Visa fil

@@ -290,10 +290,20 @@ open class StaffsService(
userRepository.save(user)
}
// 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)
}



+ 7
- 7
src/main/java/com/ffii/tsms/modules/data/web/models/NewStaffRequest.kt Visa fil

@@ -38,13 +38,13 @@ data class NewStaffRequest(
val departReason: String?,
val remark: String?,
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(


Laddar…
Avbryt
Spara