...
|
...
|
@@ -1326,7 +1326,20 @@ func (srv TaskService) listTask3ForHrbp(param *command.SearchTaskCommand) (map[s |
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "统计任务反馈异常总数"+err.Error())
|
|
|
}
|
|
|
|
|
|
var taskAnomalyList []*domain.TaskAnomaly
|
|
|
//获取异常的任务反馈记录
|
|
|
taskAnomalyRepo := factory.CreateTaskAnomalyRepository(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
|
|
})
|
|
|
for _, val := range taskListData {
|
|
|
_, listData, err := taskAnomalyRepo.Find(map[string]interface{}{
|
|
|
"taskId": val.TaskId,
|
|
|
"is_last": 1,
|
|
|
})
|
|
|
if err == nil {
|
|
|
taskAnomalyList = append(taskAnomalyList, listData...)
|
|
|
}
|
|
|
}
|
|
|
taskResult := []*adapter.TaskItem{}
|
|
|
taskStageRepo := factory.CreateTaskStageRepository(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
...
|
...
|
@@ -1405,6 +1418,28 @@ func (srv TaskService) listTask3ForHrbp(param *command.SearchTaskCommand) (map[s |
|
|
}
|
|
|
}
|
|
|
tk.GenStatusDescript()
|
|
|
for _, val := range taskAnomalyList {
|
|
|
if tk.Id != val.TaskId {
|
|
|
continue
|
|
|
}
|
|
|
if val.Marks == nil {
|
|
|
val.Marks = map[string]string{}
|
|
|
}
|
|
|
r := val.Remark + ",该条异常已通知"
|
|
|
for _, val2 := range val.NoticeWho {
|
|
|
r += val2["name"] + " "
|
|
|
}
|
|
|
tk.AnomalyDesc = append(tk.AnomalyDesc, r)
|
|
|
switch val.Category {
|
|
|
case domain.AnomalyCategoryType1:
|
|
|
tk.Marks["a"] = val.Marks["a"]
|
|
|
tk.Marks["c"] = val.Marks["c"]
|
|
|
case domain.AnomalyCategoryType2:
|
|
|
tk.Marks["b"] = val.Marks["b"]
|
|
|
case domain.AnomalyCategoryType3:
|
|
|
tk.Marks["d"] = val.Marks["d"]
|
|
|
}
|
|
|
}
|
|
|
taskResult = append(taskResult, &tk)
|
|
|
}
|
|
|
result := tool_funs.SimpleWrapGridMap(int64(taskCount), taskResult)
|
...
|
...
|
|