using MyCode.Project.Domain.Message.Request.Report40; using MyCode.Project.Domain.Message.Request.ReturnVisitLog; using MyCode.Project.Domain.Message.Response.Member; using MyCode.Project.Domain.Message.Response.Report40; using MyCode.Project.Domain.Message.Response.ReturnVisitLog; using MyCode.Project.Infrastructure.Common; using MyCode.Project.Services; using System; using System.Collections.Generic; using System.Linq; using System.Web.Http; namespace MyCode.Project.WebApi.Areas.Wechat.Controllers { /// /// 2022年7月版本的总部管理者端业绩看板报表--服务+会员 /// public class ManagerReport2207FuWuController : BaseWechatController { private IReport2207Service _report2207Service; private IMemberHomePageService _memberHomePageService; private IUserService _userService; /// /// 初始化一个类型的实例 /// public ManagerReport2207FuWuController(IReport2207Service report2207Service , IMemberHomePageService memberHomePageService , IUserService userService ) { _userService = userService; _memberHomePageService = memberHomePageService; _report2207Service = report2207Service; } #region GetFuWuList(获取多个门店的服务统计) /// /// 获取多个门店的服务统计 /// /// /// [HttpPost] public PageResult GetFuWuList(PagedSearch req) { if (req.Condition.IfAllShop == 1) { var ids = _userService.GetShopListByLoginId(this.CurrentLogin.UserId, this.CurrentLogin.RoleId, this.CurrentLogin.OrganizationId); //if (req.Condition.ShopIds != null && req.Condition.ShopIds.Count > 0) //{ // ids = ids.Where(t => !req.Condition.ShopIds.Contains(t)).ToList(); //} req.Condition.ShopIds = ids; } return _report2207Service.GetManagerFuWuList2207(req); } #endregion #region GetHuiYuanList(获取多个门店的会员门店概况) /// /// 获取多个门店的会员门店概况 /// /// /// [HttpPost] public PageResult GetHuiYuanList(PagedSearch req) { if (req.Condition.IfAllShop == 1) { var ids = _userService.GetShopListByLoginId(this.CurrentLogin.UserId, this.CurrentLogin.RoleId, this.CurrentLogin.OrganizationId); //if (req.Condition.ShopIds != null && req.Condition.ShopIds.Count > 0) //{ // ids = ids.Where(t => !req.Condition.ShopIds.Contains(t)).ToList(); //} req.Condition.ShopIds = ids; } return _report2207Service.GetManagerHuiYuanList2207(req); } #endregion #region GetHuiYuanGaiKuangList(获取多个门店的会员概况) /// /// 获取多个门店的会员概况 /// /// /// [HttpPost] public PageResult GetHuiYuanGaiKuangList(PagedSearch req) { if (req.Condition.IfAllShop == 1) { var ids = _userService.GetShopListByLoginId(this.CurrentLogin.UserId, this.CurrentLogin.RoleId, this.CurrentLogin.OrganizationId); //if (req.Condition.ShopIds != null && req.Condition.ShopIds.Count > 0) //{ // ids = ids.Where(t => !req.Condition.ShopIds.Contains(t)).ToList(); //} req.Condition.ShopIds = ids; } return _report2207Service.GetManagerHuiYuanGaiKuangList2207(req,this.CurrentLogin); } #endregion #region GetZiChanGaiKuangList(获取多个门店的资产概况) /// /// 获取多个门店的资产概况 /// /// /// [HttpPost] public PageResult GetZiChanGaiKuangList(PagedSearch req) { if (req.Condition.IfAllShop == 1) { var ids = _userService.GetShopListByLoginId(this.CurrentLogin.UserId, this.CurrentLogin.RoleId, this.CurrentLogin.OrganizationId); //if (req.Condition.ShopIds != null && req.Condition.ShopIds.Count > 0) //{ // ids = ids.Where(t => !req.Condition.ShopIds.Contains(t)).ToList(); //} req.Condition.ShopIds = ids; } return _report2207Service.GetManagerZiChanGaiKuangList202207(req); } #endregion #region GetLaberMemberPageList(获取活跃、沉睡、流水会员分页列表) /// ///获取活跃、沉睡、流水会员分页列表 30=活跃 40=沉睡 50=流失 /// /// /// [HttpPost] public PageResult2 GetLaberMemberPageList(PagedSearch req) { return _memberHomePageService.GetLaberMemberPageList(req, this.CurrentLogin); } #endregion #region GetMemberLastOrderDetails(获取某会员的最近一单的消费明细) /// /// 获取某会员的最近一单的消费明细 /// /// /// [HttpGet] public List GetMemberLastOrderDetails(Guid id) { return _memberHomePageService.GetMemberLastOrderDetails(id); } #endregion #region GetHeadTitleCount(获取标题上的文字) /// ///获取标题上的文字 /// /// /// [HttpPost] public string GetHeadTitleCount(GetMenuMemberListReq req) { return _memberHomePageService.GetHeadTitleCount(req, this.CurrentLogin); } #endregion #region GetFuGouMemberPageList(首单、复购、近7天新客会员分页列表) /// /// 首单、复购、近7天新客会员分页列表 0=首单 10=复购 表 21=近7天到店新客 /// /// /// [HttpPost] public PageResult GetFuGouMemberPageList(PagedSearch req) { return _memberHomePageService.GetFuGouMemberPageList(req, this.CurrentLogin); } #endregion #region GetFuGouMemberPageList(近7天老客会员分页列表) /// ///近7天老客会员分页列表 22=近7天到店老客列表 /// /// /// [HttpPost] public PageResult Get7DaysOldMemberPageList(PagedSearch req) { return _memberHomePageService.Get7DaysOldMemberPageList(req, this.CurrentLogin); } #endregion } }