作者 tangxvhui

修复 时间格式化时区错误

... ... @@ -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
... ...
... ... @@ -1390,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: "",
... ... @@ -1420,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
... ...