Merge branch 'wp' into dev

# Conflicts:
#	pkg/service/register_record.go
dev
workabee 2 weeks ago
commit ab3651b645

@ -149,15 +149,11 @@ 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{}
@ -185,19 +181,13 @@ 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
@ -205,13 +195,12 @@ func ExportRegister(c *gin.Context) {
httpType = model.HttpType
}
var exportUrl string
exportUrl = fmt.Sprintf("%s%s/static/%s", httpType, c.Request.Host, exportFileName)
fmt.Println("=======================结束URL============================")
fmt.Println(exportUrl)
exportUrl = fmt.Sprintf("%s%s/api/static/%s", httpType, c.Request.Host, exportFileName)
response.ResponseQuickMsg(c, msg.Ok, resp.Msg, map[string]string{
"exportUrl": exportUrl,
})
return
}
func OcrBase64(c *gin.Context) {

Loading…
Cancel
Save