作者 郑周

1. 超管权限 查看考核详情

  1 +package service
  2 +
  3 +import (
  4 + "github.com/linmadan/egglib-go/core/application"
  5 + "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/factory"
  6 + roleService "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/role"
  7 + "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/summary_evaluation/adapter"
  8 + "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/summary_evaluation/command"
  9 + "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
  10 + "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/infrastructure/xredis"
  11 +)
  12 +
  13 +// GetEvaluationFinish 超级管理员获取考核详情
  14 +func (srv *SummaryEvaluationService) GetEvaluationFinish(param *command.QueryEvaluationSuper) (*adapter.EvaluationInfoSuperAdapter, error) {
  15 + transactionContext, err := factory.StartTransaction()
  16 + if err != nil {
  17 + return nil, err
  18 + }
  19 + defer func() {
  20 + _ = transactionContext.RollbackTransaction()
  21 + }()
  22 +
  23 + // 只有超级管理员可以使用的功能
  24 + superAdmin, err := roleService.GetSuperAdmin(transactionContext, param.CompanyId, param.UserId)
  25 + if err != nil {
  26 + return nil, err
  27 + }
  28 + if superAdmin != domain.RoleTypeSuperAdmin {
  29 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有操作权限")
  30 + }
  31 +
  32 + evaluationRepo := factory.CreateSummaryEvaluationRepository(map[string]interface{}{"transactionContext": transactionContext})
  33 + evaluationItemRepo := factory.CreateEvaluationItemUsedRepository(map[string]interface{}{"transactionContext": transactionContext})
  34 + itemValueRepo := factory.CreateSummaryEvaluationValueRepository(map[string]interface{}{"transactionContext": transactionContext})
  35 +
  36 + result, err := evaluationRepo.FindOne(map[string]interface{}{"id": param.SummaryEvaluationId})
  37 + if err != nil || result == nil {
  38 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取评估"+err.Error())
  39 + }
  40 + if result.CompanyId != param.CompanyId {
  41 + return nil, application.ThrowError(application.BUSINESS_ERROR, "没有操作权限")
  42 + }
  43 + if result.Types != domain.EvaluationFinish {
  44 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "考核类型错误")
  45 + }
  46 +
  47 + _, itemList, err := evaluationItemRepo.Find(map[string]interface{}{"evaluationProjectId": result.EvaluationProjectId, "nodeType": domain.LinkNodeSelfAssessment})
  48 + if err != nil {
  49 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  50 + }
  51 +
  52 + // 获取已填写的评估内容
  53 + _, itemValues, err := itemValueRepo.Find(map[string]interface{}{"summaryEvaluationId": result.Id})
  54 + if err != nil {
  55 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  56 + }
  57 + // 考核结果不存在 -> 获取上级考核 -> 获取360+HRBP+自评
  58 + if len(itemValues) == 0 {
  59 + itemValues, evaluationList, err := srv.findCycleItemValueByType(transactionContext, result.CycleId, result.TargetUser.UserId, []int{int(domain.EvaluationSuper)})
  60 + if err != nil {
  61 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  62 + }
  63 + // 上级评估不存在(有上级考核类型时,不管分数有没有填写都算,没填写当作零)
  64 + if len(evaluationList) == 0 {
  65 + itemValues, _, err = srv.findCycleItemValueByType(transactionContext, result.CycleId, result.TargetUser.UserId, []int{int(domain.EvaluationSelf)})
  66 + if err != nil {
  67 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  68 + }
  69 + hrItemValues, _, err := srv.findCycleItemValueByType(transactionContext, result.CycleId, result.TargetUser.UserId, []int{int(domain.Evaluation360), int(domain.EvaluationHrbp)})
  70 + if err != nil {
  71 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  72 + }
  73 + // 自评分数
  74 + if len(itemValues) == 0 {
  75 + itemValues = hrItemValues
  76 + } else {
  77 + // HR360分数 替换 自评分数
  78 + hrItemMap := map[int]*domain.SummaryEvaluationValue{}
  79 + for i := range hrItemValues {
  80 + hrItemMap[hrItemValues[i].EvaluationItemId] = hrItemValues[i]
  81 + }
  82 + for i := range itemValues {
  83 + it := itemValues[i]
  84 + if v, ok := hrItemMap[it.EvaluationItemId]; ok {
  85 + itemValues[i] = v
  86 + }
  87 + }
  88 + }
  89 + }
  90 + }
  91 +
  92 + evaluationBase := srv.getSummaryEvaluation(transactionContext, result)
  93 + if err := transactionContext.CommitTransaction(); err != nil {
  94 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  95 + }
  96 + //组合 评估填写的值和评估项
  97 + itemValuesAdapter := srv.buildSummaryItemValue(itemList, itemValues)
  98 +
  99 + ra := adapter.EvaluationInfoSuperAdapter{
  100 + EvaluationBaseAdapter: evaluationBase,
  101 + EvaluationItems: itemValuesAdapter,
  102 + }
  103 + return &ra, nil
  104 +}
  105 +
  106 +func (srv *SummaryEvaluationService) findCycleItemValueByType(
  107 + tc application.TransactionContext,
  108 + cycleId int64,
  109 + targetUserId int,
  110 + typesList []int,
  111 +) ([]*domain.SummaryEvaluationValue, []*domain.SummaryEvaluation, error) {
  112 + evaluationRepo := factory.CreateSummaryEvaluationRepository(map[string]interface{}{"transactionContext": tc})
  113 + itemValueRepo := factory.CreateSummaryEvaluationValueRepository(map[string]interface{}{"transactionContext": tc})
  114 +
  115 + _, evaluationList, err := evaluationRepo.Find(map[string]interface{}{
  116 + "typesList": typesList,
  117 + "limit": len(typesList),
  118 + "targetUserId": targetUserId,
  119 + "cycleId": cycleId,
  120 + })
  121 + if err != nil {
  122 + return nil, nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  123 + }
  124 + var eIds []int // 评估类型的ID列表
  125 + for _, v := range evaluationList {
  126 + eIds = append(eIds, v.Id)
  127 + }
  128 + if len(eIds) > 0 {
  129 + _, itemValues, err := itemValueRepo.Find(map[string]interface{}{"summaryEvaluationIdList": eIds})
  130 + if err != nil {
  131 + return nil, evaluationList, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  132 + } else {
  133 + return itemValues, evaluationList, nil
  134 + }
  135 + }
  136 + return make([]*domain.SummaryEvaluationValue, 0), evaluationList, nil
  137 +}
  138 +
  139 +// EditEvaluationFinish 超级管理员编辑考核结果
  140 +func (srv *SummaryEvaluationService) EditEvaluationFinish(param *command.EditEvaluationValue) (interface{}, error) {
  141 + // 超管不接收临时数据提交
  142 + if param.IsTemporary {
  143 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "不能提交临时数据")
  144 + }
  145 +
  146 + lock := xredis.NewLockSummaryEvaluationId(param.SummaryEvaluationId)
  147 + err := lock.Lock()
  148 + if err != nil {
  149 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "未能完全提交评估内容")
  150 + }
  151 + defer func() {
  152 + lock.UnLock()
  153 + }()
  154 +
  155 + transactionContext, err := factory.StartTransaction()
  156 + if err != nil {
  157 + return nil, err
  158 + }
  159 + defer func() {
  160 + _ = transactionContext.RollbackTransaction()
  161 + }()
  162 +
  163 + // 只有超级管理员可以使用的功能
  164 + superAdmin, err := roleService.GetSuperAdmin(transactionContext, param.CompanyId, param.ExecutorId)
  165 + if err != nil {
  166 + return nil, err
  167 + }
  168 + if superAdmin != domain.RoleTypeSuperAdmin {
  169 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有操作权限")
  170 + }
  171 +
  172 + evaluationRepo := factory.CreateSummaryEvaluationRepository(map[string]interface{}{"transactionContext": transactionContext})
  173 + itemUsedRepo := factory.CreateEvaluationItemUsedRepository(map[string]interface{}{"transactionContext": transactionContext})
  174 + itemValueRepo := factory.CreateSummaryEvaluationValueRepository(map[string]interface{}{"transactionContext": transactionContext})
  175 + result, err := evaluationRepo.FindOne(map[string]interface{}{"id": param.SummaryEvaluationId})
  176 + if err != nil {
  177 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  178 + }
  179 + if result.CompanyId != param.CompanyId {
  180 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有操作权限")
  181 + }
  182 + if result.Types != domain.EvaluationFinish {
  183 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "考核类型错误")
  184 + }
  185 +
  186 + _, itemList, err := itemUsedRepo.Find(map[string]interface{}{"evaluationProjectId": result.EvaluationProjectId, "nodeType": domain.LinkNodeSelfAssessment})
  187 + if err != nil {
  188 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  189 + }
  190 + // 获取已填写的评估内容
  191 + _, itemValueList, err := itemValueRepo.Find(map[string]interface{}{"summaryEvaluationId": result.Id})
  192 + if err != nil {
  193 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  194 + }
  195 + // 超级管理员编辑不限制截止时间、不校验填写项
  196 + err = srv.editEvaluationValueUnlimited(result, &itemValueList, itemList, param.EvaluationItems, nil, true)
  197 + if err != nil {
  198 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  199 + }
  200 + for _, v := range itemValueList {
  201 + err = itemValueRepo.Save(v) // 保存填写值
  202 + if err != nil {
  203 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  204 + }
  205 + }
  206 + result.Status = domain.EvaluationCompleted
  207 + result.CheckResult = domain.EvaluationCheckUncompleted
  208 + err = evaluationRepo.Save(result)
  209 + if err != nil {
  210 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  211 + }
  212 + if err := transactionContext.CommitTransaction(); err != nil {
  213 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  214 + }
  215 +
  216 + itemValueAdapter := srv.buildSummaryItemValue(itemList, itemValueList)
  217 + return map[string][]adapter.EvaluationItemAdapter{"EvaluationItems": itemValueAdapter}, nil
  218 +}
