...
|
...
|
@@ -321,6 +321,10 @@ func (rs *EvaluationCycleService) List(in *command.QueryCycleCommand) (interface |
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
|
|
|
return tool_funs.SimpleWrapGridMap(total, cycles), nil
|
|
|
}
|
|
|
|
...
|
...
|
@@ -333,7 +337,7 @@ func (rs *EvaluationCycleService) StatisticCycleUser(in *command.StatisticCycleP |
|
|
transactionContext.RollbackTransaction()
|
|
|
}()
|
|
|
projectRepository := factory.CreateEvaluationProjectRepository(map[string]interface{}{"transactionContext": transactionContext})
|
|
|
_, projects, err := projectRepository.Find(tool_funs.SimpleStructToMap(in), "linkNodes")
|
|
|
_, projects, err := projectRepository.Find(tool_funs.SimpleStructToMap(in), "template")
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
...
|
...
|
@@ -347,8 +351,8 @@ func (rs *EvaluationCycleService) StatisticCycleUser(in *command.StatisticCycleP |
|
|
userIdMap[userId] = userId
|
|
|
}
|
|
|
}
|
|
|
for _, v := range userIdMap {
|
|
|
userIds = append(userIds, v)
|
|
|
for k := range userIdMap {
|
|
|
userIds = append(userIds, k)
|
|
|
}
|
|
|
|
|
|
userTotal := 0
|
...
|
...
|
@@ -412,7 +416,7 @@ func (rs *EvaluationCycleService) CycleTemplate(in *command.CycleTemplateCommand |
|
|
}()
|
|
|
|
|
|
cycleTemplateRepository := factory.CreateEvaluationCycleTemplateRepository(map[string]interface{}{"transactionContext": transactionContext})
|
|
|
cycleTemplate, err := cycleTemplateRepository.FindOne(map[string]interface{}{"id": in.TemplateId})
|
|
|
cycleTemplate, err := cycleTemplateRepository.FindOne(map[string]interface{}{"id": in.Id})
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
...
|
...
|
|