导出问题,修改了合并单元格
This commit is contained in:
parent
355706b83d
commit
97ada2d27f
@ -1,7 +1,6 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/gin-gonic/gin"
|
||||
"hospital-admin-api/api/dao"
|
||||
"hospital-admin-api/api/model"
|
||||
@ -475,9 +474,6 @@ func (r *Export) OrderProduct(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
jsonStr, err := json.Marshal(orderProducts)
|
||||
utils.LogJsonInfo("打印", string(jsonStr))
|
||||
|
||||
// 业务处理
|
||||
exportService := service.ExportService{}
|
||||
ossAddress, err := exportService.OrderProduct(orderProducts)
|
||||
|
||||
@ -274,7 +274,13 @@ func fillDataWithMerge(f *excelize.File, sheetName string, header []HeaderCellDa
|
||||
// 设置单元格样式
|
||||
for i := 0; i < filedNumSlice; i++ {
|
||||
axis = s + fmt.Sprintf("%d", row+i+1)
|
||||
err := setCellStyle(f, sheetName, axis, header[row+i], alignment)
|
||||
|
||||
column, err := excelize.ColumnNameToNumber(s)
|
||||
if err != nil {
|
||||
return row, err
|
||||
}
|
||||
|
||||
err = setCellStyle(f, sheetName, axis, header[column-1], alignment)
|
||||
if err != nil {
|
||||
return row, err
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user