From ebe14c5eb181f60f3380ba9389bc170e5c395f6a Mon Sep 17 00:00:00 2001
From: wangzelong <2692854983@qq.com>
Date: 星期三, 30 十一月 2022 17:20:51 +0800
Subject: [PATCH] 报表修改

---
 Application/IStation.Application.DataFile/eta_month_report/PdfCreate/Eta_Month_ReportPdf.cs |   31 +++++++++++++++++++++++++++++--
 1 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/Application/IStation.Application.DataFile/eta_month_report/PdfCreate/Eta_Month_ReportPdf.cs b/Application/IStation.Application.DataFile/eta_month_report/PdfCreate/Eta_Month_ReportPdf.cs
index 5d492b5..c37da1d 100644
--- a/Application/IStation.Application.DataFile/eta_month_report/PdfCreate/Eta_Month_ReportPdf.cs
+++ b/Application/IStation.Application.DataFile/eta_month_report/PdfCreate/Eta_Month_ReportPdf.cs
@@ -5,6 +5,7 @@
 using iTextSharp.text.pdf;
 using iTextSharp.text.rtf.headerfooter;
 using Microsoft.AspNetCore.Http;
+using System;
 using System.Text;
 
 namespace IStation.Application
@@ -15,7 +16,7 @@
     /// </summary>
     public class Eta_Month_ReportPdf
     {
-        #region 灞炴��
+        #region 鎶ヨ〃鐢熸垚
         Document _document;
         PdfWriter _writer;
         //BaseFont _baseFont_general = null;//甯歌瀛椾綋
@@ -40,6 +41,20 @@
         /// <returns></returns>
         public bool Create4Stream(Station station, Model.EtaSumMultiMonthRecord sum, List<Model.PipeLine> pipeList, List<Model.EtaSumSingleMonthRecord> list, string datatime,long corpID, string path)
         {
+            if (station == null)
+                return false;
+            if (pipeList == null || pipeList.Count < 1)
+                return false;
+            if (sum == null)
+                return false;
+            if (list == null || list.Count < 1)
+                return false;
+            if (corpID < 1)
+                return false;
+            if (string.IsNullOrEmpty(datatime))
+                return false;
+            if (path =="")
+                return false;
             InitialFont();
             //鍒濆鍖栨爣棰樹腑鐨凩OGO鍥剧墖
             InitialTitleLogoImage();
@@ -132,6 +147,18 @@
         /// <param name="dateTime"></param>
         public void CreatestationInfoPage(Station station, List<Model.PipeLine> pipeList, Model.EtaSumMultiMonthRecord sum, List<Model.EtaSumSingleMonthRecord> list,long corpID, string dateTime)
         {
+            if (station == null)
+                return;
+            if (pipeList == null || pipeList.Count < 1)
+                return;
+            if (sum == null)
+                return;
+            if (list == null||list.Count<1)
+                return;
+            if (corpID<1)
+                return;
+            if (string.IsNullOrEmpty(dateTime))
+                return;
             _document.Open();
             _document.NewPage();
             _currentPage++;
@@ -731,5 +758,5 @@
             return datetime.AddDays(1 - datetime.Day).AddMonths(1).AddDays(-1);
         }
     }
+    #endregion
 }
-#endregion
\ No newline at end of file

--
Gitblit v1.9.3