...
|
...
|
@@ -2,6 +2,7 @@ package service |
|
|
|
|
|
import (
|
|
|
"fmt"
|
|
|
"strconv"
|
|
|
"strings"
|
|
|
|
|
|
"github.com/linmadan/egglib-go/core/application"
|
...
|
...
|
@@ -382,7 +383,7 @@ func (srv StaffAssessServeice) ExportUserAssess(param *query.ListAssessContentCy |
|
|
xlsxFile := excelize.NewFile()
|
|
|
sheetIndex := xlsxFile.GetActiveSheetIndex()
|
|
|
sheetName := xlsxFile.GetSheetName(sheetIndex)
|
|
|
// 写入第一行
|
|
|
//写入第一行
|
|
|
xlsxFile.SetCellStr(sheetName, "A1", "每日绩效汇总")
|
|
|
//写入二到五行
|
|
|
for k, v := range headerList {
|
...
|
...
|
@@ -393,5 +394,25 @@ func (srv StaffAssessServeice) ExportUserAssess(param *query.ListAssessContentCy |
|
|
xlsxFile.SetCellStr(sheetName, colName+"5", v.Level4)
|
|
|
}
|
|
|
//从第六行开始写入用户填写的评估数据
|
|
|
for k, v := range tableRowSort {
|
|
|
rowNum := strconv.Itoa(k + 6)
|
|
|
row := tableRows[v]
|
|
|
for k2, v2 := range headerList {
|
|
|
if k2 == 0 {
|
|
|
xlsxFile.SetCellStr(sheetName, "A"+rowNum, row["BeginDay"])
|
|
|
continue
|
|
|
}
|
|
|
if k2 == 1 {
|
|
|
xlsxFile.SetCellStr(sheetName, "B"+rowNum, row["TargetUserName"])
|
|
|
continue
|
|
|
}
|
|
|
colName, _ := excelize.ColumnNumberToName(k2 + 1)
|
|
|
key := v2.Level1 + "+" + v2.Level3
|
|
|
if mVal, ok := row[key]; ok {
|
|
|
xlsxFile.SetCellStr(sheetName, colName+rowNum, mVal)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return nil, nil
|
|
|
} |
...
|
...
|
|