168 lines
5.8 KiB
C#
168 lines
5.8 KiB
C#
using MyCode.Project.Domain.Message.Request.Report40;
|
|
using MyCode.Project.Domain.Message.Response.Common;
|
|
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 ManagerReport2207HeXinController : BaseWechatController
|
|
{
|
|
|
|
private IReport2207Service _report2207Service;
|
|
private IUserService _userService;
|
|
//private IReport40Service _report40Service;
|
|
/// <summary>
|
|
/// 初始化一个<see cref="GoodsController"/>类型的实例
|
|
/// </summary>
|
|
public ManagerReport2207HeXinController(IReport2207Service report2207Service
|
|
, IUserService userService
|
|
)
|
|
{
|
|
_userService = userService;
|
|
_report2207Service = report2207Service;
|
|
|
|
}
|
|
|
|
#region GetHeXinList(获取多个门店的年度核心指标)
|
|
/// <summary>
|
|
/// 获取多个门店的年度核心指标
|
|
/// </summary>
|
|
/// <param name="req"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
public PageResult<ManagerHeXinResp2207> GetHeXinList(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.GetManagerHeXinList2207(req);
|
|
}
|
|
#endregion
|
|
|
|
|
|
//#region GetShopHeXinList(获取单一门店的年度核心指标)
|
|
///// <summary>
|
|
///// 获取单一门店的年度核心指标
|
|
///// </summary>
|
|
///// <param name="shopHeXin2207Query"></param>
|
|
///// <returns></returns>
|
|
//[HttpPost]
|
|
//public List<ShopHeXinResp> GetShopHeXinList(ShopHeXin2207Query shopHeXin2207Query)
|
|
//{
|
|
// return _report2207Service.GetShopHeXinList(shopHeXin2207Query,2);
|
|
//}
|
|
//#endregion
|
|
|
|
|
|
|
|
#region GetYeJiList(获取多个门店的业绩面板)
|
|
/// <summary>
|
|
/// 获取多个门店的业绩面板
|
|
/// </summary>
|
|
/// <param name="req"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
public PageResult<ManagerYeJiResp2207> GetYeJiList(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.GetManagerYeJiList2207(req);
|
|
}
|
|
#endregion
|
|
|
|
#region GetTiYanTaoList(获取多个门店的体验套业面板)
|
|
/// <summary>
|
|
/// 获取多个门店的体验套业面板
|
|
/// </summary>
|
|
/// <param name="req"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
public PageResult<ManagerTiYanResp2207> GetTiYanTaoList(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.GetManagerTiYanTaoList2207(req);
|
|
}
|
|
#endregion
|
|
|
|
#region GetShopYeJiPangHang(获取店铺的业绩排行榜)
|
|
/// <summary>
|
|
/// 获取店铺的业绩排行榜
|
|
/// </summary>
|
|
/// <param name="req"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
public List<ShopYeJiPangHang2207> GetShopYeJiPangHang(ShopYeJiPangHang2207Query req)
|
|
{
|
|
if (req.IfAllShop == 1)
|
|
{
|
|
var ids = _userService.GetShopListByLoginId(this.CurrentLogin.UserId, this.CurrentLogin.RoleId, this.CurrentLogin.OrganizationId);
|
|
req.ShopIds = ids;
|
|
}
|
|
return _report2207Service.GetShopYeJiPangHang2207(req);
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region GetDuDaoList(获取督导的下拉列表数据)
|
|
/// <summary>
|
|
/// 获取督导的下拉列表数据
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public List<ItemResult> GetDuDaoList()
|
|
{
|
|
return _report2207Service.GetDuDaoList();
|
|
}
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
//#region
|
|
///// <summary>
|
|
///// 龙虎榜
|
|
///// </summary>
|
|
///// <returns></returns>
|
|
//[HttpGet]
|
|
//[AllowAnonymous]
|
|
//public void LongHuBang()
|
|
//{
|
|
// _report2207Service.LongHuBang();
|
|
//}
|
|
|
|
//#endregion
|
|
|
|
}
|
|
}
|