202 lines
7.7 KiB
C#
202 lines
7.7 KiB
C#
|
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
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// 2022年7月版本的总部管理者端业绩看板报表--服务+会员
|
|||
|
/// </summary>
|
|||
|
public class ManagerReport2207FuWuController : BaseWechatController
|
|||
|
{
|
|||
|
|
|||
|
private IReport2207Service _report2207Service;
|
|||
|
private IMemberHomePageService _memberHomePageService;
|
|||
|
private IUserService _userService;
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 初始化一个<see cref="GoodsController"/>类型的实例
|
|||
|
/// </summary>
|
|||
|
public ManagerReport2207FuWuController(IReport2207Service report2207Service
|
|||
|
, IMemberHomePageService memberHomePageService
|
|||
|
, IUserService userService
|
|||
|
)
|
|||
|
{
|
|||
|
_userService = userService;
|
|||
|
_memberHomePageService = memberHomePageService;
|
|||
|
_report2207Service = report2207Service;
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
#region GetFuWuList(获取多个门店的服务统计)
|
|||
|
/// <summary>
|
|||
|
/// 获取多个门店的服务统计
|
|||
|
/// </summary>
|
|||
|
/// <param name="req"></param>
|
|||
|
/// <returns></returns>
|
|||
|
[HttpPost]
|
|||
|
public PageResult<ManagerFuWuResp2207> GetFuWuList(PagedSearch<ManagerYeJi2207Query> 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(获取多个门店的会员门店概况)
|
|||
|
/// <summary>
|
|||
|
/// 获取多个门店的会员门店概况
|
|||
|
/// </summary>
|
|||
|
/// <param name="req"></param>
|
|||
|
/// <returns></returns>
|
|||
|
[HttpPost]
|
|||
|
public PageResult<ManagerHuiYuanResp2207> GetHuiYuanList(PagedSearch<ManagerYeJi2207Query> 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(获取多个门店的会员概况)
|
|||
|
/// <summary>
|
|||
|
/// 获取多个门店的会员概况
|
|||
|
/// </summary>
|
|||
|
/// <param name="req"></param>
|
|||
|
/// <returns></returns>
|
|||
|
[HttpPost]
|
|||
|
public PageResult<ManagerHuiYuanGaiKuangResp2207> GetHuiYuanGaiKuangList(PagedSearch<ManagerHeXin2207Query> 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(获取多个门店的资产概况)
|
|||
|
/// <summary>
|
|||
|
/// 获取多个门店的资产概况
|
|||
|
/// </summary>
|
|||
|
/// <param name="req"></param>
|
|||
|
/// <returns></returns>
|
|||
|
[HttpPost]
|
|||
|
public PageResult<ManagerZiChanGaiKuangResp2207> GetZiChanGaiKuangList(PagedSearch<ManagerHeXin2207Query> 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(获取活跃、沉睡、流水会员分页列表)
|
|||
|
/// <summary>
|
|||
|
///获取活跃、沉睡、流水会员分页列表 30=活跃 40=沉睡 50=流失
|
|||
|
/// </summary>
|
|||
|
/// <param name="req"></param>
|
|||
|
/// <returns></returns>
|
|||
|
[HttpPost]
|
|||
|
public PageResult2<LaberMemberListResp> GetLaberMemberPageList(PagedSearch<GetMenuMemberListReq> req)
|
|||
|
{
|
|||
|
return _memberHomePageService.GetLaberMemberPageList(req, this.CurrentLogin);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
|
|||
|
#region GetMemberLastOrderDetails(获取某会员的最近一单的消费明细)
|
|||
|
/// <summary>
|
|||
|
/// 获取某会员的最近一单的消费明细
|
|||
|
/// </summary>
|
|||
|
/// <param name="id"></param>
|
|||
|
/// <returns></returns>
|
|||
|
[HttpGet]
|
|||
|
public List<MemberLastOrderDetail> GetMemberLastOrderDetails(Guid id)
|
|||
|
{
|
|||
|
return _memberHomePageService.GetMemberLastOrderDetails(id);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
|
|||
|
#region GetHeadTitleCount(获取标题上的文字)
|
|||
|
/// <summary>
|
|||
|
///获取标题上的文字
|
|||
|
/// </summary>
|
|||
|
/// <param name="req"></param>
|
|||
|
/// <returns></returns>
|
|||
|
[HttpPost]
|
|||
|
public string GetHeadTitleCount(GetMenuMemberListReq req)
|
|||
|
{
|
|||
|
return _memberHomePageService.GetHeadTitleCount(req, this.CurrentLogin);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
|
|||
|
|
|||
|
#region GetFuGouMemberPageList(首单、复购、近7天新客会员分页列表)
|
|||
|
/// <summary>
|
|||
|
/// 首单、复购、近7天新客会员分页列表 0=首单 10=复购 表 21=近7天到店新客
|
|||
|
/// </summary>
|
|||
|
/// <param name="req"></param>
|
|||
|
/// <returns></returns>
|
|||
|
[HttpPost]
|
|||
|
public PageResult<FuGouMemberListResp> GetFuGouMemberPageList(PagedSearch<GetMenuMemberListReq> req)
|
|||
|
{
|
|||
|
return _memberHomePageService.GetFuGouMemberPageList(req, this.CurrentLogin);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region GetFuGouMemberPageList(近7天老客会员分页列表)
|
|||
|
/// <summary>
|
|||
|
///近7天老客会员分页列表 22=近7天到店老客列表
|
|||
|
/// </summary>
|
|||
|
/// <param name="req"></param>
|
|||
|
/// <returns></returns>
|
|||
|
[HttpPost]
|
|||
|
public PageResult<OldMember7Days> Get7DaysOldMemberPageList(PagedSearch<GetMenuMemberListReq> req)
|
|||
|
{
|
|||
|
return _memberHomePageService.Get7DaysOldMemberPageList(req, this.CurrentLogin);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
}
|