...
|
...
|
@@ -30,7 +30,7 @@ func (srv StaffAssessServeice) SearchAssessTaskMeV2(param *query.SearchAssessMeQ |
|
|
staffAssessTaskRepo := dao.NewStaffAssessDao(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
|
|
})
|
|
|
var limit int = 200
|
|
|
var limit int = 360
|
|
|
var offset int = 0
|
|
|
if param.PageSize > 0 {
|
|
|
limit = param.PageSize
|
...
|
...
|
@@ -459,7 +459,7 @@ func (srv StaffAssessServeice) ListExecutorInviteAssessV2(param *query.ListExecu |
|
|
return &result, nil
|
|
|
}
|
|
|
|
|
|
//根据周期和日期获取我需要执行的上级评估成员列表
|
|
|
// 根据周期和日期获取我需要执行的上级评估成员列表
|
|
|
func (srv StaffAssessServeice) ListExecutorSupperAssessV2(param *query.ListExecutorAssessQuery) (map[string]interface{}, error) {
|
|
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
|
|
if err != nil {
|
...
|
...
|
@@ -609,7 +609,7 @@ func (srv StaffAssessServeice) ListExecutorSupperAssessV2(param *query.ListExecu |
|
|
return result, nil
|
|
|
}
|
|
|
|
|
|
//根据周期和日期,获取员工的自评内容
|
|
|
// 根据周期和日期,获取员工的自评内容
|
|
|
func (srv StaffAssessServeice) GetAssessSelfInfoV2(param *query.GetExecutorSelfAssessQuery) (*adapter.AssessInfoResp, error) {
|
|
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
|
|
if err != nil {
|
...
|
...
|
@@ -692,3 +692,45 @@ func (srv StaffAssessServeice) GetAssessSelfInfoV2(param *query.GetExecutorSelfA |
|
|
}
|
|
|
return &result, nil
|
|
|
}
|
|
|
|
|
|
//根据周期和日期。获取360评估的列表,员工的被其他人评估
|
|
|
func (srv StaffAssessServeice) ListTargetUserInviteAssess(param *query.ListTargetAssessQuery) (map[string]interface{}, error) {
|
|
|
|
|
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
if err := transactionContext.StartTransaction(); err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
defer func() {
|
|
|
_ = transactionContext.RollbackTransaction()
|
|
|
}()
|
|
|
assessReps := factory.CreateStaffAssessRepository(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
|
|
})
|
|
|
//获取员工的评估
|
|
|
cnt, assessList, err := assessReps.Find(map[string]interface{}{
|
|
|
"cycleId": param.CycleId,
|
|
|
"beginDay": param.BeginDay,
|
|
|
"companyId": param.CompanyId,
|
|
|
"targetUserId": param.TargetUserId,
|
|
|
"typesList": []string{string(domain.AssessInviteSameSuper), string(domain.AssessInviteDiffSuper)},
|
|
|
})
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取员工的评估"+err.Error())
|
|
|
}
|
|
|
if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
var resultList []map[string]interface{}
|
|
|
for _, v := range assessList {
|
|
|
item := map[string]interface{}{
|
|
|
"id": v.Id,
|
|
|
"targetUser": v.TargetUser,
|
|
|
"executor": v.Executor,
|
|
|
}
|
|
|
resultList = append(resultList, item)
|
|
|
}
|
|
|
return tool_funs.SimpleWrapGridMap(int64(cnt), resultList), nil
|
|
|
} |
...
|
...
|
|