This commit is contained in:
chi
2022-01-10 09:35:08 +09:00
parent e2aa532654
commit b398298b80
6 changed files with 17 additions and 7 deletions

View File

@@ -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;
//사용자 정보에 업무일지를 사용하지 않기로 했다면 처리하지 않는다. 퇴사자는 이값도 설정된다.