|
@@ -134,33 +134,32 @@ func (srv StaffAssessServeice) AssessCycleMeDesc(param *query.AssessCycleDescQue |
|
@@ -134,33 +134,32 @@ func (srv StaffAssessServeice) AssessCycleMeDesc(param *query.AssessCycleDescQue |
134
|
}
|
134
|
}
|
135
|
case domain.LinkNodeAllInvite:
|
135
|
case domain.LinkNodeAllInvite:
|
136
|
if len(myAssessTask) > 0 {
|
136
|
if len(myAssessTask) > 0 {
|
137
|
-
|
|
|
138
|
- }
|
|
|
139
|
- //邀请别人评估自己
|
|
|
140
|
- _, assessInviteData, err := staffAssessRepo.Find(map[string]interface{}{
|
|
|
141
|
- // "staffAssessTaskId": assessTaskData.Id,
|
|
|
142
|
- "targetUserId": param.UserId,
|
|
|
143
|
- "typesList": []string{string(domain.AssessInviteDiffSuper), string(domain.AssessInviteSameSuper)},
|
|
|
144
|
- "limit": 5,
|
|
|
145
|
- })
|
|
|
146
|
- if err != nil {
|
|
|
147
|
- return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取个人的评估环节"+err.Error())
|
|
|
148
|
- }
|
|
|
149
|
- if len(assessInviteData) > 0 {
|
|
|
150
|
- stepItem.Status = string(domain.StaffAssessCompleted)
|
|
|
151
|
- } else {
|
|
|
152
|
- stepItem.Status = string(domain.StaffAssessUncompleted)
|
|
|
153
|
- }
|
|
|
154
|
- //待邀请人数,为5人减去已邀请的人数。若邀请人数已等于或大于5人,则只显示截止日期即可
|
|
|
155
|
- if len(assessInviteData) > 5 {
|
|
|
156
|
- stepItem.Desc = fmt.Sprintf("截止日期:%s", stepItem.EndTime)
|
|
|
157
|
- } else {
|
|
|
158
|
- stepItem.Desc = fmt.Sprintf("截止日期:%s 待邀请%d人", stepItem.EndTime, 5-len(assessInviteData))
|
137
|
+ //邀请别人评估自己
|
|
|
138
|
+ _, assessInviteData, err := staffAssessRepo.Find(map[string]interface{}{
|
|
|
139
|
+ // "staffAssessTaskId": assessTaskData.Id,
|
|
|
140
|
+ "targetUserId": param.UserId,
|
|
|
141
|
+ "typesList": []string{string(domain.AssessInviteDiffSuper), string(domain.AssessInviteSameSuper)},
|
|
|
142
|
+ "limit": 5,
|
|
|
143
|
+ })
|
|
|
144
|
+ if err != nil {
|
|
|
145
|
+ return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取个人的评估环节"+err.Error())
|
|
|
146
|
+ }
|
|
|
147
|
+ if len(assessInviteData) > 0 {
|
|
|
148
|
+ stepItem.Status = string(domain.StaffAssessCompleted)
|
|
|
149
|
+ } else {
|
|
|
150
|
+ stepItem.Status = string(domain.StaffAssessUncompleted)
|
|
|
151
|
+ }
|
|
|
152
|
+ //待邀请人数,为5人减去已邀请的人数。若邀请人数已等于或大于5人,则只显示截止日期即可
|
|
|
153
|
+ if len(assessInviteData) > 5 {
|
|
|
154
|
+ stepItem.Desc = fmt.Sprintf("截止日期:%s", stepItem.EndTime)
|
|
|
155
|
+ } else {
|
|
|
156
|
+ stepItem.Desc = fmt.Sprintf("截止日期:%s 待邀请%d人", stepItem.EndTime, 5-len(assessInviteData))
|
|
|
157
|
+ }
|
159
|
}
|
158
|
}
|
160
|
case domain.LinkNodeAllAssessment:
|
159
|
case domain.LinkNodeAllAssessment:
|
161
|
//我评估别人,被邀请评估
|
160
|
//我评估别人,被邀请评估
|
162
|
_, assessInviteList, err := staffAssessRepo.Find(map[string]interface{}{
|
161
|
_, assessInviteList, err := staffAssessRepo.Find(map[string]interface{}{
|
163
|
- // "staffAssessTaskId": assessTaskData.Id,
|
162
|
+ "beginDay": param.BeginDay,
|
164
|
"executorId": param.UserId,
|
163
|
"executorId": param.UserId,
|
165
|
"typesList": []string{string(domain.AssessInviteDiffSuper), string(domain.AssessInviteSameSuper)},
|
164
|
"typesList": []string{string(domain.AssessInviteDiffSuper), string(domain.AssessInviteSameSuper)},
|
166
|
})
|
165
|
})
|