|
@@ -280,6 +280,9 @@ func (srv StaffAssessServeice) ExportUserAssess(param *query.ListAssessContentCy |
|
@@ -280,6 +280,9 @@ func (srv StaffAssessServeice) ExportUserAssess(param *query.ListAssessContentCy |
280
|
level3 := map[string][]string{} // key=分类+得分项类型 val=名称
|
280
|
level3 := map[string][]string{} // key=分类+得分项类型 val=名称
|
281
|
level4 := map[string]string{} //key=分类+名称 val=评估标准
|
281
|
level4 := map[string]string{} //key=分类+名称 val=评估标准
|
282
|
for _, v := range contentList {
|
282
|
for _, v := range contentList {
|
|
|
283
|
+ if v.ContentId == 0 {
|
|
|
284
|
+ continue
|
|
|
285
|
+ }
|
283
|
level1Item := ""
|
286
|
level1Item := ""
|
284
|
for _, v1 := range level1 {
|
287
|
for _, v1 := range level1 {
|
285
|
if v.Category == v1 {
|
288
|
if v.Category == v1 {
|
|
@@ -374,6 +377,7 @@ func (srv StaffAssessServeice) ExportUserAssess(param *query.ListAssessContentCy |
|
@@ -374,6 +377,7 @@ func (srv StaffAssessServeice) ExportUserAssess(param *query.ListAssessContentCy |
374
|
}
|
377
|
}
|
375
|
tableRows[v.TargetUserId]["TargetUserName"] = v.TargetUserName
|
378
|
tableRows[v.TargetUserId]["TargetUserName"] = v.TargetUserName
|
376
|
tableRows[v.TargetUserId]["BeginDay"] = v.BeginDay
|
379
|
tableRows[v.TargetUserId]["BeginDay"] = v.BeginDay
|
|
|
380
|
+ if v.ContentId > 0 {
|
377
|
value := []string{v.Value}
|
381
|
value := []string{v.Value}
|
378
|
for _, v2 := range v.Remark {
|
382
|
for _, v2 := range v.Remark {
|
379
|
value = append(value, v2.RemarkText)
|
383
|
value = append(value, v2.RemarkText)
|
|
@@ -381,6 +385,7 @@ func (srv StaffAssessServeice) ExportUserAssess(param *query.ListAssessContentCy |
|
@@ -381,6 +385,7 @@ func (srv StaffAssessServeice) ExportUserAssess(param *query.ListAssessContentCy |
381
|
key := v.Category + "+" + v.ContentName
|
385
|
key := v.Category + "+" + v.ContentName
|
382
|
tableRows[v.TargetUserId][key] = strings.Join(value, "\n")
|
386
|
tableRows[v.TargetUserId][key] = strings.Join(value, "\n")
|
383
|
}
|
387
|
}
|
|
|
388
|
+ }
|
384
|
//将数据写入xlsx
|
389
|
//将数据写入xlsx
|
385
|
xlsxFile := excelize.NewFile()
|
390
|
xlsxFile := excelize.NewFile()
|
386
|
sheetIndex := xlsxFile.GetActiveSheetIndex()
|
391
|
sheetIndex := xlsxFile.GetActiveSheetIndex()
|