@@ -1118,226 +1118,6 @@ func (srv *SummaryEvaluationService) GetEvaluationSuper(param *command.QueryEval @@ -1118,226 +1118,6 @@ func (srv *SummaryEvaluationService) GetEvaluationSuper(param *command.QueryEval
1118 return &result, nil 1118 return &result, nil
1119 } 1119 }
1120 1120
1121 -// GetEvaluationSuperForAdmin 根据执行人获取上级评估详情(超级管理员特殊处理)  
1122 -func (srv *SummaryEvaluationService) GetEvaluationSuperForAdmin(param *command.QueryEvaluationSuper) (*adapter.EvaluationInfoSuperAdapter, error) {  
1123 - transactionContext, err := factory.StartTransaction()  
1124 - if err != nil {  
1125 - return nil, err  
1126 - }  
1127 - defer func() {  
1128 - _ = transactionContext.RollbackTransaction()  
1129 - }()  
1130 -  
1131 - // 只有超级管理员可以使用的功能  
1132 - superAdmin, err := roleService.GetSuperAdmin(transactionContext, param.CompanyId, param.UserId)  
1133 - if err != nil {  
1134 - return nil, err  
1135 - }  
1136 - if superAdmin != domain.RoleTypeSuperAdmin {  
1137 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有操作权限")  
1138 - }  
1139 -  
1140 - evaluationRepo := factory.CreateSummaryEvaluationRepository(map[string]interface{}{"transactionContext": transactionContext})  
1141 - evaluationItemRepo := factory.CreateEvaluationItemUsedRepository(map[string]interface{}{"transactionContext": transactionContext})  
1142 - itemValueRepo := factory.CreateSummaryEvaluationValueRepository(map[string]interface{}{"transactionContext": transactionContext})  
1143 - result, err := evaluationRepo.FindOne(map[string]interface{}{"id": param.SummaryEvaluationId})  
1144 - if err != nil || result == nil {  
1145 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取评估"+err.Error())  
1146 - }  
1147 - if result.CompanyId != param.CompanyId {  
1148 - return nil, application.ThrowError(application.BUSINESS_ERROR, "没有操作权限")  
1149 - }  
1150 - if result.Types != domain.EvaluationFinish {  
1151 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "考核结果类型错误")  
1152 - }  
1153 -  
1154 - _, itemList, err := evaluationItemRepo.Find(map[string]interface{}{"evaluationProjectId": result.EvaluationProjectId, "nodeType": domain.LinkNodeSelfAssessment})  
1155 - if err != nil {  
1156 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())  
1157 - }  
1158 -  
1159 - // 获取已填写的评估内容  
1160 - _, itemValues, err := itemValueRepo.Find(map[string]interface{}{"summaryEvaluationId": result.Id})  
1161 - if err != nil {  
1162 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())  
1163 - }  
1164 - // 考核结果不存在 -> 获取上级考核 -> 获取360+HRBP+自评  
1165 - if len(itemValues) == 0 {  
1166 - itemValues, evaluationList, err := srv.findCycleItemValueByType(transactionContext, result.CycleId, result.TargetUser.UserId, []int{int(domain.EvaluationSuper)})  
1167 - if err != nil {  
1168 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())  
1169 - }  
1170 - // 没有上级评估时(有上级考核类型时,不管分数有没有填写都算,没填写当作零)  
1171 - if len(evaluationList) == 0 {  
1172 - itemValues, _, err = srv.findCycleItemValueByType(transactionContext, result.CycleId, result.TargetUser.UserId, []int{int(domain.EvaluationSelf)})  
1173 - if err != nil {  
1174 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())  
1175 - }  
1176 - hrItemValues, _, err := srv.findCycleItemValueByType(transactionContext, result.CycleId, result.TargetUser.UserId, []int{int(domain.Evaluation360), int(domain.EvaluationHrbp)})  
1177 - if err != nil {  
1178 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())  
1179 - }  
1180 - // 自评分数  
1181 - if len(itemValues) == 0 {  
1182 - itemValues = hrItemValues  
1183 - } else {  
1184 - // HR360分数 替换 自评分数  
1185 - hrItemMap := map[int]*domain.SummaryEvaluationValue{}  
1186 - for i := range hrItemValues {  
1187 - hrItemMap[hrItemValues[i].EvaluationItemId] = hrItemValues[i]  
1188 - }  
1189 - for i := range itemValues {  
1190 - it := itemValues[i]  
1191 - if v, ok := hrItemMap[it.EvaluationItemId]; ok {  
1192 - itemValues[i] = v  
1193 - }  
1194 - }  
1195 - }  
1196 - }  
1197 - }  
1198 -  
1199 - evaluationBase := srv.getSummaryEvaluation(transactionContext, result)  
1200 - if err := transactionContext.CommitTransaction(); err != nil {  
1201 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())  
1202 - }  
1203 - //组合 评估填写的值和评估项  
1204 - itemValuesAdapter := srv.buildSummaryItemValue(itemList, itemValues)  
1205 -  
1206 - ra := adapter.EvaluationInfoSuperAdapter{  
1207 - EvaluationBaseAdapter: evaluationBase,  
1208 - EvaluationItems: itemValuesAdapter,  
1209 - }  
1210 - return &ra, nil  
1211 -}  
1212 -  
1213 -func (srv *SummaryEvaluationService) findCycleItemValueByType(  
1214 - tc application.TransactionContext,  
1215 - cycleId int64,  
1216 - targetUserId int,  
1217 - typesList []int,  
1218 -) ([]*domain.SummaryEvaluationValue, []*domain.SummaryEvaluation, error) {  
1219 - evaluationRepo := factory.CreateSummaryEvaluationRepository(map[string]interface{}{"transactionContext": tc})  
1220 - itemValueRepo := factory.CreateSummaryEvaluationValueRepository(map[string]interface{}{"transactionContext": tc})  
1221 -  
1222 - _, evaluationList, err := evaluationRepo.Find(map[string]interface{}{  
1223 - "typesList": typesList,  
1224 - "limit": len(typesList),  
1225 - "targetUserId": targetUserId,  
1226 - "cycleId": cycleId,  
1227 - })  
1228 - if err != nil {  
1229 - return nil, nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())  
1230 - }  
1231 - var eIds []int // 评估类型的ID列表  
1232 - for _, v := range evaluationList {  
1233 - eIds = append(eIds, v.Id)  
1234 - }  
1235 - if len(eIds) > 0 {  
1236 - _, itemValues, err := itemValueRepo.Find(map[string]interface{}{"summaryEvaluationIdList": eIds})  
1237 - if err != nil {  
1238 - return nil, evaluationList, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())  
1239 - } else {  
1240 - return itemValues, evaluationList, nil  
1241 - }  
1242 - }  
1243 - return make([]*domain.SummaryEvaluationValue, 0), evaluationList, nil  
1244 -}  
1245 -  
1246 -// EditEvaluationSuperForAdmin 更新上级评估内容(超级管理员)  
1247 -func (srv *SummaryEvaluationService) EditEvaluationSuperForAdmin(param *command.EditEvaluationValue) (interface{}, error) {  
1248 - // 超管不接收临时数据提交  
1249 - if param.IsTemporary {  
1250 - return nil, nil  
1251 - }  
1252 -  
1253 - lock := xredis.NewLockSummaryEvaluationId(param.SummaryEvaluationId)  
1254 - err := lock.Lock()  
1255 - if err != nil {  
1256 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "未能完全提交评估内容")  
1257 - }  
1258 - defer func() {  
1259 - lock.UnLock()  
1260 - }()  
1261 -  
1262 - transactionContext, err := factory.StartTransaction()  
1263 - if err != nil {  
1264 - return nil, err  
1265 - }  
1266 - defer func() {  
1267 - _ = transactionContext.RollbackTransaction()  
1268 - }()  
1269 -  
1270 - // 只有超级管理员可以使用的功能  
1271 - superAdmin, err := roleService.GetSuperAdmin(transactionContext, param.CompanyId, param.ExecutorId)  
1272 - if err != nil {  
1273 - return nil, err  
1274 - }  
1275 - if superAdmin != domain.RoleTypeSuperAdmin {  
1276 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有操作权限")  
1277 - }  
1278 -  
1279 - evaluationRepo := factory.CreateSummaryEvaluationRepository(map[string]interface{}{"transactionContext": transactionContext})  
1280 - itemUsedRepo := factory.CreateEvaluationItemUsedRepository(map[string]interface{}{"transactionContext": transactionContext})  
1281 - itemValueRepo := factory.CreateSummaryEvaluationValueRepository(map[string]interface{}{"transactionContext": transactionContext})  
1282 - evaluationData, err := evaluationRepo.FindOne(map[string]interface{}{"id": param.SummaryEvaluationId})  
1283 - if err != nil {  
1284 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())  
1285 - }  
1286 - if evaluationData.CompanyId != param.CompanyId {  
1287 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有操作权限")  
1288 - }  
1289 - _, evaluationList, err := evaluationRepo.Find(map[string]interface{}{  
1290 - "targetUserId": evaluationData.TargetUser.UserId,  
1291 - "typesList": []int{int(domain.EvaluationFinish)},  
1292 - "cycleId": evaluationData.CycleId,  
1293 - "limit": 1,  
1294 - })  
1295 - if err != nil {  
1296 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())  
1297 - }  
1298 - // 如果目标员工已经确认考核结果,就不能在进行评估编辑  
1299 - if len(evaluationList) > 0 && evaluationList[0].CheckResult == domain.EvaluationCheckCompleted {  
1300 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "用户已经确认该周期的考核结果,不能再编辑!")  
1301 - }  
1302 -  
1303 - _, itemList, err := itemUsedRepo.Find(map[string]interface{}{"evaluationProjectId": evaluationData.EvaluationProjectId, "nodeType": domain.LinkNodeSelfAssessment})  
1304 - if err != nil {  
1305 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())  
1306 - }  
1307 - // 获取已填写的评估内容  
1308 - _, itemValueList, err := itemValueRepo.Find(map[string]interface{}{"summaryEvaluationId": evaluationData.Id})  
1309 - if err != nil {  
1310 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())  
1311 - }  
1312 - // 超级管理员编辑不限制截止时间、不校验填写项  
1313 - err = srv.editEvaluationValueUnlimited(evaluationData, &itemValueList, itemList, param.EvaluationItems, nil, true)  
1314 - if err != nil {  
1315 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())  
1316 - }  
1317 - for _, v := range itemValueList {  
1318 - err = itemValueRepo.Save(v) // 保存填写值  
1319 - if err != nil {  
1320 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())  
1321 - }  
1322 - }  
1323 - evaluationData.Status = domain.EvaluationCompleted  
1324 - err = evaluationRepo.Save(evaluationData)  
1325 - if err != nil {  
1326 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())  
1327 - }  
1328 - if err := transactionContext.CommitTransaction(); err != nil {  
1329 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())  
1330 - }  
1331 -  
1332 - // err = srv.AfterCompletedEvaluationSuper(evaluationData)  
1333 - // if err != nil {  
1334 - // return nil, err  
1335 - // }  
1336 -  
1337 - itemValueAdapter := srv.buildSummaryItemValue(itemList, itemValueList)  
1338 - return map[string][]adapter.EvaluationItemAdapter{"EvaluationItems": itemValueAdapter}, nil  
1339 -}  
1340 -  
1341 // getEvaluationSuperDefaultValue 1121 // getEvaluationSuperDefaultValue
1342 // 按照权限设置,是否获取上级评估内容的默认值 1122 // 按照权限设置,是否获取上级评估内容的默认值
1343 func (srv *SummaryEvaluationService) getEvaluationSuperDefaultValue(transactionContext application.TransactionContext, evaluationData *domain.SummaryEvaluation) ( 1123 func (srv *SummaryEvaluationService) getEvaluationSuperDefaultValue(transactionContext application.TransactionContext, evaluationData *domain.SummaryEvaluation) (