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

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("22.01.10.0930")]
[assembly: AssemblyFileVersion("22.01.10.0930")]
[assembly: AssemblyVersion("22.01.11.1030")]
[assembly: AssemblyFileVersion("22.01.11.1030")]

View File

@@ -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);

View File

@@ -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);
}
}
}
}