/// <summary> /// 自动打卡服务 /// </summary> /// <param name="sType">类型</param> /// <param name="sValue">类型值</param> /// <param name="strOwnerID">员工ID</param> /// <param name="strEmployeeID">EmployeeID</param> /// <param name="strPunchDateFrom">打卡开始时间</param> /// <param name="strPunchDateTo">打卡结束时间</param> /// <param name="strTimeFrom">开始时间</param> /// <param name="strTimeTo">开始时间</param> /// <param name="strSortKey">key</param> /// <param name="pageIndex">分页</param> /// <param name="pageSize">大小</param> /// <param name="pageCount">行数</param> /// <returns>实体</returns> public List <T_HR_EMPLOYEECLOCKINRECORD> GetAllClockInRdListBySql(string sType, string sValue, string strOwnerID, string strEmployeeID, string strPunchDateFrom, string strPunchDateTo, string strTimeFrom, string strTimeTo, string strSortKey, int pageIndex, int pageSize, ref int pageCount) { ClockInRecordDAL dalClockInRecord = new ClockInRecordDAL(); StringBuilder strfilter = new StringBuilder(); List <object> objArgs = new List <object>(); string strOrderBy = string.Empty; if (!string.IsNullOrEmpty(strEmployeeID)) { strfilter.Append(" t.EMPLOYEEID == @0"); objArgs.Add(strEmployeeID); } string filterString = strfilter.ToString(); if (!string.IsNullOrEmpty(strOwnerID)) { this.SetOrganizationFilter(ref filterString, ref objArgs, strOwnerID, "T_HR_EMPLOYEECLOCKINRECORD"); } if (!string.IsNullOrEmpty(strSortKey)) { strOrderBy = strSortKey; } else { strOrderBy = "t.CLOCKINRECORDID"; } var q = dalClockInRecord.GetClockInRdListBySql(sType, sValue, strPunchDateFrom, strPunchDateTo, strTimeFrom, strTimeTo, strOrderBy, filterString, pageIndex, pageSize, ref pageCount, objArgs.ToArray()); return(q); }
/// <summary> /// 新增员工加班信息 /// </summary> /// <param name="entClockInRd"></param> /// <returns>加班信息</returns> public string addClockInRecord(T_HR_EMPLOYEECLOCKINRECORD entTemp) { string strMsg = string.Empty; bool flag = false; try { if (entTemp == null) { return("{REQUIREDFIELDS}"); } ClockInRecordDAL dalClockInRecord = new ClockInRecordDAL(); flag = dalClockInRecord.IsExistsRd(entTemp.FINGERPRINTID, entTemp.PUNCHDATE, entTemp.PUNCHTIME); if (flag) { return("{ALREADYEXISTSRECORD}"); } dalClockInRecord.Add(entTemp); strMsg = "{SAVESUCCESSED}"; } catch (Exception ex) { strMsg = ex.Message.ToString(); } return(strMsg); }