作者 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,12 +377,14 @@ func (srv StaffAssessServeice) ExportUserAssess(param *query.ListAssessContentCy
}
tableRows[v.TargetUserId]["TargetUserName"] = v.TargetUserName
tableRows[v.TargetUserId]["BeginDay"] = v.BeginDay
value := []string{v.Value}
for _, v2 := range v.Remark {
value = append(value, v2.RemarkText)
if v.ContentId > 0 {
value := []string{v.Value}
for _, v2 := range v.Remark {
value = append(value, v2.RemarkText)
}
key := v.Category + "+" + v.ContentName
tableRows[v.TargetUserId][key] = strings.Join(value, "\n")
}
key := v.Category + "+" + v.ContentName
tableRows[v.TargetUserId][key] = strings.Join(value, "\n")
}
//将数据写入xlsx
xlsxFile := excelize.NewFile()
... ...
... ... @@ -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 //评估的日期
... ...