From e646950cee8a90926f837dbdb0af8cb1bf7e21b9 Mon Sep 17 00:00:00 2001
From: wangzelong <2692854983@qq.com>
Date: 星期四, 15 九月 2022 17:16:46 +0800
Subject: [PATCH] 报表-月(暂时)

---
 Application/IStation.Application.DataFile/Report/PdfCreate/Eta_Month_ReportPdf.cs |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/Application/IStation.Application.DataFile/Report/PdfCreate/ReportPdf4Default.cs b/Application/IStation.Application.DataFile/Report/PdfCreate/Eta_Month_ReportPdf.cs
similarity index 96%
copy from Application/IStation.Application.DataFile/Report/PdfCreate/ReportPdf4Default.cs
copy to Application/IStation.Application.DataFile/Report/PdfCreate/Eta_Month_ReportPdf.cs
index 596930c..d1d7261 100644
--- a/Application/IStation.Application.DataFile/Report/PdfCreate/ReportPdf4Default.cs
+++ b/Application/IStation.Application.DataFile/Report/PdfCreate/Eta_Month_ReportPdf.cs
@@ -13,7 +13,7 @@
     /// <summary>
     /// 
     /// </summary>
-    public class ReportPdf4Default
+    public class Eta_Month_ReportPdf
     {
         #region 灞炴��
         Document _document;
@@ -36,7 +36,7 @@
         /// <param name="list">鏈烘车淇℃伅鍒楄〃</param>
         /// <param name="path">璺緞</param>
         /// <returns></returns>
-        public bool Create4Stream(Station station, List<Model.PipeLine> pipeList, List<EtaSumSingleDayRecord> list, DateTime datatime, string path)
+        public bool Create4Stream(Station station, List<Model.PipeLine> pipeList, List<Model.EtaSumSingleMonthRecord> list,string path)
         {
             InitialFont();
             //鍒濆鍖栨爣棰樹腑鐨凩OGO鍥剧墖
@@ -47,7 +47,7 @@
             _document.SetMargins(-40, -40, 40, 40);
             _writer = PdfWriter.GetInstance(_document, new FileStream(path, FileMode.Create));
             _writer.PageEvent = new CreatHeaderAndFoot();
-            CreatestationInfoPage(station, pipeList, list, datatime);//浜у搧淇℃伅
+            CreatestationInfoPage(station, pipeList, list);//浜у搧淇℃伅
             _document.Close();
             return true;
         }
@@ -123,7 +123,7 @@
         /// <param name="sum"></param>
         /// <param name="pipeList"></param>
         /// <param name="list"></param>
-        public void CreatestationInfoPage(Station station, List<Model.PipeLine> pipeList, List<EtaSumSingleDayRecord> list, DateTime dateTime)
+        public void CreatestationInfoPage(Station station, List<Model.PipeLine> pipeList, List<Model.EtaSumSingleMonthRecord> list)
         {
             _document.Open();
             _document.NewPage();
@@ -155,7 +155,7 @@
                 Dt = Math.Round((double)dt, 2).ToString();
             if (dt > 1000)
                 Dt = Math.Round((double)dt, 1).ToString();
-            CreatestationTable(station, runcout, dateTime, Qt, Dt);
+            CreatestationTable(station, runcout, Qt, Dt);
             CreatestationInfoTable(pipeList, list, station.ID);
             PdfPTable table1 = new PdfPTable(3);
             float[] widths = { 80, 140, 300 };
@@ -291,7 +291,7 @@
         /// 璁惧淇℃伅
         /// </summary>
         //
-        public void CreatestationTable(Station station, int cout, DateTime datatime, string qt, string dt)
+        public void CreatestationTable(Station station, int cout, string qt, string dt)
         {
             PdfPTable table = new PdfPTable(4);
             PdfPCell cell = new PdfPCell();
@@ -317,7 +317,7 @@
             table.AddCell(cell);
             cell = CreateCell2("鎶ュ憡鏃ユ湡", _fontSize11, 1, 1, 40, 0, Element.ALIGN_CENTER);
             table.AddCell(cell);
-            cell = CreateCell2(datatime.ToShortDateString(), _fontSize11, 1, 1, 40, 0, Element.ALIGN_CENTER);
+            cell = CreateCell2("", _fontSize11, 1, 1, 40, 0, Element.ALIGN_CENTER);
             table.AddCell(cell);
             cell = CreateCell2("浣跨敤鐘舵��", _fontSize11, 1, 1, 40, 0, Element.ALIGN_CENTER);
             table.AddCell(cell);
@@ -340,7 +340,7 @@
         /// 鐢熸垚鏈烘车鍒楄〃
         /// </summary>
         /// <param name="list">鏈烘车鍒楄〃</param>
-        public void CreatestationInfoTable(List<Model.PipeLine> pipeList, List<EtaSumSingleDayRecord> list, long stationID)
+        public void CreatestationInfoTable(List<Model.PipeLine> pipeList, List<Model.EtaSumSingleMonthRecord> list, long stationID)
         {
 
             PdfPTable table = new PdfPTable(5);
@@ -349,12 +349,13 @@
             var ProductList = new Service.Product().GetByCorpID(list.FirstOrDefault().CorpID);
             cell = CreateCell2("鑳芥晥淇℃伅", _fontSize11, 5, 1, 40, 0, Element.ALIGN_CENTER);
             table.AddCell(cell);
+            var seviceEnginePump = new Service.Product();
             foreach (var item in list)
             {
                 var EnginePumpLine = pipeList?.Find(x => x.ID == item.ObjectID);
                 var EnginePump = ProductList.Find(x => x.BelongID == stationID && x.Name == EnginePumpLine.Name);
-                var Pump = new Service.Product().GetChildPumpByEnginePumpID(EnginePump.CorpID, EnginePump.ID);
-                var Motor = new Service.Product().GetChildMotorByEnginePumpID(EnginePump.CorpID, EnginePump.ID);
+                var Pump = seviceEnginePump.GetChildPumpByEnginePumpID(EnginePump.CorpID, EnginePump.ID);
+                var Motor = seviceEnginePump.GetChildMotorByEnginePumpID(EnginePump.CorpID, EnginePump.ID);
 
                 cell = CreateCell2(EnginePump?.Name, _fontSize11, 1, 4, 40, 0, Element.ALIGN_CENTER);
                 table.AddCell(cell);

--
Gitblit v1.9.3