正在显示
2 个修改的文件
包含
34 行增加
和
1 行删除
| @@ -2,6 +2,7 @@ package adapter | @@ -2,6 +2,7 @@ package adapter | ||
| 2 | 2 | ||
| 3 | import "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain" | 3 | import "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain" |
| 4 | 4 | ||
| 5 | +// 评估信息详情 | ||
| 5 | type EvaluationInfoAdapter struct { | 6 | type EvaluationInfoAdapter struct { |
| 6 | SummaryEvaluationId int `json:"summaryEvaluationId"` // | 7 | SummaryEvaluationId int `json:"summaryEvaluationId"` // |
| 7 | CycleId int `json:"cycleId,string"` //周期id | 8 | CycleId int `json:"cycleId,string"` //周期id |
| @@ -32,6 +33,11 @@ type EvaluationItemAdapter struct { | @@ -32,6 +33,11 @@ type EvaluationItemAdapter struct { | ||
| 32 | Value string `json:"value"` //评估填写的评分 | 33 | Value string `json:"value"` //评估填写的评分 |
| 33 | Score string `json:"score"` //计算的评定得分 | 34 | Score string `json:"score"` //计算的评定得分 |
| 34 | Remark string `json:"remark"` //填写的内容反馈 | 35 | Remark string `json:"remark"` //填写的内容反馈 |
| 36 | + LevelCount []LevalCodeCount `json:"levelCount"` //周期内每次评估的等级数量统计 | ||
| 35 | // | 37 | // |
| 36 | - // | 38 | +} |
| 39 | + | ||
| 40 | +type LevalCodeCount struct { | ||
| 41 | + Code string `json:"code"` | ||
| 42 | + Number int `json:"number"` | ||
| 37 | } | 43 | } |
| @@ -504,3 +504,30 @@ func (srv *SummaryEvaluationService) GetTargetUserCycleList(param *command.Query | @@ -504,3 +504,30 @@ func (srv *SummaryEvaluationService) GetTargetUserCycleList(param *command.Query | ||
| 504 | } | 504 | } |
| 505 | return tool_funs.SimpleWrapGridMap(int64(cnt), cycleList), nil | 505 | return tool_funs.SimpleWrapGridMap(int64(cnt), cycleList), nil |
| 506 | } | 506 | } |
| 507 | + | ||
| 508 | +// 自评小结详情 | ||
| 509 | +func (srv *SummaryEvaluationService) CountEvaluationSelfLevel(param *command.QueryEvaluationInfo) (*adapter.EvaluationInfoAdapter, error) { | ||
| 510 | + | ||
| 511 | + evaluationInfo, err := srv.GetEvaluationSelf(param) | ||
| 512 | + if err != nil { | ||
| 513 | + return nil, err | ||
| 514 | + } | ||
| 515 | + | ||
| 516 | + _ = evaluationInfo | ||
| 517 | + //TODO 组装等级数量统计 | ||
| 518 | + transactionContext, err := factory.CreateTransactionContext(nil) | ||
| 519 | + if err != nil { | ||
| 520 | + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
| 521 | + } | ||
| 522 | + if err := transactionContext.StartTransaction(); err != nil { | ||
| 523 | + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
| 524 | + } | ||
| 525 | + defer func() { | ||
| 526 | + _ = transactionContext.RollbackTransaction() | ||
| 527 | + }() | ||
| 528 | + | ||
| 529 | + if err := transactionContext.CommitTransaction(); err != nil { | ||
| 530 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
| 531 | + } | ||
| 532 | + return nil, nil | ||
| 533 | +} |
-
请 注册 或 登录 后发表评论