| | |
| | | using iTextSharp.text.pdf; |
| | | using iTextSharp.text.rtf.headerfooter; |
| | | using Microsoft.AspNetCore.Http; |
| | | using System; |
| | | using System.Text; |
| | | |
| | | namespace IStation.Application |
| | |
| | | /// </summary> |
| | | public class Eta_Month_ReportPdf |
| | | { |
| | | #region 属性 |
| | | #region 报表生成 |
| | | Document _document; |
| | | PdfWriter _writer; |
| | | //BaseFont _baseFont_general = null;//常规字体 |
| | |
| | | /// <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(); |
| | | //初始化标题中的LOGO图片 |
| | | InitialTitleLogoImage(); |
| | |
| | | /// <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++; |
| | |
| | | return datetime.AddDays(1 - datetime.Day).AddMonths(1).AddDays(-1); |
| | | } |
| | | } |
| | | } |
| | | #endregion |
| | | } |