diff --git a/JobReportMailService/Properties/AssemblyInfo.cs b/JobReportMailService/Properties/AssemblyInfo.cs index 6bf25a2..b8e8889 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.08.1250")] -[assembly: AssemblyFileVersion("22.01.08.1250")] +[assembly: AssemblyVersion("22.01.10.0930")] +[assembly: AssemblyFileVersion("22.01.10.0930")] diff --git a/JobReportMailService/fJobReportDay.cs b/JobReportMailService/fJobReportDay.cs index ee0b8f8..9a270e2 100644 --- a/JobReportMailService/fJobReportDay.cs +++ b/JobReportMailService/fJobReportDay.cs @@ -103,16 +103,15 @@ namespace JobReportMailService if (string.IsNullOrEmpty(vGcode)) continue; var MailJD = db.MailForm.Where(t => t.gcode == vGcode & t.cate == "JD").FirstOrDefault(); - //var MailJW = db.MailForm.Where(t => t.gcode == vGcode & t.cate == "JW").FirstOrDefault(); - if (MailJD == null) { //토,일요일에는 동작하지 않는다 addmsg($"[{vGcode}]업무일지 미작성 메일 양식이 입력되지 않았습니다"); continue; } + if (MailJD.exceptmail == null) MailJD.exceptmail = string.Empty; + if (MailJD.exceptmailcc == null) MailJD.exceptmailcc = string.Empty; - //대상 사용자 목록을 추출한다 db = new EEEntities(); @@ -122,10 +121,12 @@ namespace JobReportMailService { //해당 사용자의 오늘 날짜로 등록된 자동 데이터가 있다면 대상에 넣지 않는다 var userinfo = user.FirstOrDefault(); + if (userinfo == null || string.IsNullOrEmpty(userinfo.id) == true) continue; //퇴사자 확인 db = new EEEntities(); var userdata = db.vGroupUser.Where(t => t.gcode == vGcode && t.id == userinfo.id).FirstOrDefault(); + if (userdata == null) continue; if (userdata != null && string.IsNullOrEmpty(userdata.outdate) == false) continue; //사용자 정보에 업무일지를 사용하지 않기로 했다면 처리하지 않는다. 퇴사자는 이값도 설정된다. diff --git a/JobReportMailService/fJobReportWeek.cs b/JobReportMailService/fJobReportWeek.cs index 528b34c..b5bfe73 100644 --- a/JobReportMailService/fJobReportWeek.cs +++ b/JobReportMailService/fJobReportWeek.cs @@ -108,6 +108,8 @@ namespace JobReportMailService addmsg($"[{vGcode}] 업무일지 미작성(주간) 메일 양식이 입력되지 않았습니다"); continue; } + if (MailJW.exceptmail == null) MailJW.exceptmail = string.Empty; + if (MailJW.exceptmailcc == null) MailJW.exceptmailcc = string.Empty; //오늘날짜로 주간 데이터가 등록되어있느지 확인한다. db = new EEEntities(); @@ -126,16 +128,19 @@ namespace JobReportMailService { //해당 사용자의 오늘 날짜로 등록된 자동 데이터가 있다면 대상에 넣지 않는다 var userinfo = user.FirstOrDefault(); + if (userinfo == null || string.IsNullOrEmpty(userinfo.id)) continue; //null인게 있네? 220110 //퇴사자 확인 db = new EEEntities(); var userdata = db.vGroupUser.Where(t => t.gcode == vGcode && t.id == userinfo.id).FirstOrDefault(); + if (userdata == null) continue; if (userdata != null && string.IsNullOrEmpty(userdata.outdate) == false) continue; //사용자 정보에 업무일지를 사용하지 않기로 했다면 처리하지 않는다. 퇴사자는 이값도 설정된다. if (userdata.useJobReport != null && userdata.useJobReport == false) continue; //이 대상의 이메일이 받는 사람에 제외되어있다면 처리하지 않는다. + if (MailJW.exceptmail == null) MailJW.exceptmail = string.Empty; var exxptolist = MailJW.exceptmail.ToUpper().Split(';'); if (exxptolist.Contains(userdata.email.ToUpper()) == false) { diff --git a/JobReportMailService/fNoScheduleDayWeek.cs b/JobReportMailService/fNoScheduleDayWeek.cs index 5009207..bf8b20e 100644 --- a/JobReportMailService/fNoScheduleDayWeek.cs +++ b/JobReportMailService/fNoScheduleDayWeek.cs @@ -101,13 +101,14 @@ namespace JobReportMailService //메일양식이 지정되어있는지 체크 var MailJD = db.MailForm.AsNoTracking().Where(t => t.gcode == vGcode & t.cate == "SN").FirstOrDefault(); - if (MailJD == null) { //토,일요일에는 동작하지 않는다 addmsg($"[{vGcode}] 메일 양식(SN)이 입력되지 않았습니다"); continue; } + if (MailJD.exceptmail == null) MailJD.exceptmail = string.Empty; + if (MailJD.exceptmailcc == null) MailJD.exceptmailcc = string.Empty; //오늘날짜로 데이터가 등록되어있느지 확인한다. db = new EEEntities(); diff --git a/JobReportMailService/fScheduleDay.cs b/JobReportMailService/fScheduleDay.cs index c9cf9ff..ddb49fc 100644 --- a/JobReportMailService/fScheduleDay.cs +++ b/JobReportMailService/fScheduleDay.cs @@ -109,6 +109,8 @@ namespace JobReportMailService addmsg($"[{vGcode}] 메일 양식(SJ)이 입력되지 않았습니다"); continue; } + if (MailJD.exceptmail == null) MailJD.exceptmail = string.Empty; + if (MailJD.exceptmailcc == null) MailJD.exceptmailcc = string.Empty; //오늘날짜로 데이터가 등록되어있느지 확인한다. db = new EEEntities(); diff --git a/JobReportMailService/fScheduleDayWeek.cs b/JobReportMailService/fScheduleDayWeek.cs index f2f74c7..d8d3847 100644 --- a/JobReportMailService/fScheduleDayWeek.cs +++ b/JobReportMailService/fScheduleDayWeek.cs @@ -110,7 +110,8 @@ namespace JobReportMailService addmsg($"[{vGcode}] 메일 양식(SP)이 입력되지 않았습니다"); continue; } - + if (MailJD.exceptmail == null) MailJD.exceptmail = string.Empty; + if (MailJD.exceptmailcc == null) MailJD.exceptmailcc = string.Empty; //오늘날짜로 데이터가 등록되어있느지 확인한다.