作者 tangxvhui

更新自评小结

@@ -596,8 +596,3 @@ func (srv *StaffAssessServeice) ExportUserAssess(param *query.ExportAssessConten @@ -596,8 +596,3 @@ func (srv *StaffAssessServeice) ExportUserAssess(param *query.ExportAssessConten
596 xlsxFile.MergeCell(sheetName, "A1", colName+"1") 596 xlsxFile.MergeCell(sheetName, "A1", colName+"1")
597 return xlsxFile, nil 597 return xlsxFile, nil
598 } 598 }
599 -  
600 -// 自评小结统计  
601 -func (srv *StaffAssessServeice) AssessSelfSummary() {  
602 -  
603 -}  
@@ -14,6 +14,10 @@ type EvaluationInfoAdapter struct { @@ -14,6 +14,10 @@ type EvaluationInfoAdapter struct {
14 EndTime string `json:"endTime"` //结束时间 2006-01-02 15:04:05 14 EndTime string `json:"endTime"` //结束时间 2006-01-02 15:04:05
15 TargetUserId int `json:"targetUserId"` //被评估的目标用户,被执行的 15 TargetUserId int `json:"targetUserId"` //被评估的目标用户,被执行的
16 TargetUserName string `json:"targetUserName"` // 16 TargetUserName string `json:"targetUserName"` //
  17 + CompanyLogo string `json:"companyLogo,string,"` //公司logo
  18 + CompanyName string `json:"companyName"` //公司名称
  19 + SupperUser string `json:"superUser"` //目标用户的上级
  20 + DutyTime string `json:"dutyTime"` //入职时间
17 Status string `json:"status"` //完成状态 21 Status string `json:"status"` //完成状态
18 EvaluationItems []EvaluationItemAdapter `json:"evaluationItems"` 22 EvaluationItems []EvaluationItemAdapter `json:"evaluationItems"`
19 } 23 }
1 package command 1 package command
2 2
3 -type QueryEvaluationInfo struct {  
4 - CycleId int `json:"cycleId,string"` //周期id  
5 - ExecutorId int `json:"executorId,string"` //执行人id  
6 - CompanyId int `json:"-"` //公司id 3 +// type QueryEvaluationInfo struct {
  4 +// CycleId int `json:"cycleId,string"` //周期id
  5 +// ExecutorId int `json:"executorId,string"` //执行人id
  6 +// CompanyId int `json:"-"` //公司id
  7 +// }
  8 +
  9 +type QueryEvaluation struct {
  10 + CycleId int `json:"cycleId,string"` //周期id
  11 + UserId int `json:"userId,string"` //员工id
  12 + CompanyId int `json:"-"` //公司id
7 } 13 }
1 package service 1 package service
2 2
3 import ( 3 import (
  4 + "fmt"
4 "time" 5 "time"
5 6
6 "github.com/linmadan/egglib-go/core/application" 7 "github.com/linmadan/egglib-go/core/application"
@@ -266,19 +267,18 @@ func (srv *SummaryEvaluationService) buildSummaryItemValue(itemList []*domain.Ev @@ -266,19 +267,18 @@ func (srv *SummaryEvaluationService) buildSummaryItemValue(itemList []*domain.Ev
266 Remark: "", 267 Remark: "",
267 } 268 }
268 value, ok := valueMap[v.Id] 269 value, ok := valueMap[v.Id]
269 - if !ok {  
270 - continue 270 + if ok {
  271 + item.Score = value.Score
  272 + item.Value = value.Value
  273 + item.Remark = value.Remark
271 } 274 }
272 - item.Score = value.Score  
273 - item.Value = value.Value  
274 - item.Remark = value.Remark  
275 itemValues = append(itemValues, item) 275 itemValues = append(itemValues, item)
276 } 276 }
277 return itemValues 277 return itemValues
278 } 278 }
279 279
280 // 获取综合自评详情 280 // 获取综合自评详情
281 -func (srv *SummaryEvaluationService) GetEvaluationSelf(param *command.QueryEvaluationInfo) (*adapter.EvaluationInfoAdapter, error) { 281 +func (srv *SummaryEvaluationService) GetEvaluationSelf(param *command.QueryEvaluation) (*adapter.EvaluationInfoAdapter, error) {
282 transactionContext, err := factory.CreateTransactionContext(nil) 282 transactionContext, err := factory.CreateTransactionContext(nil)
283 if err != nil { 283 if err != nil {
284 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) 284 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
@@ -301,7 +301,7 @@ func (srv *SummaryEvaluationService) GetEvaluationSelf(param *command.QueryEvalu @@ -301,7 +301,7 @@ func (srv *SummaryEvaluationService) GetEvaluationSelf(param *command.QueryEvalu
301 _, evaluationList, err := evaluationRepo.Find(map[string]interface{}{ 301 _, evaluationList, err := evaluationRepo.Find(map[string]interface{}{
302 "limit": 1, 302 "limit": 1,
303 "cycleId": param.CompanyId, 303 "cycleId": param.CompanyId,
304 - "executorId": param.ExecutorId, 304 + "executorId": param.UserId,
305 "types": domain.EvaluationSelf, 305 "types": domain.EvaluationSelf,
306 }) 306 })
307 if err != nil { 307 if err != nil {
@@ -326,12 +326,17 @@ func (srv *SummaryEvaluationService) GetEvaluationSelf(param *command.QueryEvalu @@ -326,12 +326,17 @@ func (srv *SummaryEvaluationService) GetEvaluationSelf(param *command.QueryEvalu
326 if err != nil { 326 if err != nil {
327 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 327 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
328 } 328 }
329 - 329 + result := srv.getSummaryEvaluation(transactionContext, evaluationData)
330 if err := transactionContext.CommitTransaction(); err != nil { 330 if err := transactionContext.CommitTransaction(); err != nil {
331 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 331 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
332 } 332 }
333 333
334 itemValuesAdapter := srv.buildSummaryItemValue(itemList, itemValues) 334 itemValuesAdapter := srv.buildSummaryItemValue(itemList, itemValues)
  335 + result.EvaluationItems = itemValuesAdapter
  336 + return result, nil
  337 +}
  338 +
  339 +func (srv *SummaryEvaluationService) getSummaryEvaluation(transactionContext application.TransactionContext, evaluationData *domain.SummaryEvaluation) *adapter.EvaluationInfoAdapter {
335 result := adapter.EvaluationInfoAdapter{ 340 result := adapter.EvaluationInfoAdapter{
336 SummaryEvaluationId: evaluationData.Id, 341 SummaryEvaluationId: evaluationData.Id,
337 CycleId: int(evaluationData.CycleId), 342 CycleId: int(evaluationData.CycleId),
@@ -343,10 +348,50 @@ func (srv *SummaryEvaluationService) GetEvaluationSelf(param *command.QueryEvalu @@ -343,10 +348,50 @@ func (srv *SummaryEvaluationService) GetEvaluationSelf(param *command.QueryEvalu
343 EndTime: evaluationData.EndTime.Format("2006-01-02 15:04:05"), 348 EndTime: evaluationData.EndTime.Format("2006-01-02 15:04:05"),
344 TargetUserId: evaluationData.TargetUser.UserId, 349 TargetUserId: evaluationData.TargetUser.UserId,
345 TargetUserName: evaluationData.TargetUser.UserName, 350 TargetUserName: evaluationData.TargetUser.UserName,
  351 + CompanyLogo: "",
  352 + CompanyName: "",
  353 + SupperUser: "",
  354 + DutyTime: "",
346 Status: string(evaluationData.Status), 355 Status: string(evaluationData.Status),
347 - EvaluationItems: itemValuesAdapter, 356 + EvaluationItems: []adapter.EvaluationItemAdapter{},
348 } 357 }
349 - return &result, nil 358 + //获取用户信息
  359 + companyRepo := factory.CreateCompanyRepository(map[string]interface{}{
  360 + "transactionContext": transactionContext,
  361 + })
  362 + userRepo := factory.CreateUserRepository(map[string]interface{}{
  363 + "transactionContext": transactionContext,
  364 + })
  365 +
  366 + companyData, err := companyRepo.FindOne(map[string]interface{}{
  367 + "id": evaluationData.CompanyId,
  368 + })
  369 +
  370 + if err != nil {
  371 + return &result
  372 + }
  373 +
  374 + userData, err := userRepo.FindOne(map[string]interface{}{
  375 + "id": evaluationData.TargetUser.UserId,
  376 + })
  377 + if err != nil {
  378 + return &result
  379 + }
  380 + result.DutyTime = userData.EntryTime
  381 + result.CompanyLogo = companyData.Logo
  382 + result.CompanyName = companyData.Name
  383 +
  384 + if userData.ParentId <= 0 {
  385 + return &result
  386 + }
  387 + pUserData, err := userRepo.FindOne(map[string]interface{}{
  388 + "id": userData.ParentId,
  389 + })
  390 + if err != nil {
  391 + return &result
  392 + }
  393 + result.SupperUser = pUserData.Name
  394 + return &result
350 } 395 }
351 396
352 // 编辑综合自评详情 397 // 编辑综合自评详情
@@ -377,6 +422,10 @@ func (srv *SummaryEvaluationService) EditEvaluationSelf(param *command.EditEvalu @@ -377,6 +422,10 @@ func (srv *SummaryEvaluationService) EditEvaluationSelf(param *command.EditEvalu
377 if err != nil { 422 if err != nil {
378 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 423 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
379 } 424 }
  425 + if evaluationData.Types != domain.EvaluationSelf {
  426 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有操作权限")
  427 + }
  428 +
380 if evaluationData.Executor.UserId != param.ExecutorId { 429 if evaluationData.Executor.UserId != param.ExecutorId {
381 430
382 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有操作权限") 431 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有操作权限")
@@ -388,6 +437,7 @@ func (srv *SummaryEvaluationService) EditEvaluationSelf(param *command.EditEvalu @@ -388,6 +437,7 @@ func (srv *SummaryEvaluationService) EditEvaluationSelf(param *command.EditEvalu
388 437
389 _, itemList, err := itemUsedRepo.Find(map[string]interface{}{ 438 _, itemList, err := itemUsedRepo.Find(map[string]interface{}{
390 "evaluationProjectId": evaluationData.EvaluationProjectId, 439 "evaluationProjectId": evaluationData.EvaluationProjectId,
  440 + "nodeType": domain.LinkNodeSelfAssessment,
391 }) 441 })
392 if err != nil { 442 if err != nil {
393 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 443 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
@@ -443,6 +493,7 @@ func (srv *SummaryEvaluationService) EditEvaluationSelf(param *command.EditEvalu @@ -443,6 +493,7 @@ func (srv *SummaryEvaluationService) EditEvaluationSelf(param *command.EditEvalu
443 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 493 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
444 } 494 }
445 evaluationData.UpdatedAt = nowTime 495 evaluationData.UpdatedAt = nowTime
  496 + evaluationData.Status = domain.EvaluationCompleted
446 //保存填写值 497 //保存填写值
447 err = evaluationRepo.Save(evaluationData) 498 err = evaluationRepo.Save(evaluationData)
448 if err != nil { 499 if err != nil {
@@ -506,15 +557,23 @@ func (srv *SummaryEvaluationService) GetTargetUserCycleList(param *command.Query @@ -506,15 +557,23 @@ func (srv *SummaryEvaluationService) GetTargetUserCycleList(param *command.Query
506 } 557 }
507 558
508 // 自评小结详情 559 // 自评小结详情
509 -func (srv *SummaryEvaluationService) CountEvaluationSelfLevel(param *command.QueryEvaluationInfo) (*adapter.EvaluationInfoAdapter, error) {  
510 - 560 +func (srv *SummaryEvaluationService) CountEvaluationSelfLevel(param *command.QueryEvaluation) (*adapter.EvaluationInfoAdapter, error) {
511 evaluationInfo, err := srv.GetEvaluationSelf(param) 561 evaluationInfo, err := srv.GetEvaluationSelf(param)
512 if err != nil { 562 if err != nil {
513 return nil, err 563 return nil, err
514 } 564 }
515 -  
516 - _ = evaluationInfo  
517 - //TODO 组装等级数量统计 565 + levelCodeMap := map[int][]adapter.LevalCodeCount{}
  566 + for _, v := range evaluationInfo.EvaluationItems {
  567 + codes := v.Rule.GetLevelCodes()
  568 + levelCode := []adapter.LevalCodeCount{}
  569 + for _, v2 := range codes {
  570 + levelCode = append(levelCode, adapter.LevalCodeCount{
  571 + Code: v2,
  572 + Number: 0,
  573 + })
  574 + }
  575 + levelCodeMap[v.EvaluationItemId] = levelCode
  576 + }
518 transactionContext, err := factory.CreateTransactionContext(nil) 577 transactionContext, err := factory.CreateTransactionContext(nil)
519 if err != nil { 578 if err != nil {
520 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) 579 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
@@ -526,8 +585,42 @@ func (srv *SummaryEvaluationService) CountEvaluationSelfLevel(param *command.Que @@ -526,8 +585,42 @@ func (srv *SummaryEvaluationService) CountEvaluationSelfLevel(param *command.Que
526 _ = transactionContext.RollbackTransaction() 585 _ = transactionContext.RollbackTransaction()
527 }() 586 }()
528 587
  588 + //统计周期内,评估项等级的数量
  589 + assessDao := dao.NewStaffAssessDao(map[string]interface{}{
  590 + "transactionContext": transactionContext,
  591 + })
  592 + levelCodeCountList, err := assessDao.CountAssessContentLevelCode(param.UserId, domain.AssessSelf, param.CycleId)
  593 + if err != nil {
  594 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  595 + }
  596 +
  597 + levelCodeCountMap := map[string]int{}
  598 + for _, v := range levelCodeCountList {
  599 + key := fmt.Sprintf("%s-%s-%s", v.Category, v.Name, v.LevelValue)
  600 + levelCodeCountMap[key] = v.Cnt
  601 + }
  602 +
  603 + for i := range evaluationInfo.EvaluationItems {
  604 + itemId := evaluationInfo.EvaluationItems[i].EvaluationItemId
  605 + levelCodes, ok := levelCodeMap[itemId]
  606 + if !ok {
  607 + continue
  608 + }
  609 + evaluationInfo.EvaluationItems[i].LevelCount = levelCodes
  610 + for i2 := range levelCodes {
  611 + key := fmt.Sprintf("%s-%s-%s",
  612 + evaluationInfo.EvaluationItems[i].Category,
  613 + evaluationInfo.EvaluationItems[i].Name,
  614 + levelCodes[i2].Code,
  615 + )
  616 +
  617 + if mVal, ok := levelCodeCountMap[key]; ok {
  618 + levelCodes[i2].Number = mVal
  619 + }
  620 + }
  621 + }
529 if err := transactionContext.CommitTransaction(); err != nil { 622 if err := transactionContext.CommitTransaction(); err != nil {
530 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 623 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
531 } 624 }
532 - return nil, nil 625 + return evaluationInfo, nil
533 } 626 }
@@ -114,3 +114,18 @@ type EvaluationRuleRepository interface { @@ -114,3 +114,18 @@ type EvaluationRuleRepository interface {
114 Find(queryOptions map[string]interface{}) (int64, []*EvaluationRule, error) 114 Find(queryOptions map[string]interface{}) (int64, []*EvaluationRule, error)
115 Count(queryOptions map[string]interface{}) (int64, error) 115 Count(queryOptions map[string]interface{}) (int64, error)
116 } 116 }
  117 +
  118 +func (rule *EvaluationRule) GetLevelCodes() []string {
  119 + codes := []string{}
  120 + if rule.Type == EvaluationTypeRating {
  121 + for _, v := range rule.Rating.Levels {
  122 + codes = append(codes, v.Code)
  123 + }
  124 + }
  125 + if rule.Type == EvaluationTypeScore {
  126 + for _, v := range rule.Score.Levels {
  127 + codes = append(codes, v.Code)
  128 + }
  129 + }
  130 + return codes
  131 +}
@@ -64,7 +64,7 @@ type SummaryEvaluationRepository interface { @@ -64,7 +64,7 @@ type SummaryEvaluationRepository interface {
64 func (evaluation *SummaryEvaluation) EvaluationTotalScore(valueList []*SummaryEvaluationValue) error { 64 func (evaluation *SummaryEvaluation) EvaluationTotalScore(valueList []*SummaryEvaluationValue) error {
65 var totalScore float64 65 var totalScore float64
66 for _, v := range valueList { 66 for _, v := range valueList {
67 - score, err := v.SumScore(v.Weight, v.Value) 67 + score, err := v.SumScore()
68 if err != nil { 68 if err != nil {
69 return err 69 return err
70 } 70 }
@@ -33,7 +33,7 @@ type SummaryEvaluationValueRepository interface { @@ -33,7 +33,7 @@ type SummaryEvaluationValueRepository interface {
33 // 分数保留2位小数 33 // 分数保留2位小数
34 func (itemValue *SummaryEvaluationValue) SummaryEvaluationScore() error { 34 func (itemValue *SummaryEvaluationValue) SummaryEvaluationScore() error {
35 //计算方式 35 //计算方式
36 - score, err := itemValue.SumScore(itemValue.Weight, itemValue.Value) 36 + score, err := itemValue.SumScore()
37 if err != nil { 37 if err != nil {
38 return err 38 return err
39 } 39 }
@@ -41,7 +41,7 @@ func (itemValue *SummaryEvaluationValue) SummaryEvaluationScore() error { @@ -41,7 +41,7 @@ func (itemValue *SummaryEvaluationValue) SummaryEvaluationScore() error {
41 return nil 41 return nil
42 } 42 }
43 43
44 -func (item *SummaryEvaluationValue) SumScore(weight float64, value string) (float64, error) { 44 +func (item *SummaryEvaluationValue) SumScore() (float64, error) {
45 if item.Weight == 0 { 45 if item.Weight == 0 {
46 return 0, nil 46 return 0, nil
47 } 47 }
@@ -1191,3 +1191,35 @@ func (d *StaffAssessDao) SearchContentValueByAssessId(assessId []int) map[int][] @@ -1191,3 +1191,35 @@ func (d *StaffAssessDao) SearchContentValueByAssessId(assessId []int) map[int][]
1191 1191
1192 return valueMap 1192 return valueMap
1193 } 1193 }
  1194 +
  1195 +type AssessContentLevelCode struct {
  1196 + Cnt int `pg:"cnt"` //数量
  1197 + LevelValue string `pg:"levelValue"` //评估的等级值
  1198 + Category string `pg:"category"` //评估的分类
  1199 + Name string `pg:"name"` //名称
  1200 +}
  1201 +
  1202 +func (d *StaffAssessDao) CountAssessContentLevelCode(targetUserId int, assessType domain.StaffAssessType, cycleId int) ([]AssessContentLevelCode, error) {
  1203 + sqlStr := `
  1204 +select
  1205 +count(staff_assess_content.level_value) as cnt ,
  1206 +staff_assess_content.level_value ,
  1207 +staff_assess_content.category ,
  1208 +staff_assess_content."name"
  1209 +from staff_assess_content
  1210 +join staff_assess on staff_assess_content.staff_assess_id = staff_assess.id
  1211 +where 1=1 and staff_assess.deleted_at isnull
  1212 +and target_user ->>'userId'='?'
  1213 +and staff_assess."types" = '?'
  1214 +and staff_assess_content.level_value notnull
  1215 +and staff_assess.cycle_id =?
  1216 +group by level_value,category,"name" `
  1217 +
  1218 + var result []AssessContentLevelCode
  1219 + condition := []interface{}{
  1220 + targetUserId, string(assessType), cycleId,
  1221 + }
  1222 + tx := d.transactionContext.PgTx
  1223 + _, err := tx.Query(&result, sqlStr, condition...)
  1224 + return result, err
  1225 +}
@@ -46,7 +46,7 @@ func (c *SummaryEvaluationController) GetMenu() { @@ -46,7 +46,7 @@ func (c *SummaryEvaluationController) GetMenu() {
46 46
47 func (c *SummaryEvaluationController) GetEvaluationSelf() { 47 func (c *SummaryEvaluationController) GetEvaluationSelf() {
48 srv := service.NewSummaryEvaluationService() 48 srv := service.NewSummaryEvaluationService()
49 - paramReq := &command.QueryEvaluationInfo{} 49 + paramReq := &command.QueryEvaluation{}
50 err := c.BindJSON(paramReq) 50 err := c.BindJSON(paramReq)
51 if err != nil { 51 if err != nil {
52 e := application.ThrowError(application.ARG_ERROR, "json 解析错误"+err.Error()) 52 e := application.ThrowError(application.ARG_ERROR, "json 解析错误"+err.Error())
@@ -55,12 +55,13 @@ func (c *SummaryEvaluationController) GetEvaluationSelf() { @@ -55,12 +55,13 @@ func (c *SummaryEvaluationController) GetEvaluationSelf() {
55 } 55 }
56 userReq := middlewares.GetUser(c.Ctx) 56 userReq := middlewares.GetUser(c.Ctx)
57 paramReq.CompanyId = int(userReq.CompanyId) 57 paramReq.CompanyId = int(userReq.CompanyId)
58 - paramReq.ExecutorId = int(userReq.UserId) 58 + paramReq.UserId = int(userReq.UserId)
59 data, err := srv.GetEvaluationSelf(paramReq) 59 data, err := srv.GetEvaluationSelf(paramReq)
60 c.Response(data, err) 60 c.Response(data, err)
61 61
62 } 62 }
63 63
  64 +// EditEvaluationSelf 编辑综合自评
64 func (c *SummaryEvaluationController) EditEvaluationSelf() { 65 func (c *SummaryEvaluationController) EditEvaluationSelf() {
65 srv := service.NewSummaryEvaluationService() 66 srv := service.NewSummaryEvaluationService()
66 paramReq := &command.EditEvaluationValue{} 67 paramReq := &command.EditEvaluationValue{}
@@ -78,6 +79,7 @@ func (c *SummaryEvaluationController) EditEvaluationSelf() { @@ -78,6 +79,7 @@ func (c *SummaryEvaluationController) EditEvaluationSelf() {
78 79
79 } 80 }
80 81
  82 +// GetTargetUserCycleList 根据被评估人获取周期列表
81 func (c *SummaryEvaluationController) GetTargetUserCycleList() { 83 func (c *SummaryEvaluationController) GetTargetUserCycleList() {
82 srv := service.NewSummaryEvaluationService() 84 srv := service.NewSummaryEvaluationService()
83 paramReq := &command.QueryCycleList{} 85 paramReq := &command.QueryCycleList{}
@@ -92,3 +94,20 @@ func (c *SummaryEvaluationController) GetTargetUserCycleList() { @@ -92,3 +94,20 @@ func (c *SummaryEvaluationController) GetTargetUserCycleList() {
92 data, err := srv.GetTargetUserCycleList(paramReq) 94 data, err := srv.GetTargetUserCycleList(paramReq)
93 c.Response(data, err) 95 c.Response(data, err)
94 } 96 }
  97 +
  98 +// CountEvaluationSelfLevel 获取自评小结
  99 +func (c *SummaryEvaluationController) CountEvaluationSelfLevel() {
  100 + srv := service.NewSummaryEvaluationService()
  101 + paramReq := &command.QueryEvaluation{}
  102 + err := c.BindJSON(paramReq)
  103 + if err != nil {
  104 + e := application.ThrowError(application.ARG_ERROR, "json 解析错误"+err.Error())
  105 + c.Response(nil, e)
  106 + return
  107 + }
  108 + userReq := middlewares.GetUser(c.Ctx)
  109 + paramReq.UserId = int(userReq.UserId)
  110 + paramReq.CompanyId = int(userReq.CompanyId)
  111 + data, err := srv.CountEvaluationSelfLevel(paramReq)
  112 + c.Response(data, err)
  113 +}
@@ -15,6 +15,7 @@ func init() { @@ -15,6 +15,7 @@ func init() {
15 web.NSCtrlPost("/cycle/menu", (*controllers.SummaryEvaluationController).GetMenu), 15 web.NSCtrlPost("/cycle/menu", (*controllers.SummaryEvaluationController).GetMenu),
16 web.NSCtrlPost("/self", (*controllers.SummaryEvaluationController).GetEvaluationSelf), 16 web.NSCtrlPost("/self", (*controllers.SummaryEvaluationController).GetEvaluationSelf),
17 web.NSCtrlPost("/self/edit", (*controllers.SummaryEvaluationController).EditEvaluationSelf), 17 web.NSCtrlPost("/self/edit", (*controllers.SummaryEvaluationController).EditEvaluationSelf),
  18 + web.NSCtrlPost("/self/summary", (*controllers.SummaryEvaluationController).CountEvaluationSelfLevel),
18 ) 19 )
19 web.AddNamespace(summaryNS) 20 web.AddNamespace(summaryNS)
20 } 21 }