using MyCode.Project.Domain.Message.Request.Report40;
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.Web.Http;
namespace MyCode.Project.WebApi.Areas.Wechat.Controllers
{
///
/// 2022年7月版本的门店端业绩看板报表--商品+分析页面
///
public class ShopReport2207ShangPinController : BaseWechatController
{
private IReport2207Service _report2207Service;
//private IReport40Service _report40Service;
///
/// 初始化一个类型的实例
///
public ShopReport2207ShangPinController(IReport2207Service report2207Service
)
{
_report2207Service = report2207Service;
//_report40Service = report40Service;
}
#region GetShopGoods(获取单店的商品中间面板统计数据)
///
/// 获取单店的商品中间面板统计数据
///
///
///
[HttpPost]
public ShopGoods2207 GetShopGoods(ShopYeJi2207Query req)
{
if (this.CurrentLogin.RoleType == Infrastructure.Enumeration.LoginRoleType.Clerk)
{
req.ClerkId = this.CurrentLogin.ClerkId;
}
return _report2207Service.GetShopGoods2207(req);
}
#endregion
#region GetShopGoodsPangHangBang(0=销售排行榜 1=护肤类 2=彩妆类 3=发饰类 4=其他类 5=服务)
///
/// 获取单店的商品销售0=销售排行榜 1=护肤类 2=彩妆类 3=发饰类 4=其他类 5=服务
///
///
///
[HttpPost]
public PageResult GetShopGoodsPangHangBang(PagedSearch req)
{
if (this.CurrentLogin.RoleType == Infrastructure.Enumeration.LoginRoleType.Clerk)
{
req.Condition.ClerkId = this.CurrentLogin.ClerkId;
}
return _report2207Service.GetShopGoodsPangHangBang2207(req);
}
#endregion
#region GetShopFenXiReport(获取单个或者多个店的分析页面的数据)
///
/// 获取单个或者多个店的分析页面的数据
///
///
///
[HttpPost]
public ShopFenXiReport2207 GetShopFenXiReport(ShopFenXiReport2207Query req)
{
return _report2207Service.GetShopFenXiReport2207(req);
}
#endregion
#region GetKPIDetail(获取单店的"门店指标"数据列表)
///
/// 获取单店的"门店指标"数据列表
///
///
///
[HttpPost]
public List GetKPIDetail(ShopRiYeJiDetail2207Query req)
{
if (this.CurrentLogin.RoleType == Infrastructure.Enumeration.LoginRoleType.Clerk)
{
req.ClerkId = this.CurrentLogin.ClerkId;
}
int? zhiDingmodel = null;
if (this.CurrentLogin.RoleType == Infrastructure.Enumeration.LoginRoleType.Observer)
{
zhiDingmodel = 0;
}
return _report2207Service.GetKPIDetail2207(req, zhiDingmodel);
}
#endregion
//[HttpGet]
//[AllowAnonymous]
//public DateTime test(DateTime ddd)
//{
// return ddd.AddMonths(-1);
//}
}
}