|
@@ -1115,6 +1115,12 @@ func (srv *SummaryEvaluationService) GetTargetUserEvaluationSuper(param *command |
|
@@ -1115,6 +1115,12 @@ func (srv *SummaryEvaluationService) GetTargetUserEvaluationSuper(param *command |
1115
|
itemValueRepo := factory.CreateSummaryEvaluationValueRepository(map[string]interface{}{
|
1115
|
itemValueRepo := factory.CreateSummaryEvaluationValueRepository(map[string]interface{}{
|
1116
|
"transactionContext": transactionContext,
|
1116
|
"transactionContext": transactionContext,
|
1117
|
})
|
1117
|
})
|
|
|
1118
|
+ permissionRepository := factory.CreatePermissionRepository(map[string]interface{}{"transactionContext": transactionContext})
|
|
|
1119
|
+ // 获取权限配置
|
|
|
1120
|
+ _, permissionList, err := permissionRepository.Find(map[string]interface{}{"companyId": param.CompanyId})
|
|
|
1121
|
+ if err != nil {
|
|
|
1122
|
+ return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
1123
|
+ }
|
1118
|
_, evaluationList, err := evaluationRepo.Find(map[string]interface{}{
|
1124
|
_, evaluationList, err := evaluationRepo.Find(map[string]interface{}{
|
1119
|
"limit": 1,
|
1125
|
"limit": 1,
|
1120
|
"cycleId": param.CycleId,
|
1126
|
"cycleId": param.CycleId,
|
|
@@ -1177,7 +1183,7 @@ func (srv *SummaryEvaluationService) GetTargetUserEvaluationSuper(param *command |
|
@@ -1177,7 +1183,7 @@ func (srv *SummaryEvaluationService) GetTargetUserEvaluationSuper(param *command |
1177
|
itemValuesAdapter := srv.buildSummaryItemValue(itemList, itemValues)
|
1183
|
itemValuesAdapter := srv.buildSummaryItemValue(itemList, itemValues)
|
1178
|
codeList := []*adapter.LevalCodeCount{}
|
1184
|
codeList := []*adapter.LevalCodeCount{}
|
1179
|
codeMap := map[string]*adapter.LevalCodeCount{}
|
1185
|
codeMap := map[string]*adapter.LevalCodeCount{}
|
1180
|
- for _, v := range itemValuesAdapter {
|
1186
|
+ for i, v := range itemValuesAdapter {
|
1181
|
if v.Weight > 0 {
|
1187
|
if v.Weight > 0 {
|
1182
|
continue
|
1188
|
continue
|
1183
|
}
|
1189
|
}
|
|
@@ -1192,7 +1198,19 @@ func (srv *SummaryEvaluationService) GetTargetUserEvaluationSuper(param *command |
|
@@ -1192,7 +1198,19 @@ func (srv *SummaryEvaluationService) GetTargetUserEvaluationSuper(param *command |
1192
|
}
|
1198
|
}
|
1193
|
codeMap[v.Value].ItemList = append(codeMap[v.Value].ItemList, v.Name)
|
1199
|
codeMap[v.Value].ItemList = append(codeMap[v.Value].ItemList, v.Name)
|
1194
|
codeMap[v.Value].Number += 1
|
1200
|
codeMap[v.Value].Number += 1
|
|
|
1201
|
+
|
|
|
1202
|
+ if len(permissionList) > 0 {
|
|
|
1203
|
+ if permissionList[0].OptEvalScore == domain.PermissionOff &&
|
|
|
1204
|
+ v.EvaluatorId > 0 {
|
|
|
1205
|
+ itemValuesAdapter[i].ForbidEdit = true
|
|
|
1206
|
+ }
|
|
|
1207
|
+ if permissionList[0].OptHrScore == domain.PermissionOff &&
|
|
|
1208
|
+ v.EvaluatorId < 0 {
|
|
|
1209
|
+ itemValuesAdapter[i].ForbidEdit = true
|
|
|
1210
|
+ }
|
|
|
1211
|
+ }
|
1195
|
}
|
1212
|
}
|
|
|
1213
|
+
|
1196
|
result := adapter.EvaluationInfoSuperAdapter{
|
1214
|
result := adapter.EvaluationInfoSuperAdapter{
|
1197
|
EvaluationBaseAdapter: evaluationBase,
|
1215
|
EvaluationBaseAdapter: evaluationBase,
|
1198
|
LevelCount: codeList,
|
1216
|
LevelCount: codeList,
|