소스 검색

英文研报PDF

kobe6258 6 일 전
부모
커밋
53a74e6aa0
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      services/smart_report.go

+ 4 - 2
services/smart_report.go

@@ -338,8 +338,10 @@ func Report2pdfAndJpeg(reportUrl string, reportId, reportType int) {
 	go func() {
 		width := 1200
 		top, bottom, left, right := 20, 20, 20, 20
-		if report.ReportLayout == 3 {
-			top, bottom, left, right = 0, 0, 0, 0
+		if reportType == 1 {
+			if report != nil && report.ReportLayout == 3 {
+				top, bottom, left, right = 0, 0, 0, 0
+			}
 		}
 		err := ReportToPdf(width, reportUrl, pdfPath, top, bottom, left, right)
 		if err != nil {