...
|
...
|
@@ -438,26 +438,23 @@ func (srv *SummaryEvaluationService) EvaluationHRBPList(param *command.QueryEval |
|
|
staffAssessDaoRepo := dao.NewStaffAssessDao(map[string]interface{}{"transactionContext": transactionContext})
|
|
|
userRepo := factory.CreateUserRepository(map[string]interface{}{"transactionContext": transactionContext})
|
|
|
positionRepo := factory.CreatePositionRepository(map[string]interface{}{"transactionContext": transactionContext})
|
|
|
var searchTargetName string
|
|
|
if len(param.SearchName) > 0 {
|
|
|
searchTargetName = "%" + param.SearchName + "%"
|
|
|
} else {
|
|
|
searchTargetName = ""
|
|
|
}
|
|
|
|
|
|
limit := param.PageSize
|
|
|
offset := limit * (param.PageNumber - 1)
|
|
|
if offset < 0 {
|
|
|
offset = 0
|
|
|
}
|
|
|
count, list, err := evaluationRepo.Find(map[string]interface{}{
|
|
|
"companyId": param.CompanyId,
|
|
|
"cycleId": param.CycleId,
|
|
|
"executorId": -1,
|
|
|
"types": domain.EvaluationHrbp,
|
|
|
"targetUserName": searchTargetName,
|
|
|
"limit": limit,
|
|
|
"offset": offset,
|
|
|
})
|
|
|
condition := map[string]interface{}{
|
|
|
"companyId": param.CompanyId,
|
|
|
"cycleId": param.CycleId,
|
|
|
"types": domain.EvaluationHrbp,
|
|
|
"limit": limit,
|
|
|
"offset": offset,
|
|
|
}
|
|
|
if len(param.SearchName) > 0 {
|
|
|
condition["targetUserName"] = "%" + param.SearchName + "%"
|
|
|
}
|
|
|
count, list, err := evaluationRepo.Find(condition)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
...
|
...
|
|