...
|
...
|
@@ -134,33 +134,32 @@ func (srv StaffAssessServeice) AssessCycleMeDesc(param *query.AssessCycleDescQue |
|
|
}
|
|
|
case domain.LinkNodeAllInvite:
|
|
|
if len(myAssessTask) > 0 {
|
|
|
|
|
|
}
|
|
|
//邀请别人评估自己
|
|
|
_, assessInviteData, err := staffAssessRepo.Find(map[string]interface{}{
|
|
|
// "staffAssessTaskId": assessTaskData.Id,
|
|
|
"targetUserId": param.UserId,
|
|
|
"typesList": []string{string(domain.AssessInviteDiffSuper), string(domain.AssessInviteSameSuper)},
|
|
|
"limit": 5,
|
|
|
})
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取个人的评估环节"+err.Error())
|
|
|
}
|
|
|
if len(assessInviteData) > 0 {
|
|
|
stepItem.Status = string(domain.StaffAssessCompleted)
|
|
|
} else {
|
|
|
stepItem.Status = string(domain.StaffAssessUncompleted)
|
|
|
}
|
|
|
//待邀请人数,为5人减去已邀请的人数。若邀请人数已等于或大于5人,则只显示截止日期即可
|
|
|
if len(assessInviteData) > 5 {
|
|
|
stepItem.Desc = fmt.Sprintf("截止日期:%s", stepItem.EndTime)
|
|
|
} else {
|
|
|
stepItem.Desc = fmt.Sprintf("截止日期:%s 待邀请%d人", stepItem.EndTime, 5-len(assessInviteData))
|
|
|
//邀请别人评估自己
|
|
|
_, assessInviteData, err := staffAssessRepo.Find(map[string]interface{}{
|
|
|
// "staffAssessTaskId": assessTaskData.Id,
|
|
|
"targetUserId": param.UserId,
|
|
|
"typesList": []string{string(domain.AssessInviteDiffSuper), string(domain.AssessInviteSameSuper)},
|
|
|
"limit": 5,
|
|
|
})
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取个人的评估环节"+err.Error())
|
|
|
}
|
|
|
if len(assessInviteData) > 0 {
|
|
|
stepItem.Status = string(domain.StaffAssessCompleted)
|
|
|
} else {
|
|
|
stepItem.Status = string(domain.StaffAssessUncompleted)
|
|
|
}
|
|
|
//待邀请人数,为5人减去已邀请的人数。若邀请人数已等于或大于5人,则只显示截止日期即可
|
|
|
if len(assessInviteData) > 5 {
|
|
|
stepItem.Desc = fmt.Sprintf("截止日期:%s", stepItem.EndTime)
|
|
|
} else {
|
|
|
stepItem.Desc = fmt.Sprintf("截止日期:%s 待邀请%d人", stepItem.EndTime, 5-len(assessInviteData))
|
|
|
}
|
|
|
}
|
|
|
case domain.LinkNodeAllAssessment:
|
|
|
//我评估别人,被邀请评估
|
|
|
_, assessInviteList, err := staffAssessRepo.Find(map[string]interface{}{
|
|
|
// "staffAssessTaskId": assessTaskData.Id,
|
|
|
"beginDay": param.BeginDay,
|
|
|
"executorId": param.UserId,
|
|
|
"typesList": []string{string(domain.AssessInviteDiffSuper), string(domain.AssessInviteSameSuper)},
|
|
|
})
|
...
|
...
|
|