...
|
...
|
@@ -887,6 +887,8 @@ func (srv StaffAssessServeice) GetAssessSelfInfo(param *query.AssessSelfInfoQuer |
|
|
AssessId: assessData.Id,
|
|
|
CycleId: assessData.CycleId,
|
|
|
CycleName: assessData.CycleName,
|
|
|
LinkNodeId: assessData.LinkNodeId,
|
|
|
LinkNodeName: assessData.LinkNodeName,
|
|
|
EvaluationProjectId: assessData.EvaluationProjectId,
|
|
|
EvaluationProjectName: assessData.EvaluationProjectName,
|
|
|
BeginTime: assessData.BeginTime.Local().Format("2006-01-02 15:04:05"),
|
...
|
...
|
@@ -1089,15 +1091,41 @@ func (srv StaffAssessServeice) ListExecutorInviteAssess(param *query.ListInviteU |
|
|
assessRepo := factory.CreateStaffAssessRepository(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
|
|
})
|
|
|
|
|
|
// assessTaskkRepo := factory.CreateStaffAssessTaskRepository(map[string]interface{}{
|
|
|
// "transactionContext": transactionContext,
|
|
|
// })
|
|
|
//获取 executorId 对应的360评估任务 用户
|
|
|
cnt, assessList, err := assessRepo.Find(map[string]interface{}{
|
|
|
"staffAssessTaskId": param.AssessTaskkId,
|
|
|
"staffAssessTaskId": param.AssessTaskId,
|
|
|
"executorId": param.ExecutorId,
|
|
|
"typesList": []string{string(domain.AssessInviteDiffSuper), string(domain.AssessInviteSameSuper)},
|
|
|
})
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
var assessContentList []*domain.StaffAssessContent
|
|
|
if len(assessList) > 0 {
|
|
|
//获取评估用的所有评估项
|
|
|
assessContentList, err = srv.getAssessSelfInfoUncompleted(transactionContext, assessList[0])
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取评估任务"+err.Error())
|
|
|
}
|
|
|
}
|
|
|
//可变的表格列
|
|
|
changeableHeader := []adapter.ListTableHeader{}
|
|
|
//列名与字段对应
|
|
|
keyMap := map[string]string{}
|
|
|
for i, v := range assessContentList {
|
|
|
name := fmt.Sprintf("%s-%s", v.Category, v.Name)
|
|
|
key := fmt.Sprintf("k%d", i)
|
|
|
keyMap[name] = key
|
|
|
changeableHeader = append(changeableHeader, adapter.ListTableHeader{
|
|
|
Key: key,
|
|
|
Name: name,
|
|
|
})
|
|
|
}
|
|
|
|
|
|
// 获取已经填报的内容
|
|
|
if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
...
|
...
|
@@ -1110,6 +1138,7 @@ func (srv StaffAssessServeice) ListExecutorInviteAssess(param *query.ListInviteU |
|
|
{Key: "types", Name: "360°评估关系"},
|
|
|
{Key: "endTime", Name: "360°评估截止日期"},
|
|
|
}
|
|
|
tableHeader = append(tableHeader, changeableHeader...)
|
|
|
listData := []map[string]string{}
|
|
|
for _, v := range assessList {
|
|
|
m := map[string]string{
|
...
|
...
|
@@ -1315,6 +1344,8 @@ func (srv StaffAssessServeice) GetAssessInfo(param *query.AssessInfoQuery) (*ada |
|
|
AssessId: assessData.Id,
|
|
|
CycleId: assessData.CycleId,
|
|
|
CycleName: assessData.CycleName,
|
|
|
LinkNodeId: assessData.LinkNodeId,
|
|
|
LinkNodeName: assessData.LinkNodeName,
|
|
|
EvaluationProjectId: assessData.EvaluationProjectId,
|
|
|
EvaluationProjectName: assessData.EvaluationProjectName,
|
|
|
BeginTime: assessData.BeginTime.Local().Format("2006-01-02 15:04:05"),
|
...
|
...
|
@@ -1481,7 +1512,7 @@ func (srv StaffAssessServeice) SaveAssessInfo(param *command.SaveAssessInfoComma |
|
|
}, nil
|
|
|
}
|
|
|
|
|
|
// 获取员工被评估的列表 ,类型是360邀请的
|
|
|
// 获取员工被评估的列表
|
|
|
func (srv StaffAssessServeice) ListTargetUserAssess(param *query.ListTargetUserAssessQuery) (map[string]interface{}, error) {
|
|
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
|
|
if err != nil {
|
...
|
...
|
@@ -1508,5 +1539,6 @@ func (srv StaffAssessServeice) ListTargetUserAssess(param *query.ListTargetUserA |
|
|
if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
|
|
|
return tool_funs.SimpleWrapGridMap(int64(cnt), assessList), nil
|
|
|
} |
...
|
...
|
|