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 ShopReport2207HeXinController : BaseWechatController
{
private IReportPageList40Service _reportPageList40Service;
private IReport2207Service _report2207Service;
//private IReport40Service _report40Service;
///
/// 初始化一个类型的实例
///
public ShopReport2207HeXinController(IReport2207Service report2207Service
, IReportPageList40Service reportPageList40Service
)
{
_reportPageList40Service = reportPageList40Service;
_report2207Service = report2207Service;
//_report40Service = report40Service;
}
#region GetShopHeXinList(获取单一门店的年度核心指标)
///
/// 获取单一门店的年度核心指标
///
///
///
[HttpPost]
public List GetShopHeXinList(ShopHeXin2207Query shopHeXin2207Query)
{
int? zhiDingmodel = null;
if (this.CurrentLogin.RoleType == Infrastructure.Enumeration.LoginRoleType.Observer)
{
zhiDingmodel = 0;
}
return _report2207Service.GetShopHeXinList(shopHeXin2207Query, zhiDingmodel);
}
#endregion
#region GetShopYeJiReport(获取新、老客、散客业绩)
///
/// 获取新、老客、散客业绩
///
///
///
[HttpPost]
public ShopYeJiResp GetShopYeJiReport(ShopYeJi2207Query shopYeJi2207Query)
{
int? zhiDingmodel = null;
if (this.CurrentLogin.RoleType == Infrastructure.Enumeration.LoginRoleType.Observer)
{
zhiDingmodel = 0;
}
if (this.CurrentLogin.RoleType == Infrastructure.Enumeration.LoginRoleType.Clerk)
{
shopYeJi2207Query.ClerkId = this.CurrentLogin.ClerkId;
}
ShopYeJiResp result = new ShopYeJiResp();
result.ZoneYeJi = _report2207Service.GetJinRiYeJi(shopYeJi2207Query, zhiDingmodel);
var ke = _report2207Service.GetXinLaoKeReport(shopYeJi2207Query, zhiDingmodel);
result.XinKeTitle = ke.XinKeTitle;
result.LaoKeTitle = ke.LaoKeTitle;
result.SanKeTitle = ke.SanKeTitle;
result.XinKe = ke.XinKe;
result.LaoKe = ke.LaoKe;
result.SanKe = ke.SanKe;
result.LaoKeTabText = ke.LaoKeTabText;
result.XinKeTabText = ke.XinKeTabText;
result.SanKeTabText = ke.SanKeTabText;
result.IfShow = _report2207Service.IfShowShouGong(shopYeJi2207Query.ShopId);
return result;
}
#endregion
#region GetShopYeJiTongJi2207List(获取单店一年的业绩统计列表)
///
/// 获取单店一年的业绩统计列表
///
///
///
[HttpPost]
public List GetShopYeJiTongJiList(ShopHeXin2207Query shopHeXin2207Query)
{
int? zhiDingmodel = null;
if (this.CurrentLogin.RoleType == Infrastructure.Enumeration.LoginRoleType.Observer)
{
zhiDingmodel = 0;
}
if (this.CurrentLogin.RoleType == Infrastructure.Enumeration.LoginRoleType.Clerk)
{
shopHeXin2207Query.ClerkId = this.CurrentLogin.ClerkId;
}
return _report2207Service.GetYeJiTongJi2207List(shopHeXin2207Query, zhiDingmodel);
}
#endregion
#region GetShopDianYuanTongJi2207List(获取单店员工统计列表)
///
/// 获取单店员工统计列表
///
///
///
[HttpPost]
public List GetShopDianYuanTongJiList(ShopYeJi2207Query req)
{
int? zhiDingmodel = null;
if (this.CurrentLogin.RoleType == Infrastructure.Enumeration.LoginRoleType.Observer)
{
zhiDingmodel = 0;
}
if (this.CurrentLogin.RoleType == Infrastructure.Enumeration.LoginRoleType.Clerk)
{
req.ClerkId = this.CurrentLogin.ClerkId;
}
return _report2207Service.GetShopDianYuanTongJi2207List(req, zhiDingmodel);
}
#endregion
#region GetShopXiaoFeiMingXi(获取单店的会员消费明细)
///
/// 获取单店的会员消费明细
///
///
///
[HttpPost]
public List GetShopXiaoFeiMingXi(ShopRiYeJi2207Query req)
{
if (this.CurrentLogin.RoleType == Infrastructure.Enumeration.LoginRoleType.Clerk)
{
req.ClerkId = this.CurrentLogin.ClerkId;
}
return _report2207Service.GetShopXiaoFeiMingXi2207(req);
}
#endregion
#region GetSheetDetail(获取会员消费明细展开的订单明细)
///
/// 获取会员消费明细展开的订单明细
///
///
///
[HttpGet]
public List GetSheetDetail(Guid id)
{
return _reportPageList40Service.GetFuGouOrderDetail(id);
}
#endregion
#region ShopTiYanTaoYeJi(获取单店的体验套业绩列表)
///
/// 获取单店的体验套业绩列表
///
///
///
[HttpPost]
public List ShopTiYanTaoYeJi(ShopYeJi2207Query req)
{
if (this.CurrentLogin.RoleType == Infrastructure.Enumeration.LoginRoleType.Clerk)
{
req.ClerkId = this.CurrentLogin.ClerkId;
}
return _report2207Service.ShopTiYanTaoYeJi2207(req);
}
#endregion
#region GetShopRiTongJi(获取单店的日业绩统计分页列表)
///
/// 获取单店的日业绩统计分页列表
///
///
///
[HttpPost]
public PageResult GetShopRiTongJi(PagedSearch req)
{
if (this.CurrentLogin.RoleType == Infrastructure.Enumeration.LoginRoleType.Clerk)
{
req.Condition.ClerkId = this.CurrentLogin.ClerkId;
}
int? zhiDingmodel = null;
if (this.CurrentLogin.RoleType == Infrastructure.Enumeration.LoginRoleType.Observer)
{
zhiDingmodel = 0;
}
return _report2207Service.GetShopRiTongJi2207(req, zhiDingmodel);
}
#endregion
#region GetShopRiYeJiDetail(获取日统计列表的展开明细)
///
/// 获取日统计列表的展开明细
///
///
///
[HttpPost]
public List GetShopRiYeJiDetail(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.GetShopRiYeJiDetail2207(req, zhiDingmodel);
}
#endregion
#region GetShouGonFeiDetailsList(获取手工费明细列表)
///
/// 获取手工费明细列表
///
///
///
[HttpPost]
public List GetShouGonFeiList(ShopYeJi2207Query req)
{
if (this.CurrentLogin.RoleType == Infrastructure.Enumeration.LoginRoleType.Clerk)
{
req.ClerkId = this.CurrentLogin.ClerkId;
}
return _report2207Service.GetShouGonFeiList(req);
}
#endregion
#region GetKeFuConfig(获取联系客服二维码详情)
///
/// 获取联系客服二维码详情
///
///
[HttpGet]
public KeFuConfigView GetKeFuConfig()
{
return _report2207Service.GetKeFuConfig(this.CurrentLogin.MerchantId);
}
#endregion
#region GetShopDianYuanYjJiSort2302List(获取单店员工业绩排行榜)
///
/// 获取单店员工业绩排行榜
///
///
///
[HttpPost]
public List GetShopDianYuanYjJiSort2302List(ShopYeJi2207Query req)
{
int? zhiDingmodel = null;
if (this.CurrentLogin.RoleType == Infrastructure.Enumeration.LoginRoleType.Observer)
{
zhiDingmodel = 0;
}
if (this.CurrentLogin.RoleType == Infrastructure.Enumeration.LoginRoleType.Clerk)
{
req.ClerkId = this.CurrentLogin.ClerkId;
}
return _report2207Service.GetShopDianYuanYjJiSort2302List(req, zhiDingmodel);
}
#endregion
#region GetYeJiTabText(获取业绩看板的问号文案)
///
/// 获取业绩看板的问号文案
///
///
[HttpGet]
public List GetYeJiTabText()
{
List list = new List();
list.Add("总收款:门店实际总收款金额(订单实付金额+充值金额+预售金额)");
list.Add("总业绩:订单实付金额+消预存金额(不含充值)+预售转销售单金额");
list.Add("护肤业绩:购买护肤品类实付金额+消预存金额+预售转销售金额(护肤类产品,含套装商品如体验套,首单套等套装中的实物商品)");
list.Add("彩妆业绩:购买彩妆品实付金额+消预存金额+预售转销售金额(彩妆类产品)");
list.Add("饰品业绩:购买饰品类实付金额+消预存金额+预售转销售金额(发饰品类+首饰品类)");
list.Add("服务业绩:购买所有不包含产品销售的服务类项目的实付金额+消预存金额+预售转销售金额(如盘发,一次性化妆,修眉等仅提供服务不包含产品销售的服务类型)");
list.Add("其他业绩:购买除饰品类、化妆类、护肤类以外的其他实物产品(如工具类)的实付金额+消预存金额+预售转销售金额");
list.Add("吊牌价:统计销售实物商品的吊牌价格,不含服务类的");
return list;
}
#endregion
//#region AddTaskSetRpShopMemberAnalyzeLog2207(批量刷调度计算业绩新老客)
/////
///// 批量刷调度计算业绩新老客
/////
/////
/////
/////
//[HttpGet]
//public void AddTaskSetRpShopMemberAnalyzeLog2207(DateTime begin, DateTime end, Guid? shopId)
//{
// _report2207Service.AddTaskSetRpShopMemberAnalyzeLog2207(begin, end, shopId);
//}
//#endregion
}
}