using System; using System.Collections.Generic; using System.Linq; using System.Text; using CY.Model; using System.Transactions; using CY.IDAL; using AbstractFactory; using CY.Infrastructure.Common; using CY.Infrastructure.Query; namespace CY.BLL.OA { public class OA_CustomerAccessRecordBLL { IOA_CustomerAccessRecordDAL idal_CustomerAccessRecordDAL = null; public OA_CustomerAccessRecordBLL() { idal_CustomerAccessRecordDAL = Factory.GetDALByInterfaceName(DALInterface.IOA_CustomerAccessRecordDAL) as IOA_CustomerAccessRecordDAL; } /// /// 批量访问 /// /// public bool InsertModelList(string[] keys, OA_CustomerAccessRecord model) { bool isSuccess = true; using (TransactionScope scope = new TransactionScope()) { for (int i = 0; i < keys.Count(); i++) { model.CustomerId = keys[i].ToString2(); isSuccess = idal_CustomerAccessRecordDAL.InserModel(model); if (!isSuccess) break; } if (isSuccess) scope.Complete(); } return isSuccess; } /// /// 访问记录 /// /// /// /// /// /// /// /// /// /// public IEnumerable SelectModelPage(Infrastructure.Query.Pagination pa, string CustomerID, string Type, Guid MemberId, string RecordType, DateTime? RecordStartTime, DateTime? RecordEndTime, string RecordVisiter) { return idal_CustomerAccessRecordDAL.SelectModelPage(pa, CustomerID, Type,MemberId,RecordType, RecordStartTime, RecordEndTime, RecordVisiter); } /// /// 员工绩效列表 /// /// /// /// /// /// /// public IEnumerable getAllIntentionAccessList(Pagination pa, Guid FirmId, string StaffName, string StaffStatus, DateTime? StartTime, DateTime? EndTime) { return idal_CustomerAccessRecordDAL.getAllIntentionAccessList(pa, FirmId, StaffName, StaffStatus, StartTime, EndTime); } /// /// 打印访问记录 /// /// /// /// public IEnumerable SelectModelPage(Infrastructure.Query.Pagination pa, string Keyids) { return idal_CustomerAccessRecordDAL.SelectModelPage(pa,Keyids); } /// /// 员工绩效统计 /// /// /// /// /// /// /// /// public Model.OA_CustomerAccessRecord SumAllIntentionAccessList(Pagination pa, Guid FirmId, string StaffName, string StaffStatus, DateTime? StartTime, DateTime? EndTime) { return idal_CustomerAccessRecordDAL.SumAllIntentionAccessList(pa, FirmId, StaffName, StaffStatus, StartTime, EndTime); } /// /// 员工绩效列表-打印页面 /// /// /// /// public IEnumerable getAllIntentionAccessListByIds(Guid FirmId, string StaffIds) { return idal_CustomerAccessRecordDAL.getAllIntentionAccessListByIds(FirmId, StaffIds); } /// /// 员工绩效统计-核算工资 /// /// /// /// /// /// /// /// public Model.OA_CustomerAccessRecord SumAccoutingWages(Pagination pa, Guid FirmId, string StaffName, string StaffStatus, DateTime? StartTime, DateTime? EndTime) { return idal_CustomerAccessRecordDAL.SumAccoutingWages(pa, FirmId, StaffName, StaffStatus, StartTime, EndTime); } } }