/// <summary> /// 根据员工ID,计算该公司指定时间段内员工考勤异常情况 /// </summary> /// <param name="strEmployeeIds"></param> /// <param name="dtPunchFrom"></param> /// <param name="dtPunchTo"></param> /// <param name="strMsg"></param> public void CheckAbnormRdForEmployeesByDate(string strEmployeeIds, DateTime dtPunchFrom, DateTime dtPunchTo, ref string strMsg) { if (dtPunchFrom > dtPunchTo) { return; } string[] strlist = strEmployeeIds.Split(','); EmployeeBLL bllEmployee = new EmployeeBLL(); List <T_HR_EMPLOYEE> entEmployees = bllEmployee.GetEmployeeByIDs(strlist); if (entEmployees == null) { strMsg = "当前员工编号无对应的员工"; return; } if (entEmployees.Count() == 0) { strMsg = "当前员工编号无对应的员工"; return; } AbnormRecordBLL bllAbnormRecord = new AbnormRecordBLL(); bllAbnormRecord.CheckAbnormRecordForEmployees(entEmployees, dtPunchFrom, dtPunchTo, ref strMsg); }
/// <summary> /// 根据公司ID,计算该公司指定时间段内员工考勤异常情况 /// </summary> /// <param name="strCompanyId"></param> /// <param name="dtPunchFrom"></param> /// <param name="dtPunchTo"></param> /// <param name="strMsg"></param> public void CheckAbnormRdForCompanyByDate(string strCompanyId, DateTime dtPunchFrom, DateTime dtPunchTo, ref string strMsg) { if (dtPunchFrom > dtPunchTo) { return; } EmployeeBLL bllEmployee = new EmployeeBLL(); List <T_HR_EMPLOYEE> entEmployees = new List <T_HR_EMPLOYEE>(); var ents = bllEmployee.GetEmployeeByCompanyID(strCompanyId, dtPunchFrom); if (ents == null) { strMsg = "当前查询公司无员工记录"; return; } if (ents.Count() == 0) { strMsg = "当前查询公司无员工记录"; return; } entEmployees = ents.ToList(); AbnormRecordBLL bllAbnormRecord = new AbnormRecordBLL(); bllAbnormRecord.CheckAbnormRecordForEmployees(entEmployees, dtPunchFrom, dtPunchTo, ref strMsg); }
/// <summary> /// 根据员工指纹编号,计算该员工指定月份考勤异常情况 /// </summary> /// <param name="strFingertId">员工指纹编号</param> /// <param name="strPunchMonth">月份</param> /// <param name="strMsg">返回处理消息</param> public void CheckAbnormRecordByFingertId(string strFingertId, string strPunchMonth, ref string strMsg) { DateTime dtCheck = new DateTime(); DateTime dtStart = new DateTime(), dtEnd = new DateTime(); DateTime.TryParse(strPunchMonth + "-1", out dtStart); if (dtStart <= dtCheck) { return; } dtEnd = dtStart.AddMonths(1).AddDays(-1); //DateTime.TryParse("2011-10-16", out dtEnd); List <T_HR_EMPLOYEE> entEmployees = new List <T_HR_EMPLOYEE>(); EmployeeBLL bllEmployee = new EmployeeBLL(); T_HR_EMPLOYEE entEmployee = bllEmployee.GetEmployeeByFingerPrintID(strFingertId); if (entEmployee == null) { strMsg = "当前指纹编号无对应的员工"; return; } entEmployees.Add(entEmployee); AbnormRecordBLL bllAbnormRecord = new AbnormRecordBLL(); bllAbnormRecord.CheckAbnormRecordForEmployees(entEmployees, dtStart, dtEnd, ref strMsg); }