From 34505a93282b211e2ee8ca39b1384c867478fa1e Mon Sep 17 00:00:00 2001 From: "ns.potapov" Date: Thu, 30 May 2024 02:06:44 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=D0=B5?= =?UTF-8?q?=D1=82=20=D1=81=D0=BE=D1=85=D1=80=D0=B0=D0=BD=D0=B5=D0=B8=D0=BD?= =?UTF-8?q?=D0=B5=20=D0=BE=D1=82=D1=87=D0=B5=D1=82=D0=B0=20=D0=B2=20PDF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusinessLogics/ImplementerReportLogic.cs | 12 ++++++------ ...s => AbstractReportDiagnosesByPeriodSaveToPdf.cs} | 10 +++++----- ...stractReportMedicamentsByDiagnosesSaveToExcel.cs} | 2 +- ...bstractReportMedicamentsByDiagnosesSaveToWord.cs} | 2 +- ...eToPdf.cs => ReportDiagnosesByPeriodSaveToPdf.cs} | 3 ++- ...cs => ReportMedicamentsByDiagnosesSaveToExcel.cs} | 2 +- ....cs => ReportMedicamentsByDiagnosesSaveToWord.cs} | 2 +- Polyclinic/PolyclinicWebAppImplementer/Program.cs | 7 ++++--- 8 files changed, 21 insertions(+), 19 deletions(-) rename Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractImplementerReports/{AbstractReportMedicamentsByDiagnosesSaveToPdf.cs => AbstractReportDiagnosesByPeriodSaveToPdf.cs} (86%) rename Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractImplementerReports/{AbstractReportDiagnosesByPeriodSaveToExcel.cs => AbstractReportMedicamentsByDiagnosesSaveToExcel.cs} (95%) rename Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractImplementerReports/{AbstractReportDiagnosesByPeriodSaveToWord.cs => AbstractReportMedicamentsByDiagnosesSaveToWord.cs} (95%) rename Polyclinic/PolyclinicBusinessLogic/OfficePackage/Implements/ImplementerReports/{ReportMedicamentsByDiagnosesSaveToPdf.cs => ReportDiagnosesByPeriodSaveToPdf.cs} (96%) rename Polyclinic/PolyclinicBusinessLogic/OfficePackage/Implements/ImplementerReports/{ReportDiagnosesByPeriodSaveToExcel.cs => ReportMedicamentsByDiagnosesSaveToExcel.cs} (99%) rename Polyclinic/PolyclinicBusinessLogic/OfficePackage/Implements/ImplementerReports/{ReportDiagnosesByPeriodSaveToWord.cs => ReportMedicamentsByDiagnosesSaveToWord.cs} (97%) diff --git a/Polyclinic/PolyclinicBusinessLogic/BusinessLogics/ImplementerReportLogic.cs b/Polyclinic/PolyclinicBusinessLogic/BusinessLogics/ImplementerReportLogic.cs index 5ef7c8a..af98fb3 100644 --- a/Polyclinic/PolyclinicBusinessLogic/BusinessLogics/ImplementerReportLogic.cs +++ b/Polyclinic/PolyclinicBusinessLogic/BusinessLogics/ImplementerReportLogic.cs @@ -19,18 +19,18 @@ namespace PolyclinicBusinessLogic.BusinessLogics private readonly ICourseStorage _courseStorage; private readonly ISymptomStorage _symptomStorage; - private readonly AbstractReportDiagnosesByPeriodSaveToExcel _saveToExcel; - private readonly AbstractReportDiagnosesByPeriodSaveToWord _saveToWord; - private readonly AbstractReportMedicamentsByDiagnosesSaveToPdf _saveToPdf; + private readonly AbstractReportMedicamentsByDiagnosesSaveToExcel _saveToExcel; + private readonly AbstractReportMedicamentsByDiagnosesSaveToWord _saveToWord; + private readonly AbstractReportDiagnosesByPeriodSaveToPdf _saveToPdf; public ImplementerReportLogic( IDiagnoseStorage diagnoseStorage, IMedicamentStorage medicamentStorage, ICourseStorage courseStorage, ISymptomStorage symptomStorage, - AbstractReportDiagnosesByPeriodSaveToWord saveToWord, - AbstractReportMedicamentsByDiagnosesSaveToPdf saveToPdf, - AbstractReportDiagnosesByPeriodSaveToExcel saveToExcel) + AbstractReportMedicamentsByDiagnosesSaveToWord saveToWord, + AbstractReportDiagnosesByPeriodSaveToPdf saveToPdf, + AbstractReportMedicamentsByDiagnosesSaveToExcel saveToExcel) { _diagnoseStorage = diagnoseStorage; _medicamentStorage = medicamentStorage; diff --git a/Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractImplementerReports/AbstractReportMedicamentsByDiagnosesSaveToPdf.cs b/Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractImplementerReports/AbstractReportDiagnosesByPeriodSaveToPdf.cs similarity index 86% rename from Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractImplementerReports/AbstractReportMedicamentsByDiagnosesSaveToPdf.cs rename to Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractImplementerReports/AbstractReportDiagnosesByPeriodSaveToPdf.cs index 9997dd9..3b21310 100644 --- a/Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractImplementerReports/AbstractReportMedicamentsByDiagnosesSaveToPdf.cs +++ b/Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractImplementerReports/AbstractReportDiagnosesByPeriodSaveToPdf.cs @@ -4,7 +4,7 @@ using PolyclinicContracts.ViewModels; namespace PolyclinicBusinessLogic.OfficePackage.AbstractImplementerReports { - public abstract class AbstractReportMedicamentsByDiagnosesSaveToPdf + public abstract class AbstractReportDiagnosesByPeriodSaveToPdf { public void CreateDoc(PdfDiagnosesByPeriodInfo info) { @@ -21,10 +21,10 @@ namespace PolyclinicBusinessLogic.OfficePackage.AbstractImplementerReports Style = "Normal", ParagraphAlignment = PdfParagraphAlignmentType.Center }); - CreateTable(new List { "2cm", "3cm", "3cm", "4cm", "4cm", "4cm" }); + CreateTable(new List { "1cm", "4cm", "3cm", "3cm", "4cm", "4cm" }); CreateRow(new PdfRowParameters { - Texts = new List { "Номер", "Название", "Начало", "Конец", "Симптомы", "Курсы" }, + Texts = new List { "#", "Название", "Начало", "Конец", "Симптомы", "Курсы" }, Style = "NormalTitle", ParagraphAlignment = PdfParagraphAlignmentType.Center }); @@ -37,8 +37,8 @@ namespace PolyclinicBusinessLogic.OfficePackage.AbstractImplementerReports { diagnose.Id.ToString(), diagnose.Name, - diagnose.DateStartDiagnose.ToShortTimeString(), - diagnose.DateStopDiagnose?.ToShortTimeString() ?? "нет даты окончания процедуры", + diagnose.DateStartDiagnose.ToShortDateString(), + diagnose.DateStopDiagnose?.ToShortDateString() ?? string.Empty, "", "" }, diff --git a/Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractImplementerReports/AbstractReportDiagnosesByPeriodSaveToExcel.cs b/Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractImplementerReports/AbstractReportMedicamentsByDiagnosesSaveToExcel.cs similarity index 95% rename from Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractImplementerReports/AbstractReportDiagnosesByPeriodSaveToExcel.cs rename to Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractImplementerReports/AbstractReportMedicamentsByDiagnosesSaveToExcel.cs index b3abbc3..3b950b2 100644 --- a/Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractImplementerReports/AbstractReportDiagnosesByPeriodSaveToExcel.cs +++ b/Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractImplementerReports/AbstractReportMedicamentsByDiagnosesSaveToExcel.cs @@ -4,7 +4,7 @@ using PolyclinicBusinessLogic.OfficePackage.HelperModels.Excel; namespace PolyclinicBusinessLogic.OfficePackage.AbstractImplementerReports { - public abstract class AbstractReportDiagnosesByPeriodSaveToExcel + public abstract class AbstractReportMedicamentsByDiagnosesSaveToExcel { public void CreateReport(ReportMedicamentsByDiagnosesInfo info) { diff --git a/Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractImplementerReports/AbstractReportDiagnosesByPeriodSaveToWord.cs b/Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractImplementerReports/AbstractReportMedicamentsByDiagnosesSaveToWord.cs similarity index 95% rename from Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractImplementerReports/AbstractReportDiagnosesByPeriodSaveToWord.cs rename to Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractImplementerReports/AbstractReportMedicamentsByDiagnosesSaveToWord.cs index 7000a63..d214ae9 100644 --- a/Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractImplementerReports/AbstractReportDiagnosesByPeriodSaveToWord.cs +++ b/Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractImplementerReports/AbstractReportMedicamentsByDiagnosesSaveToWord.cs @@ -4,7 +4,7 @@ using PolyclinicBusinessLogic.OfficePackage.HelperModels.Word; namespace PolyclinicBusinessLogic.OfficePackage.AbstractImplementerReports { - public abstract class AbstractReportDiagnosesByPeriodSaveToWord + public abstract class AbstractReportMedicamentsByDiagnosesSaveToWord { public void CreateDoc(ReportMedicamentsByDiagnosesInfo info) { diff --git a/Polyclinic/PolyclinicBusinessLogic/OfficePackage/Implements/ImplementerReports/ReportMedicamentsByDiagnosesSaveToPdf.cs b/Polyclinic/PolyclinicBusinessLogic/OfficePackage/Implements/ImplementerReports/ReportDiagnosesByPeriodSaveToPdf.cs similarity index 96% rename from Polyclinic/PolyclinicBusinessLogic/OfficePackage/Implements/ImplementerReports/ReportMedicamentsByDiagnosesSaveToPdf.cs rename to Polyclinic/PolyclinicBusinessLogic/OfficePackage/Implements/ImplementerReports/ReportDiagnosesByPeriodSaveToPdf.cs index 6e099ce..ff26e20 100644 --- a/Polyclinic/PolyclinicBusinessLogic/OfficePackage/Implements/ImplementerReports/ReportMedicamentsByDiagnosesSaveToPdf.cs +++ b/Polyclinic/PolyclinicBusinessLogic/OfficePackage/Implements/ImplementerReports/ReportDiagnosesByPeriodSaveToPdf.cs @@ -1,4 +1,5 @@ using MigraDoc.DocumentObjectModel; +using MigraDoc.DocumentObjectModel.Tables; using MigraDoc.Rendering; using PolyclinicBusinessLogic.OfficePackage.AbstractImplementerReports; using PolyclinicBusinessLogic.OfficePackage.HelperEnums; @@ -6,7 +7,7 @@ using PolyclinicBusinessLogic.OfficePackage.HelperModels.PDF; namespace PolyclinicBusinessLogic.OfficePackage.Implements.ImplementerReports { - public class ReportMedicamentsByDiagnosesSaveToPdf : AbstractReportMedicamentsByDiagnosesSaveToPdf + public class ReportDiagnosesByPeriodSaveToPdf : AbstractReportDiagnosesByPeriodSaveToPdf { private Document? _document; private Section? _section; diff --git a/Polyclinic/PolyclinicBusinessLogic/OfficePackage/Implements/ImplementerReports/ReportDiagnosesByPeriodSaveToExcel.cs b/Polyclinic/PolyclinicBusinessLogic/OfficePackage/Implements/ImplementerReports/ReportMedicamentsByDiagnosesSaveToExcel.cs similarity index 99% rename from Polyclinic/PolyclinicBusinessLogic/OfficePackage/Implements/ImplementerReports/ReportDiagnosesByPeriodSaveToExcel.cs rename to Polyclinic/PolyclinicBusinessLogic/OfficePackage/Implements/ImplementerReports/ReportMedicamentsByDiagnosesSaveToExcel.cs index a2ea34e..9bfac1f 100644 --- a/Polyclinic/PolyclinicBusinessLogic/OfficePackage/Implements/ImplementerReports/ReportDiagnosesByPeriodSaveToExcel.cs +++ b/Polyclinic/PolyclinicBusinessLogic/OfficePackage/Implements/ImplementerReports/ReportMedicamentsByDiagnosesSaveToExcel.cs @@ -10,7 +10,7 @@ using PolyclinicBusinessLogic.OfficePackage.HelperModels; namespace PolyclinicBusinessLogic.OfficePackage.Implements.ImplementerReports { - public class ReportDiagnosesByPeriodSaveToExcel : AbstractReportDiagnosesByPeriodSaveToExcel + public class ReportMedicamentsByDiagnosesSaveToExcel : AbstractReportMedicamentsByDiagnosesSaveToExcel { private SpreadsheetDocument? _spreadsheetDocument; private SharedStringTablePart? _shareStringPart; diff --git a/Polyclinic/PolyclinicBusinessLogic/OfficePackage/Implements/ImplementerReports/ReportDiagnosesByPeriodSaveToWord.cs b/Polyclinic/PolyclinicBusinessLogic/OfficePackage/Implements/ImplementerReports/ReportMedicamentsByDiagnosesSaveToWord.cs similarity index 97% rename from Polyclinic/PolyclinicBusinessLogic/OfficePackage/Implements/ImplementerReports/ReportDiagnosesByPeriodSaveToWord.cs rename to Polyclinic/PolyclinicBusinessLogic/OfficePackage/Implements/ImplementerReports/ReportMedicamentsByDiagnosesSaveToWord.cs index a86ee16..5faac48 100644 --- a/Polyclinic/PolyclinicBusinessLogic/OfficePackage/Implements/ImplementerReports/ReportDiagnosesByPeriodSaveToWord.cs +++ b/Polyclinic/PolyclinicBusinessLogic/OfficePackage/Implements/ImplementerReports/ReportMedicamentsByDiagnosesSaveToWord.cs @@ -8,7 +8,7 @@ using PolyclinicBusinessLogic.OfficePackage.HelperModels.Word; namespace PolyclinicBusinessLogic.OfficePackage.Implements.ImplementerReports { - public class ReportDiagnosesByPeriodSaveToWord : AbstractReportDiagnosesByPeriodSaveToWord + public class ReportMedicamentsByDiagnosesSaveToWord : AbstractReportMedicamentsByDiagnosesSaveToWord { private WordprocessingDocument? _wordDocument; private Body? _docBody; diff --git a/Polyclinic/PolyclinicWebAppImplementer/Program.cs b/Polyclinic/PolyclinicWebAppImplementer/Program.cs index 2b138cc..89fe6c8 100644 --- a/Polyclinic/PolyclinicWebAppImplementer/Program.cs +++ b/Polyclinic/PolyclinicWebAppImplementer/Program.cs @@ -1,5 +1,6 @@ using PolyclinicBusinessLogic.BusinessLogics; using PolyclinicBusinessLogic.OfficePackage.AbstractImplementerReports; +using PolyclinicBusinessLogic.OfficePackage.Implements.ImplementerReports; using PolyclinicContracts.BusinessLogicsContracts; using PolyclinicContracts.StoragesContracts; using PolyclinicDatabaseImplement.Implements; @@ -31,9 +32,9 @@ builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); -builder.Services.AddTransient(); -builder.Services.AddTransient(); -builder.Services.AddTransient(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); var app = builder.Build();