作者 tangxvhui

更新

... ... @@ -10,7 +10,7 @@
"type": "go",
"request": "launch",
"mode": "debug",
"buildFlags": "--tags=local",
"buildFlags": "",
"program": "./main.go"
},
]
... ...
... ... @@ -280,6 +280,9 @@ func (srv StaffAssessServeice) ExportUserAssess(param *query.ListAssessContentCy
level3 := map[string][]string{} // key=分类+得分项类型 val=名称
level4 := map[string]string{} //key=分类+名称 val=评估标准
for _, v := range contentList {
if v.ContentId == 0 {
continue
}
level1Item := ""
for _, v1 := range level1 {
if v.Category == v1 {
... ... @@ -374,6 +377,7 @@ func (srv StaffAssessServeice) ExportUserAssess(param *query.ListAssessContentCy
}
tableRows[v.TargetUserId]["TargetUserName"] = v.TargetUserName
tableRows[v.TargetUserId]["BeginDay"] = v.BeginDay
if v.ContentId > 0 {
value := []string{v.Value}
for _, v2 := range v.Remark {
value = append(value, v2.RemarkText)
... ... @@ -381,6 +385,7 @@ func (srv StaffAssessServeice) ExportUserAssess(param *query.ListAssessContentCy
key := v.Category + "+" + v.ContentName
tableRows[v.TargetUserId][key] = strings.Join(value, "\n")
}
}
//将数据写入xlsx
xlsxFile := excelize.NewFile()
sheetIndex := xlsxFile.GetActiveSheetIndex()
... ...
... ... @@ -326,6 +326,8 @@ func (d *StaffAssessDao) useTStaffAssess(companyId int, cycleId int, userId int,
}
type ExportData1 struct {
AssessId string
ContentId int
TargetUserId string //被评估人的id
TargetUserName string //被评估人的名称
BeginDay string //评估的日期
... ...