/// <summary> /// 根据商户编号、时间、集客角色类型 获取 单条信息 /// </summary> /// <param name="customerid">商户编号</param> /// <param name="createtime">统计时间 2016-5-5</param> /// <param name="tooltype">类型( 员工 = 1, 客服 = 2, 会员 = 3)</param> /// <param name="SetoffRoleToolSourceService"></param> /// <returns></returns> public SetoffSourcesCount GetCountByCustomerIdAndDateCode(string customerid, string createtime, int tooltype, Agg_SetoffForSourceBLL SetoffRoleToolSourceService) { SetoffSourcesCount result = new SetoffSourcesCount(); List <EqualsCondition> lstWhereCondition = new List <EqualsCondition>(); lstWhereCondition.Add(new EqualsCondition() { FieldName = "DateCode", Value = createtime }); lstWhereCondition.Add(new EqualsCondition() { FieldName = "CustomerId", Value = customerid }); lstWhereCondition.Add(new EqualsCondition() { FieldName = "SetoffRole", Value = tooltype }); List <Agg_SetoffForSourceEntity> lst = SetoffRoleToolSourceService.Query(lstWhereCondition.ToArray(), null).ToList(); //按照条件查询 result.PeopleCount = lst.Sum(m => m.SetoffCount); result.ShareNumber = lst.Sum(m => m.ShareCount); return(result); }