作者 tangxvhui

Merge branch 'master' into 1.2.4

... ... @@ -2,11 +2,12 @@ package service
import (
"fmt"
service "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/role"
"sort"
"strconv"
"time"
service "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/role"
"github.com/linmadan/egglib-go/core/application"
"github.com/linmadan/egglib-go/utils/tool_funs"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/factory"
... ... @@ -373,7 +374,7 @@ func (srv StaffAssessServeice) createStaffAssessSelf(
assessRepo := factory.CreateStaffAssessRepository(map[string]interface{}{
"transactionContext": transactionContext,
})
beginDay := assessTemp.BeginTime.Format("2006-01-02")
beginDay := assessTemp.BeginTime.Local().Format("2006-01-02")
_, assessListOld, err := assessRepo.Find(map[string]interface{}{"cycleId": assessTemp.CycleId, "beginDay": beginDay, "types": domain.AssessSelf})
if err != nil {
return nil, err
... ... @@ -419,7 +420,7 @@ func (srv StaffAssessServeice) createStaffAssessSupper(
assessRepo := factory.CreateStaffAssessRepository(map[string]interface{}{
"transactionContext": transactionContext,
})
beginDay := assessTemp.BeginTime.Format("2006-01-02")
beginDay := assessTemp.BeginTime.Local().Format("2006-01-02")
_, assessListOld, err := assessRepo.Find(map[string]interface{}{"cycleId": assessTemp.CycleId, "beginDay": beginDay, "types": domain.AssessSuper})
if err != nil {
return nil, err
... ...
... ... @@ -343,7 +343,7 @@ func (srv *SummaryEvaluationService) buildSummaryItemValue(itemList []*domain.Ev
Category: v.Category,
Name: v.Name,
PromptTitle: v.PromptTitle,
PromptText: "",
PromptText: v.PromptText,
EntryItems: v.EntryItems,
RuleType: v.RuleType,
Rule: v.Rule,
... ... @@ -354,14 +354,6 @@ func (srv *SummaryEvaluationService) buildSummaryItemValue(itemList []*domain.Ev
Remark: "",
EvaluatorId: v.EvaluatorId,
}
//PromptText 页面展示 特殊处理
// if len(v.EntryItems) > 0 {
for _, v2 := range v.EntryItems {
item.PromptText += v2.Title + "\n"
}
item.PromptText += v.PromptText
// }
value, ok := valueMap[v.Id]
if ok {
item.Score = value.Score
... ... @@ -1398,7 +1390,7 @@ func (srv *SummaryEvaluationService) ListExecutorEvaluationSuper(param *command.
TargetUserName: v.TargetUser.UserName,
TargetUserId: v.TargetUser.UserId,
EvaluationStatus: string(v.Status),
EndTime: v.EndTime.Format("2006-01-02 15:04:05"),
EndTime: v.EndTime.Local().Format("2006-01-02 15:04:05"),
TotalScoreSelf: "",
Department: "",
Position: "",
... ... @@ -1428,7 +1420,7 @@ func (srv *SummaryEvaluationService) ListExecutorEvaluationSuper(param *command.
result["endTime"] = ""
result["uncompleted_number"] = 0
if len(evaluationList) > 0 {
result["endTime"] = evaluationList[0].EndTime.Format("2006-01-02 15:04:05")
result["endTime"] = evaluationList[0].EndTime.Local().Format("2006-01-02 15:04:05")
result["uncompleted_number"] = cntUn
}
return result, nil
... ... @@ -1453,6 +1445,7 @@ func (srv *SummaryEvaluationService) ConfirmScoreEvaluation(param *command.Confi
if err != nil {
return application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
if result.Types != domain.EvaluationFinish {
return application.ThrowError(application.TRANSACTION_ERROR, "操作方式错误")
}
... ... @@ -1808,10 +1801,9 @@ func (srv *SummaryEvaluationService) ListAllEvaluationFinish(param *command.Quer
//获取评估列表信息
condition1 := map[string]interface{}{
"cycleId": param.CycleId,
"types": int(domain.EvaluationFinish),
"limit": limit,
"beginTime": time.Now(),
"cycleId": param.CycleId,
"types": int(domain.EvaluationFinish),
"limit": limit,
}
if offset > 0 {
condition1["offset"] = offset
... ...
... ... @@ -171,6 +171,7 @@ func (d *SummaryEvaluationDao) ListEvaluationFinishNoResult() ([]SummaryEvaluati
and summary_evaluation.status ='completed'
and summary_evaluation.check_result ='uncompleted'
and summary_evaluation.end_time <=now()
and summary_evaluation.deleted_at isnull
`
result := []SummaryEvaluationData1{}
tx := d.transactionContext.PgTx
... ...