(CONCAT(DATE_FORMAT(now(),'%Y'),'-',DATE_FORMAT(b.BirthDate,'%m-%d')) BETWEEN '{0}' AND '{1}')
OR (CONCAT(YEAR(NOW())+1, '-',DATE_FORMAT(b.BirthDate,'%m-%d')) BETWEEN '{0}' AND '{1}')
)",query.StartBirthDate,query.EndBirthDate);
}
}
}
StringBuilderbuilder=newStringBuilder();
StringBuilderbuilder=newStringBuilder();
...
@@ -301,17 +306,17 @@ FROM
...
@@ -301,17 +306,17 @@ FROM
(
(
SELECT A.*,IFNULL(B.MName,'') AS EmployeeName,B.MHead AS UserIcon,B.Dept_Id,B.Post_Id,B.IDCard,B.Sex,B.Education,B.EntryTime,B.Address,B.BirthDate
SELECT A.*,IFNULL(B.MName,'') AS EmployeeName,B.MHead AS UserIcon,B.Dept_Id,B.Post_Id,B.IDCard,B.Sex,B.Education,B.EntryTime,B.Address,B.BirthDate
,B.LeaveStatus,B.LeaveTime,B.MTel AS EmployeeTel
,B.LeaveStatus,B.LeaveTime,B.MTel AS EmployeeTel
FROM rb_account AS A INNER JOIN rb_manager AS B ON A.AccountId=B.MId AND A.AccountType=1
FROM rb_manager AS B LEFT JOIN rb_account AS A ON A.AccountId=B.MId AND A.AccountType=1
WHERE 1=1 {0}
WHERE 1=1 {0}
UNION ALL
UNION ALL
SELECT A.*,IFNULL(B.TeacherName,'') AS EmployeeName,B.TeacherIcon AS UserIcon,B.Dept_Id,B.Post_Id,B.IDCard,B.Sex,B.Education,B.EntryTime,B.Address,B.BirthDate
SELECT A.*,IFNULL(B.TeacherName,'') AS EmployeeName,B.TeacherIcon AS UserIcon,B.Dept_Id,B.Post_Id,B.IDCard,B.Sex,B.Education,B.EntryTime,B.Address,B.BirthDate
,B.LeaveStatus,B.LeaveTime,B.TeacherTel AS EmployeeTel
,B.LeaveStatus,B.LeaveTime,B.TeacherTel AS EmployeeTel
FROM rb_account AS A INNER JOIN rb_teacher AS B ON A.AccountId=B.TId AND A.AccountType=2
FROM rb_teacher AS B LEFT JOIN rb_account AS A ON A.AccountId=B.TId AND A.AccountType=2
WHERE 1=1 {0}
WHERE 1=1 {0}
UNION ALL
UNION ALL
SELECT A.*,IFNULL(B.AssistName,'') AS EmployeeName,B.AssistIcon AS UserIcon,B.Dept_Id,B.Post_Id,B.IDCard,B.Sex,B.Education,B.EntryTime,B.Address,B.BirthDate
SELECT A.*,IFNULL(B.AssistName,'') AS EmployeeName,B.AssistIcon AS UserIcon,B.Dept_Id,B.Post_Id,B.IDCard,B.Sex,B.Education,B.EntryTime,B.Address,B.BirthDate
,B.LeaveStatus,B.LeaveTime,B.AssistTel AS EmployeeTel
,B.LeaveStatus,B.LeaveTime,B.AssistTel AS EmployeeTel
FROM rb_account AS A INNER JOIN rb_assist AS B ON A.AccountId=B.AId AND A.AccountType=3
FROM rb_assist AS B LEFT JOIN rb_account AS A ON A.AccountId=B.AId AND A.AccountType=3
WHERE 1=1 {0}
WHERE 1=1 {0}
) AS A LEFT JOIN rb_group AS g ON A.Group_Id=g.GId
) AS A LEFT JOIN rb_group AS g ON A.Group_Id=g.GId