正在显示
1 个修改的文件
包含
10 行增加
和
2 行删除
@@ -147,7 +147,15 @@ func (srv *SummaryEvaluationService) ExportAllEvaluationFinish(param *command.Qu | @@ -147,7 +147,15 @@ func (srv *SummaryEvaluationService) ExportAllEvaluationFinish(param *command.Qu | ||
147 | firstSheetName := xlsxFile.GetSheetName(sheetIndex) | 147 | firstSheetName := xlsxFile.GetSheetName(sheetIndex) |
148 | tableHead := []string{"姓名", "部门", "职位", "最终绩效得分"} | 148 | tableHead := []string{"姓名", "部门", "职位", "最终绩效得分"} |
149 | tableHead = append(tableHead, ratingHeader...) | 149 | tableHead = append(tableHead, ratingHeader...) |
150 | - xlsxFile.SetSheetRow(firstSheetName, "A1", &tableHead) | 150 | + if len(evaluationList) > 0 { |
151 | + xlsxFile.SetSheetRow(firstSheetName, "A1", []string{evaluationList[0].CycleName + "最终成绩"}) | ||
152 | + // if len(tableHead) > 1 { | ||
153 | + // cellCode, _ := excelize.ColumnNumberToName(len(tableHead)) | ||
154 | + // xlsxFile.MergeCell(firstSheetName, "A1", cellCode+"1") | ||
155 | + // } | ||
156 | + } | ||
157 | + xlsxFile.SetSheetRow(firstSheetName, "A2", &tableHead) | ||
158 | + firstDataRow := 3 | ||
151 | for i, v := range evaluationList { | 159 | for i, v := range evaluationList { |
152 | departmentName := "" | 160 | departmentName := "" |
153 | for _, dep := range v.TargetDepartment { | 161 | for _, dep := range v.TargetDepartment { |
@@ -176,7 +184,7 @@ func (srv *SummaryEvaluationService) ExportAllEvaluationFinish(param *command.Qu | @@ -176,7 +184,7 @@ func (srv *SummaryEvaluationService) ExportAllEvaluationFinish(param *command.Qu | ||
176 | dataRaw = append(dataRaw, "0") | 184 | dataRaw = append(dataRaw, "0") |
177 | } | 185 | } |
178 | } | 186 | } |
179 | - xlsxFile.SetSheetRow(firstSheetName, fmt.Sprintf("A%d", i+2), &dataRaw) | 187 | + xlsxFile.SetSheetRow(firstSheetName, fmt.Sprintf("A%d", i+firstDataRow), &dataRaw) |
180 | } | 188 | } |
181 | return xlsxFile, nil | 189 | return xlsxFile, nil |
182 | } | 190 | } |
-
请 注册 或 登录 后发表评论