作者 tangxvhui

更新

@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 "type": "go", 10 "type": "go",
11 "request": "launch", 11 "request": "launch",
12 "mode": "debug", 12 "mode": "debug",
13 - "buildFlags": "--tags=local", 13 + "buildFlags": "",
14 "program": "./main.go" 14 "program": "./main.go"
15 }, 15 },
16 ] 16 ]
@@ -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()
@@ -326,6 +326,8 @@ func (d *StaffAssessDao) useTStaffAssess(companyId int, cycleId int, userId int, @@ -326,6 +326,8 @@ func (d *StaffAssessDao) useTStaffAssess(companyId int, cycleId int, userId int,
326 } 326 }
327 327
328 type ExportData1 struct { 328 type ExportData1 struct {
  329 + AssessId string
  330 + ContentId int
329 TargetUserId string //被评估人的id 331 TargetUserId string //被评估人的id
330 TargetUserName string //被评估人的名称 332 TargetUserName string //被评估人的名称
331 BeginDay string //评估的日期 333 BeginDay string //评估的日期