作者 tangxvhui

调整 输出

... ... @@ -3,7 +3,8 @@ package adapter
//综合评估的周期列表
type CycleListAdapter struct {
CycleId string `json:"cycleId"` //周期id
CycleName string `json:"cycleName"` //
CycleId string `json:"cycleId"` //周期id
CycleName string `json:"cycleName"` //
ProjectId string `json:"projectId"`
ProjectName string `json:"projectIName"`
}
... ...
... ... @@ -531,8 +531,10 @@ func (srv *SummaryEvaluationService) GetTargetUserCycleList(param *command.Query
cycleList := []adapter.CycleListAdapter{}
for _, v := range cycleData {
m := adapter.CycleListAdapter{
CycleId: v.CycleId,
CycleName: v.CycleName,
CycleId: v.CycleId,
CycleName: v.CycleName,
ProjectId: v.EvaluationProjectId,
ProjectName: v.EvaluationProjectName,
}
cycleList = append(cycleList, m)
... ...
... ... @@ -55,11 +55,14 @@ func (srv *SummaryEvaluationService) Evaluation360List(param *command.QueryEvalu
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
evaluationVersion := ""
ids := make([]int, 0)
projectIds := make([]int, 0)
for i := range list {
ids = append(ids, list[i].Id)
projectIds = append(projectIds, list[i].EvaluationProjectId)
evaluationVersion = string(list[i].Version)
}
// 固定列
... ... @@ -148,10 +151,14 @@ func (srv *SummaryEvaluationService) Evaluation360List(param *command.QueryEvalu
if key, ok := uniqueColumnsMap[name]; ok { // 动态列用name -> key
valueKey := fmt.Sprintf("%d-%d", v.Id, item.Id)
if it, ok := valueMap[valueKey]; ok {
if it.Weight > 0 {
if evaluationVersion == string(domain.EvaluationV1) {
if it.Weight > 0 {
rowMap[key] = it.Score
} else {
rowMap[key] = it.Rating.Code
}
} else if evaluationVersion == string(domain.EvaluationV2) {
rowMap[key] = it.Score
} else {
rowMap[key] = it.Rating.Code
}
} else {
rowMap[key] = ""
... ...