wangzelong
2022-09-15 e646950cee8a90926f837dbdb0af8cb1bf7e21b9
Application/IStation.Application.DataFile/Report/PdfCreate/Eta_Month_ReportPdf.cs
copy from Application/IStation.Application.DataFile/Report/PdfCreate/ReportPdf4Default.cs copy to Application/IStation.Application.DataFile/Report/PdfCreate/Eta_Month_ReportPdf.cs
Îļþ´Ó Application/IStation.Application.DataFile/Report/PdfCreate/ReportPdf4Default.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();
            //初始化标题中的LOGO图片
@@ -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);