作者 tangxvhui

暂存

... ... @@ -4,6 +4,8 @@ type ListInviteUserAssessResp struct {
LinkNodeName string `json:"linkNodeName"`
LinkNodeId int `json:"linkNodeId"`
LintNodeDesc string `json:"lintNodeDesc"`
BeginDay string `json:"beginDay"`
CycleId int `json:"cycleId"`
TableHeader []ListTableHeader `json:"tableHeader"`
List []map[string]string `json:"list"`
Total int `json:"total"`
... ...
... ... @@ -308,9 +308,7 @@ func (srv StaffAssessServeice) ListExecutorDayInviteAssess(param *query.ListExec
assessRepo := factory.CreateStaffAssessRepository(map[string]interface{}{
"transactionContext": transactionContext,
})
assessTaskRepo := factory.CreateStaffAssessTaskRepository(map[string]interface{}{
"transactionContext": transactionContext,
})
//获取 executorId 对应的360评估任务 用户
condition := map[string]interface{}{
"beginDay": param.BeginDay,
... ... @@ -400,15 +398,6 @@ func (srv StaffAssessServeice) ListExecutorDayInviteAssess(param *query.ListExec
return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取个人的评估环节"+err.Error())
}
_, myAssessTaskData, err := assessTaskRepo.Find(map[string]interface{}{
"beginDay": param.BeginDay,
"cycleId": param.CycleId,
"executorId": param.ExecutorId,
"limit": 1,
})
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取评估任务"+err.Error())
}
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
... ... @@ -459,15 +448,13 @@ func (srv StaffAssessServeice) ListExecutorDayInviteAssess(param *query.ListExec
List: listData,
Total: cnt,
}
if len(myAssessTaskData) > 0 {
for _, v := range myAssessTaskData[0].StepList {
if v.LinkNodeType == domain.LinkNodeAllAssessment {
result.LinkNodeId = v.LinkNodeId
result.LinkNodeName = v.LinkNodeName
result.LintNodeDesc = fmt.Sprintf("截止时间 %s 待评估%d人", v.EndTime.Local().Format("2006-01-02 15:04:05"), cnnt)
}
}
if len(assessList) > 0 {
result.BeginDay = assessList[0].BeginTime.Local().Format("2006-01-02")
result.CycleId = int(assessList[0].CycleId)
result.LintNodeDesc = fmt.Sprintf("截止时间 %s 待评估%d人", assessList[0].EndTime.Local().Format("2006-01-02 15:04:05"), cnnt)
}
return &result, nil
}
... ... @@ -612,6 +599,8 @@ func (srv StaffAssessServeice) ListExecutorDaySupperAssess(param *query.ListExec
result := tool_funs.SimpleWrapGridMap(int64(cnt), resultList)
result["lintNodeDesc"] = ""
if len(assessList) > 0 {
result["cycleId"] = assessList[0].CycleId
result["beginDay"] = assessList[0].BeginTime.Local().Format("2006-01-02")
result["lintNodeDesc"] = fmt.Sprintf("截止时间 %s 待评估 %d 人", assessList[0].EndTime.Local().Format("2006-01-02 15:04:05"), cnnt)
}
return result, nil
... ...