作者 tangxvhui

修正 菜单描述

@@ -107,7 +107,7 @@ func (srv *SummaryEvaluationService) GetMenu(param *command.QueryMenu) (map[stri @@ -107,7 +107,7 @@ func (srv *SummaryEvaluationService) GetMenu(param *command.QueryMenu) (map[stri
107 if err != nil { 107 if err != nil {
108 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 108 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
109 } 109 }
110 - //查询上级评估,统计未完成 110 + //查询需要执行上级评估,统计未完成
111 cntSuper, _, err := evaluationRepo.Find(map[string]interface{}{ 111 cntSuper, _, err := evaluationRepo.Find(map[string]interface{}{
112 "types": int(domain.EvaluationSuper), 112 "types": int(domain.EvaluationSuper),
113 "executorId": param.UserId, 113 "executorId": param.UserId,
@@ -118,13 +118,12 @@ func (srv *SummaryEvaluationService) GetMenu(param *command.QueryMenu) (map[stri @@ -118,13 +118,12 @@ func (srv *SummaryEvaluationService) GetMenu(param *command.QueryMenu) (map[stri
118 if err != nil { 118 if err != nil {
119 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 119 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
120 } 120 }
121 - //查询人资评估,统计未完成 121 + //查询需要执行人资评估,统计未完成
122 cntHrbp, _, err := evaluationRepo.Find(map[string]interface{}{ 122 cntHrbp, _, err := evaluationRepo.Find(map[string]interface{}{
123 - "types": int(domain.EvaluationHrbp),  
124 - "executorId": param.UserId,  
125 - "limit": 1,  
126 - "cycleId": param.CycleId,  
127 - "status": string(domain.EvaluationUncompleted), 123 + "types": int(domain.EvaluationHrbp),
  124 + "limit": 1,
  125 + "cycleId": param.CycleId,
  126 + "status": string(domain.EvaluationUncompleted),
128 }) 127 })
129 if err != nil { 128 if err != nil {
130 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 129 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
@@ -135,7 +134,13 @@ func (srv *SummaryEvaluationService) GetMenu(param *command.QueryMenu) (map[stri @@ -135,7 +134,13 @@ func (srv *SummaryEvaluationService) GetMenu(param *command.QueryMenu) (map[stri
135 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 134 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
136 } 135 }
137 136
138 - //查找当前周期,我的考核结果,人资评估 137 + //查找当前周期,我的考核结果
  138 + _, myEvaluationSuper, err := evaluationRepo.Find(map[string]interface{}{
  139 + "types": int(domain.EvaluationSuper),
  140 + "limit": 1,
  141 + "targetUserId": param.UserId,
  142 + "cycleId": param.CycleId,
  143 + })
139 if err := transactionContext.CommitTransaction(); err != nil { 144 if err := transactionContext.CommitTransaction(); err != nil {
140 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 145 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
141 } 146 }
@@ -170,7 +175,10 @@ func (srv *SummaryEvaluationService) GetMenu(param *command.QueryMenu) (map[stri @@ -170,7 +175,10 @@ func (srv *SummaryEvaluationService) GetMenu(param *command.QueryMenu) (map[stri
170 } else { 175 } else {
171 menu1_1.StatusName = "未完成" 176 menu1_1.StatusName = "未完成"
172 } 177 }
173 - if selfEvaluation[0].CheckResult == domain.EvaluationCheckCompleted { 178 +
  179 + }
  180 + if len(myEvaluationSuper) > 0 {
  181 + if myEvaluationSuper[0].CheckResult == domain.EvaluationCheckCompleted {
174 menu1_2.StatusName = "已完成" 182 menu1_2.StatusName = "已完成"
175 } else { 183 } else {
176 menu1_2.StatusName = "未完成" 184 menu1_2.StatusName = "未完成"