...
|
...
|
@@ -11,6 +11,7 @@ import ( |
|
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/staff_assess/query"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/infrastructure/dao"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/log"
|
|
|
)
|
|
|
|
|
|
//获取我的项目周期列表
|
...
|
...
|
@@ -510,7 +511,7 @@ func (srv StaffAssessServeice) ListExecutorDaySupperAssess(param *query.ListExec |
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
|
|
|
//获取目标用户
|
|
|
userIds := []int{}
|
|
|
for _, v := range assessList {
|
|
|
userIds = append(userIds, v.TargetUser.UserId)
|
...
|
...
|
@@ -540,33 +541,26 @@ func (srv StaffAssessServeice) ListExecutorDaySupperAssess(param *query.ListExec |
|
|
})
|
|
|
userPositionMap[v.Id] = positionList
|
|
|
}
|
|
|
|
|
|
//获取员工邀请的人完成360评估的数量
|
|
|
//获取目标员工邀请的人完成360评估的数量
|
|
|
var inviteCompletedCount []dao.CountData
|
|
|
if len(userIds) > 0 {
|
|
|
// d := dao.NewStaffAssessDao(map[string]interface{}{
|
|
|
// "transactionContext": transactionContext,
|
|
|
// })
|
|
|
// inviteCompletedCount, err = d.CountInviteAssessByTargetUser(userIds, param.AssessTaskId)
|
|
|
// if err != nil {
|
|
|
// log.Logger.Error("获取员工邀请的人完成情况" + err.Error())
|
|
|
// }
|
|
|
}
|
|
|
assessTaskRepo := factory.CreateStaffAssessTaskRepository(map[string]interface{}{
|
|
|
d := dao.NewStaffAssessDao(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
|
|
})
|
|
|
assessTaskData, err := assessTaskRepo.FindOne(map[string]interface{}{
|
|
|
// "id": param.AssessTaskId,
|
|
|
})
|
|
|
if len(userIds) > 0 {
|
|
|
inviteCompletedCount, err = d.CountTargetUserInviteAssess1(userIds, param.CycleId, param.BeginDay)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取评估任务"+err.Error())
|
|
|
log.Logger.Error("获取员工邀请的人完成情况" + err.Error())
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//我评估别人,被邀请评估
|
|
|
cnnt, _, err := assessRepo.Find(map[string]interface{}{
|
|
|
// "staffAssessTaskId": param.AssessTaskId,
|
|
|
"beginDay": param.BeginDay,
|
|
|
"cycleId": param.CycleId,
|
|
|
"executorId": param.ExecutorId,
|
|
|
"typesList": []string{string(domain.AssessSuper)},
|
|
|
"status": string(domain.StaffAssessUncompleted),
|
|
|
"limit": 1,
|
|
|
})
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取个人的评估环节"+err.Error())
|
...
|
...
|
@@ -616,15 +610,9 @@ func (srv StaffAssessServeice) ListExecutorDaySupperAssess(param *query.ListExec |
|
|
resultList = append(resultList, item)
|
|
|
}
|
|
|
result := tool_funs.SimpleWrapGridMap(int64(cnt), resultList)
|
|
|
result["linkNodeName"] = ""
|
|
|
result["linkNodeId"] = ""
|
|
|
result["lintNodeDesc"] = ""
|
|
|
for _, v := range assessTaskData.StepList {
|
|
|
if v.LinkNodeType == domain.LinkNodeSuperiorAssessment {
|
|
|
result["linkNodeName"] = v.LinkNodeName
|
|
|
result["linkNodeId"] = fmt.Sprintf("%d", v.LinkNodeId)
|
|
|
result["lintNodeDesc"] = fmt.Sprintf("截止时间 %s 待评估 %d 人", v.EndTime.Local().Format("2006-01-02 15:04:05"), cnnt)
|
|
|
}
|
|
|
if len(assessList) > 0 {
|
|
|
result["lintNodeDesc"] = fmt.Sprintf("截止时间 %s 待评估 %d 人", assessList[0].EndTime.Local().Format("2006-01-02 15:04:05"), cnnt)
|
|
|
}
|
|
|
return result, nil
|
|
|
} |
...
|
...
|
|