作者 tangxvhui

Merge branch 'master' into 1.2.4

@@ -2,11 +2,12 @@ package service @@ -2,11 +2,12 @@ package service
2 2
3 import ( 3 import (
4 "fmt" 4 "fmt"
5 - service "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/role"  
6 "sort" 5 "sort"
7 "strconv" 6 "strconv"
8 "time" 7 "time"
9 8
  9 + service "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/role"
  10 +
10 "github.com/linmadan/egglib-go/core/application" 11 "github.com/linmadan/egglib-go/core/application"
11 "github.com/linmadan/egglib-go/utils/tool_funs" 12 "github.com/linmadan/egglib-go/utils/tool_funs"
12 "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/factory" 13 "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/factory"
@@ -373,7 +374,7 @@ func (srv StaffAssessServeice) createStaffAssessSelf( @@ -373,7 +374,7 @@ func (srv StaffAssessServeice) createStaffAssessSelf(
373 assessRepo := factory.CreateStaffAssessRepository(map[string]interface{}{ 374 assessRepo := factory.CreateStaffAssessRepository(map[string]interface{}{
374 "transactionContext": transactionContext, 375 "transactionContext": transactionContext,
375 }) 376 })
376 - beginDay := assessTemp.BeginTime.Format("2006-01-02") 377 + beginDay := assessTemp.BeginTime.Local().Format("2006-01-02")
377 _, assessListOld, err := assessRepo.Find(map[string]interface{}{"cycleId": assessTemp.CycleId, "beginDay": beginDay, "types": domain.AssessSelf}) 378 _, assessListOld, err := assessRepo.Find(map[string]interface{}{"cycleId": assessTemp.CycleId, "beginDay": beginDay, "types": domain.AssessSelf})
378 if err != nil { 379 if err != nil {
379 return nil, err 380 return nil, err
@@ -419,7 +420,7 @@ func (srv StaffAssessServeice) createStaffAssessSupper( @@ -419,7 +420,7 @@ func (srv StaffAssessServeice) createStaffAssessSupper(
419 assessRepo := factory.CreateStaffAssessRepository(map[string]interface{}{ 420 assessRepo := factory.CreateStaffAssessRepository(map[string]interface{}{
420 "transactionContext": transactionContext, 421 "transactionContext": transactionContext,
421 }) 422 })
422 - beginDay := assessTemp.BeginTime.Format("2006-01-02") 423 + beginDay := assessTemp.BeginTime.Local().Format("2006-01-02")
423 _, assessListOld, err := assessRepo.Find(map[string]interface{}{"cycleId": assessTemp.CycleId, "beginDay": beginDay, "types": domain.AssessSuper}) 424 _, assessListOld, err := assessRepo.Find(map[string]interface{}{"cycleId": assessTemp.CycleId, "beginDay": beginDay, "types": domain.AssessSuper})
424 if err != nil { 425 if err != nil {
425 return nil, err 426 return nil, err
@@ -343,7 +343,7 @@ func (srv *SummaryEvaluationService) buildSummaryItemValue(itemList []*domain.Ev @@ -343,7 +343,7 @@ func (srv *SummaryEvaluationService) buildSummaryItemValue(itemList []*domain.Ev
343 Category: v.Category, 343 Category: v.Category,
344 Name: v.Name, 344 Name: v.Name,
345 PromptTitle: v.PromptTitle, 345 PromptTitle: v.PromptTitle,
346 - PromptText: "", 346 + PromptText: v.PromptText,
347 EntryItems: v.EntryItems, 347 EntryItems: v.EntryItems,
348 RuleType: v.RuleType, 348 RuleType: v.RuleType,
349 Rule: v.Rule, 349 Rule: v.Rule,
@@ -354,14 +354,6 @@ func (srv *SummaryEvaluationService) buildSummaryItemValue(itemList []*domain.Ev @@ -354,14 +354,6 @@ func (srv *SummaryEvaluationService) buildSummaryItemValue(itemList []*domain.Ev
354 Remark: "", 354 Remark: "",
355 EvaluatorId: v.EvaluatorId, 355 EvaluatorId: v.EvaluatorId,
356 } 356 }
357 - //PromptText 页面展示 特殊处理  
358 - // if len(v.EntryItems) > 0 {  
359 -  
360 - for _, v2 := range v.EntryItems {  
361 - item.PromptText += v2.Title + "\n"  
362 - }  
363 - item.PromptText += v.PromptText  
364 - // }  
365 value, ok := valueMap[v.Id] 357 value, ok := valueMap[v.Id]
366 if ok { 358 if ok {
367 item.Score = value.Score 359 item.Score = value.Score
@@ -1398,7 +1390,7 @@ func (srv *SummaryEvaluationService) ListExecutorEvaluationSuper(param *command. @@ -1398,7 +1390,7 @@ func (srv *SummaryEvaluationService) ListExecutorEvaluationSuper(param *command.
1398 TargetUserName: v.TargetUser.UserName, 1390 TargetUserName: v.TargetUser.UserName,
1399 TargetUserId: v.TargetUser.UserId, 1391 TargetUserId: v.TargetUser.UserId,
1400 EvaluationStatus: string(v.Status), 1392 EvaluationStatus: string(v.Status),
1401 - EndTime: v.EndTime.Format("2006-01-02 15:04:05"), 1393 + EndTime: v.EndTime.Local().Format("2006-01-02 15:04:05"),
1402 TotalScoreSelf: "", 1394 TotalScoreSelf: "",
1403 Department: "", 1395 Department: "",
1404 Position: "", 1396 Position: "",
@@ -1428,7 +1420,7 @@ func (srv *SummaryEvaluationService) ListExecutorEvaluationSuper(param *command. @@ -1428,7 +1420,7 @@ func (srv *SummaryEvaluationService) ListExecutorEvaluationSuper(param *command.
1428 result["endTime"] = "" 1420 result["endTime"] = ""
1429 result["uncompleted_number"] = 0 1421 result["uncompleted_number"] = 0
1430 if len(evaluationList) > 0 { 1422 if len(evaluationList) > 0 {
1431 - result["endTime"] = evaluationList[0].EndTime.Format("2006-01-02 15:04:05") 1423 + result["endTime"] = evaluationList[0].EndTime.Local().Format("2006-01-02 15:04:05")
1432 result["uncompleted_number"] = cntUn 1424 result["uncompleted_number"] = cntUn
1433 } 1425 }
1434 return result, nil 1426 return result, nil
@@ -1453,6 +1445,7 @@ func (srv *SummaryEvaluationService) ConfirmScoreEvaluation(param *command.Confi @@ -1453,6 +1445,7 @@ func (srv *SummaryEvaluationService) ConfirmScoreEvaluation(param *command.Confi
1453 if err != nil { 1445 if err != nil {
1454 return application.ThrowError(application.TRANSACTION_ERROR, err.Error()) 1446 return application.ThrowError(application.TRANSACTION_ERROR, err.Error())
1455 } 1447 }
  1448 +
1456 if result.Types != domain.EvaluationFinish { 1449 if result.Types != domain.EvaluationFinish {
1457 return application.ThrowError(application.TRANSACTION_ERROR, "操作方式错误") 1450 return application.ThrowError(application.TRANSACTION_ERROR, "操作方式错误")
1458 } 1451 }
@@ -1808,10 +1801,9 @@ func (srv *SummaryEvaluationService) ListAllEvaluationFinish(param *command.Quer @@ -1808,10 +1801,9 @@ func (srv *SummaryEvaluationService) ListAllEvaluationFinish(param *command.Quer
1808 1801
1809 //获取评估列表信息 1802 //获取评估列表信息
1810 condition1 := map[string]interface{}{ 1803 condition1 := map[string]interface{}{
1811 - "cycleId": param.CycleId,  
1812 - "types": int(domain.EvaluationFinish),  
1813 - "limit": limit,  
1814 - "beginTime": time.Now(), 1804 + "cycleId": param.CycleId,
  1805 + "types": int(domain.EvaluationFinish),
  1806 + "limit": limit,
1815 } 1807 }
1816 if offset > 0 { 1808 if offset > 0 {
1817 condition1["offset"] = offset 1809 condition1["offset"] = offset
@@ -171,6 +171,7 @@ func (d *SummaryEvaluationDao) ListEvaluationFinishNoResult() ([]SummaryEvaluati @@ -171,6 +171,7 @@ func (d *SummaryEvaluationDao) ListEvaluationFinishNoResult() ([]SummaryEvaluati
171 and summary_evaluation.status ='completed' 171 and summary_evaluation.status ='completed'
172 and summary_evaluation.check_result ='uncompleted' 172 and summary_evaluation.check_result ='uncompleted'
173 and summary_evaluation.end_time <=now() 173 and summary_evaluation.end_time <=now()
  174 + and summary_evaluation.deleted_at isnull
174 ` 175 `
175 result := []SummaryEvaluationData1{} 176 result := []SummaryEvaluationData1{}
176 tx := d.transactionContext.PgTx 177 tx := d.transactionContext.PgTx