Compare commits
No commits in common. "ab3651b64519a201709d3f25c6a53dc3c384f058" and "82ac689a5aa8775b82108ca1a5e7f98423f9e9da" have entirely different histories.
ab3651b645
...
82ac689a5a
@ -149,11 +149,15 @@ func SaveRegister(c *gin.Context) {
|
||||
func ExportRegister(c *gin.Context) {
|
||||
var exportRecordReq exhibition.ExportRecordReq
|
||||
|
||||
fmt.Println("=======================进入导出============================")
|
||||
|
||||
resp, err := GrpcExhibitionClientImpl.ExportRegisterRecord(context.Background(), &exportRecordReq)
|
||||
if err != nil {
|
||||
response.ResponseQuickMsg(c, msg.Fail, err.Error(), nil)
|
||||
return
|
||||
}
|
||||
fmt.Println("=======================查出列表============================")
|
||||
fmt.Println(resp)
|
||||
|
||||
if len(resp.Data) == 0 {
|
||||
resp.Data = []*exhibition.ExportInfo{}
|
||||
@ -181,13 +185,19 @@ func ExportRegister(c *gin.Context) {
|
||||
temp = append(temp, v.UpdatedAt)
|
||||
data = append(data, &temp)
|
||||
}
|
||||
fmt.Println("=======================组装完数据============================")
|
||||
fmt.Println(columns)
|
||||
fmt.Println("=======================转换成excel============================")
|
||||
_, _ = utils.ToExcelByType(columns, data, "slice", filePath)
|
||||
//处理图片
|
||||
fmt.Println("=======================转换成excel============================")
|
||||
fmt.Println("=======================处理图片============================")
|
||||
err = logic.DealExcelImg(filePath)
|
||||
if err != nil {
|
||||
response.ResponseQuickMsg(c, msg.Fail, err.Error(), nil)
|
||||
return
|
||||
}
|
||||
fmt.Println("=======================处理图片============================")
|
||||
var httpType string
|
||||
if config.Data.System.IsHttps {
|
||||
httpType = model.HttpsType
|
||||
@ -195,12 +205,13 @@ func ExportRegister(c *gin.Context) {
|
||||
httpType = model.HttpType
|
||||
}
|
||||
var exportUrl string
|
||||
exportUrl = fmt.Sprintf("%s%s/api/static/%s", httpType, c.Request.Host, exportFileName)
|
||||
exportUrl = fmt.Sprintf("%s%s/static/%s", httpType, c.Request.Host, exportFileName)
|
||||
fmt.Println("=======================结束URL============================")
|
||||
fmt.Println(exportUrl)
|
||||
response.ResponseQuickMsg(c, msg.Ok, resp.Msg, map[string]string{
|
||||
"exportUrl": exportUrl,
|
||||
})
|
||||
return
|
||||
|
||||
}
|
||||
|
||||
func OcrBase64(c *gin.Context) {
|
||||
|
Loading…
Reference in New Issue
Block a user