作者 tangxvhui

修复一些问题

... ... @@ -242,11 +242,23 @@ func (srv StaffAssessServeice) CreateStaffAssessTask(transactionContext applicat
assassessTaskList[0].ExecutorId = executorIds
//更新步骤
assassessTaskList[0].StepList = append(assassessTaskList[0].StepList, assessTaskData.StepList...)
for _, val := range assessTaskData.StepList {
hasFound := false
for _, val2 := range assassessTaskList[0].StepList {
if val.LinkNodeType == val2.LinkNodeType {
hasFound = true
break
}
}
if !hasFound {
assassessTaskList[0].StepList = append(assassessTaskList[0].StepList, val)
}
}
assessTaskData = assassessTaskList[0]
//排序流程环节
stepList := domain.SortTaskStep(assessTaskData.StepList)
sort.Sort(stepList)
}
stepList := domain.SortTaskStep(assessTaskData.StepList)
sort.Sort(stepList)
_, err = assessTaskRepo.Save(assessTaskData)
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "保存评估任务"+err.Error())
... ...
... ... @@ -2,6 +2,7 @@ package service
import (
"fmt"
"sort"
"strconv"
"github.com/linmadan/egglib-go/core/application"
... ... @@ -223,6 +224,10 @@ func (srv StaffAssessServeice) AssessTaskDescV2(param *query.AssessTaskDescV2Que
}
result.StepList = append(result.StepList, stepItem)
}
//排序评估阶段
sort.Slice(result.StepList, func(i, j int) bool {
return result.StepList[i].SortBy < result.StepList[j].SortBy
})
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
... ...
... ... @@ -149,10 +149,10 @@ func (srv *SummaryEvaluationService) ExportAllEvaluationFinish(param *command.Qu
tableHead = append(tableHead, ratingHeader...)
if len(evaluationList) > 0 {
xlsxFile.SetSheetRow(firstSheetName, "A1", &[]string{evaluationList[0].CycleName + "最终成绩"})
// if len(tableHead) > 1 {
// cellCode, _ := excelize.ColumnNumberToName(len(tableHead))
// xlsxFile.MergeCell(firstSheetName, "A1", cellCode+"1")
// }
if len(tableHead) > 1 {
cellCode, _ := excelize.ColumnNumberToName(len(tableHead))
xlsxFile.MergeCell(firstSheetName, "A1", cellCode+"1")
}
}
xlsxFile.SetSheetRow(firstSheetName, "A2", &tableHead)
firstDataRow := 3
... ...