업무일지 누락자가 연속 메일 발송되는 건이 있어 수정 함

This commit is contained in:
chi
2022-01-11 11:02:44 +09:00
parent d99c0638b1
commit 0c1f767c8d
3 changed files with 65 additions and 52 deletions

View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를 // 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
// 기본값으로 할 수 있습니다. // 기본값으로 할 수 있습니다.
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("22.01.10.0930")] [assembly: AssemblyVersion("22.01.11.1030")]
[assembly: AssemblyFileVersion("22.01.10.0930")] [assembly: AssemblyFileVersion("22.01.11.1030")]

View File

@@ -113,6 +113,16 @@ namespace JobReportMailService
if (MailJD.exceptmailcc == null) MailJD.exceptmailcc = string.Empty; 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(); db = new EEEntities();
var users = db.vJobReportForUser.Where(t => t.gcode == vGcode).GroupBy(t => t.id); var users = db.vJobReportForUser.Where(t => t.gcode == vGcode).GroupBy(t => t.id);

View File

@@ -1,50 +1,53 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace FCM0000 namespace FCM0000
{ {
public static class FPUtil public static class FPUtil
{ {
public static void printsheet(FarPoint.Win.Spread.FpSpread fpSpread1, string headerTitle) 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; FarPoint.Win.Spread.PrintInfo printset = fpSpread1.Sheets[0].PrintInfo; // new FarPoint.Win.Spread.PrintInfo();
// printset.PdfWriteTo = FarPoint.Win.Spread.PdfWriteTo.File; printset.Header = headerTitle;
// printset.PdfWriteMode = FarPoint.Win.Spread.PdfWriteMode.Append; printset.Footer = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
// printset.PrintToPdf = true; printset.Orientation = FarPoint.Win.Spread.PrintOrientation.Auto;
printset.Preview = true; // printset.PdfWriteTo = FarPoint.Win.Spread.PdfWriteTo.File;
printset.UseSmartPrint = true; // printset.PdfWriteMode = FarPoint.Win.Spread.PdfWriteMode.Append;
printset.BestFitCols = false; // printset.PrintToPdf = true;
printset.BestFitRows = false; printset.Preview = true;
printset.BestFitWithSpan = true; printset.UseSmartPrint = true;
printset.Centering = FarPoint.Win.Spread.Centering.Horizontal; printset.BestFitCols = false;
printset.EnhancePreview = false; printset.BestFitRows = false;
// printset.PdfFileName = "C:\\\results.pdf"; printset.BestFitWithSpan = true;
fpSpread1.Sheets[0].PrintInfo = printset; printset.Centering = FarPoint.Win.Spread.Centering.Horizontal;
fpSpread1.PrintSheet(0); printset.EnhancePreview = false;
} // printset.PdfFileName = "C:\\\results.pdf";
fpSpread1.Sheets[0].PrintInfo = printset;
public static void ColsizeSave(FarPoint.Win.Spread.FpSpread dv, string fn) fpSpread1.PrintSheet(0);
{ }
arUtil.INIHelper ini = new arUtil.INIHelper(fn);
foreach (FarPoint.Win.Spread.Column col in dv.ActiveSheet.Columns) public static void ColsizeSave(FarPoint.Win.Spread.FpSpread dv, string fn)
ini.set_Data("colsize", "index_" + col.Index.ToString(), col.Width.ToString()); {
ini.Flush(); arUtil.INIHelper ini = new arUtil.INIHelper(fn);
} foreach (FarPoint.Win.Spread.Column col in dv.ActiveSheet.Columns)
public static void ColSizeLoad(ref FarPoint.Win.Spread.FpSpread dv, string fn) ini.set_Data("colsize", "index_" + col.Index.ToString(), col.Width.ToString());
{ ini.Flush();
if (System.IO.File.Exists(fn) == false) return; }
arUtil.INIHelper ini = new arUtil.INIHelper(fn); public static void ColSizeLoad(ref FarPoint.Win.Spread.FpSpread dv, string fn)
foreach (FarPoint.Win.Spread.Column col in dv.ActiveSheet.Columns) {
{ if (System.IO.File.Exists(fn) == false) return;
var width = ini.get_Data("colsize", "index_" + col.Index.ToString(), "0"); arUtil.INIHelper ini = new arUtil.INIHelper(fn);
col.Width = float.Parse(width); 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);
} }
}
}
}