From 0c1f767c8d487109d4e830340de59111e8506839 Mon Sep 17 00:00:00 2001 From: chi Date: Tue, 11 Jan 2022 11:02:44 +0900 Subject: [PATCH] =?UTF-8?q?=EC=97=85=EB=AC=B4=EC=9D=BC=EC=A7=80=20?= =?UTF-8?q?=EB=88=84=EB=9D=BD=EC=9E=90=EA=B0=80=20=EC=97=B0=EC=86=8D=20?= =?UTF-8?q?=EB=A9=94=EC=9D=BC=20=EB=B0=9C=EC=86=A1=EB=90=98=EB=8A=94=20?= =?UTF-8?q?=EA=B1=B4=EC=9D=B4=20=EC=9E=88=EC=96=B4=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?=ED=95=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Properties/AssemblyInfo.cs | 4 +- JobReportMailService/fJobReportDay.cs | 10 ++ SubProject/FCM0000/FPUtil.cs | 103 +++++++++--------- 3 files changed, 65 insertions(+), 52 deletions(-) diff --git a/JobReportMailService/Properties/AssemblyInfo.cs b/JobReportMailService/Properties/AssemblyInfo.cs index b8e8889..cca5240 100644 --- a/JobReportMailService/Properties/AssemblyInfo.cs +++ b/JobReportMailService/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를 // 기본값으로 할 수 있습니다. // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("22.01.10.0930")] -[assembly: AssemblyFileVersion("22.01.10.0930")] +[assembly: AssemblyVersion("22.01.11.1030")] +[assembly: AssemblyFileVersion("22.01.11.1030")] diff --git a/JobReportMailService/fJobReportDay.cs b/JobReportMailService/fJobReportDay.cs index 9a270e2..a9ba746 100644 --- a/JobReportMailService/fJobReportDay.cs +++ b/JobReportMailService/fJobReportDay.cs @@ -113,6 +113,16 @@ namespace JobReportMailService if (MailJD.exceptmailcc == null) MailJD.exceptmailcc = string.Empty; + //오늘날짜로 주간 데이터가 등록되어있느지 확인한다. + db = new EEEntities(); + var Existweek = db.MailData.Where(t => t.gcode == vGcode && t.cate == "JD" && t.pdate == str_dt).Any(); + if (Existweek) + { + addmsg($"[{vGcode}] 업무일지(일간({str_dt}) 보고 메일이 이미 등록되어 있습니다"); + continue; + } + + //대상 사용자 목록을 추출한다 db = new EEEntities(); var users = db.vJobReportForUser.Where(t => t.gcode == vGcode).GroupBy(t => t.id); diff --git a/SubProject/FCM0000/FPUtil.cs b/SubProject/FCM0000/FPUtil.cs index cb37515..e98b014 100644 --- a/SubProject/FCM0000/FPUtil.cs +++ b/SubProject/FCM0000/FPUtil.cs @@ -1,50 +1,53 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FCM0000 -{ - public static class FPUtil - { - public static void printsheet(FarPoint.Win.Spread.FpSpread fpSpread1, string headerTitle) - { - FarPoint.Win.Spread.PrintInfo printset = fpSpread1.Sheets[0].PrintInfo; // new FarPoint.Win.Spread.PrintInfo(); - printset.Header = headerTitle; - printset.Footer = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); - printset.Orientation = FarPoint.Win.Spread.PrintOrientation.Auto; - // printset.PdfWriteTo = FarPoint.Win.Spread.PdfWriteTo.File; - // printset.PdfWriteMode = FarPoint.Win.Spread.PdfWriteMode.Append; - // printset.PrintToPdf = true; - printset.Preview = true; - printset.UseSmartPrint = true; - printset.BestFitCols = false; - printset.BestFitRows = false; - printset.BestFitWithSpan = true; - printset.Centering = FarPoint.Win.Spread.Centering.Horizontal; - printset.EnhancePreview = false; - // printset.PdfFileName = "C:\\\results.pdf"; - fpSpread1.Sheets[0].PrintInfo = printset; - fpSpread1.PrintSheet(0); - } - - public static void ColsizeSave(FarPoint.Win.Spread.FpSpread dv, string fn) - { - arUtil.INIHelper ini = new arUtil.INIHelper(fn); - foreach (FarPoint.Win.Spread.Column col in dv.ActiveSheet.Columns) - ini.set_Data("colsize", "index_" + col.Index.ToString(), col.Width.ToString()); - ini.Flush(); - } - public static void ColSizeLoad(ref FarPoint.Win.Spread.FpSpread dv, string fn) - { - if (System.IO.File.Exists(fn) == false) return; - arUtil.INIHelper ini = new arUtil.INIHelper(fn); - foreach (FarPoint.Win.Spread.Column col in dv.ActiveSheet.Columns) - { - var width = ini.get_Data("colsize", "index_" + col.Index.ToString(), "0"); - col.Width = float.Parse(width); - } - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FCM0000 +{ + public static class FPUtil + { + public static void printsheet(FarPoint.Win.Spread.FpSpread fpSpread1, string headerTitle) + { + + + + FarPoint.Win.Spread.PrintInfo printset = fpSpread1.Sheets[0].PrintInfo; // new FarPoint.Win.Spread.PrintInfo(); + printset.Header = headerTitle; + printset.Footer = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + printset.Orientation = FarPoint.Win.Spread.PrintOrientation.Auto; + // printset.PdfWriteTo = FarPoint.Win.Spread.PdfWriteTo.File; + // printset.PdfWriteMode = FarPoint.Win.Spread.PdfWriteMode.Append; + // printset.PrintToPdf = true; + printset.Preview = true; + printset.UseSmartPrint = true; + printset.BestFitCols = false; + printset.BestFitRows = false; + printset.BestFitWithSpan = true; + printset.Centering = FarPoint.Win.Spread.Centering.Horizontal; + printset.EnhancePreview = false; + // printset.PdfFileName = "C:\\\results.pdf"; + fpSpread1.Sheets[0].PrintInfo = printset; + fpSpread1.PrintSheet(0); + } + + public static void ColsizeSave(FarPoint.Win.Spread.FpSpread dv, string fn) + { + arUtil.INIHelper ini = new arUtil.INIHelper(fn); + foreach (FarPoint.Win.Spread.Column col in dv.ActiveSheet.Columns) + ini.set_Data("colsize", "index_" + col.Index.ToString(), col.Width.ToString()); + ini.Flush(); + } + public static void ColSizeLoad(ref FarPoint.Win.Spread.FpSpread dv, string fn) + { + if (System.IO.File.Exists(fn) == false) return; + arUtil.INIHelper ini = new arUtil.INIHelper(fn); + foreach (FarPoint.Win.Spread.Column col in dv.ActiveSheet.Columns) + { + var width = ini.get_Data("colsize", "index_" + col.Index.ToString(), "0"); + col.Width = float.Parse(width); + } + } + } +}