using MyCode.Project.Domain.Message.Request.Million; using MyCode.Project.Domain.Message.Request.Report; using MyCode.Project.Domain.Message.Response.Report; using MyCode.Project.Domain.Message.Response.Shop; using MyCode.Project.Domain.Message.Response.User; using MyCode.Project.Infrastructure.Common; using MyCode.Project.Infrastructure.Enumeration; using MyCode.Project.Infrastructure.Extensions; using MyCode.Project.Services; using System; using System.Collections.Generic; using System.Web.Http; namespace MyCode.Project.WebApi.Areas.Wechat.Controllers { /// /// 数据中心的报表 /// public class ReportController : BaseWechatController { private IMillionShopExtensionService _millionShopExtensionService; private IShopActionLogService _shopActionLogService; /// /// 初始化一个类型的实例 /// public ReportController(IMillionShopExtensionService millionShopExtensionService , IShopActionLogService shopActionLogService) { _millionShopExtensionService = millionShopExtensionService; _shopActionLogService = shopActionLogService; } #region GetSalesPerformanceResp(店铺的数据中心的报表) /// /// 店铺的数据中心的报表 /// /// /// [HttpPost] public SalesPerformanceResp GetShopOfSalesPerformance(ShopSalesPerformancReq req) { var result= _millionShopExtensionService.GetShopOfSalesPerformance(req); //记录小程序操作 if (this.CurrentLogin.RoleType == LoginRoleType.CustomerID) _shopActionLogService.SetShopActionLog(req.ShopId, this.CurrentLogin.CustomerId.SafeValue(), 1, 11); else _shopActionLogService.SetShopActionLog(req.ShopId, this.CurrentLogin.ClerkId.SafeValue(), 2, 11); return result; } #endregion #region GetClerkOfSalesPerformance(店员的数据中心的报表) /// /// 店员的数据中心的报表 /// /// /// [HttpPost] public SalesPerformanceResp GetClerkOfSalesPerformance(ClerkOrCusSalesPerformancReq req) { if (this.CurrentLogin.RoleType == LoginRoleType.Clerk) { req.ClerkId = this.CurrentLogin.ClerkId.SafeValue(); } return _millionShopExtensionService.GetClerkOfSalesPerformance(req); } #endregion #region GetClerkList 个人数据中心的店员列表 /// /// 个人数据中心的店员列表 /// /// 月报选中的店铺 /// [HttpGet] public List GetClerkList(Guid ShopID) { return _millionShopExtensionService.GetClerkList(ShopID,CurrentLogin); } #endregion #region GetBothSingle(获取店铺打造期间的月均单业绩) /// /// 获取店铺打造期间的月均单业绩 /// /// /// [HttpGet] [AllowAnonymous] public decimal GetBothSingle(Guid shopId) { return _millionShopExtensionService.GetBothSingle(shopId); } #endregion #region GetPartOfSomeShopsSalesPerformance(管理层查看多个店铺的时间范围内的业绩数据) /// /// 管理层查看多个店铺的时间范围内的业绩数据 /// /// /// [HttpPost] public ManagementSalesPerformance GetPartOfSomeShopsSalesPerformance(SomeShopsSalesPerformancReq req) { return _millionShopExtensionService.GetPartOfSomeShopsSalesPerformance(req,this.CurrentLogin); } #endregion #region GetShopDetailsT100PageList(T100智慧门店使用明细) /// /// T100智慧门店使用明细 /// /// /// [HttpPost] public PageResult GetShopDetailsT100PageList(PagedSearch request) { return _millionShopExtensionService.GetShopDetailsT100PageList(request, this.CurrentLogin); } #endregion #region GetShopDetailsForGeneralManagerPageList(销售总监、事业部总经理智慧门店使用明细) /// /// 销售总监、事业部总经理智慧门店使用明细 /// /// /// [HttpPost] public PageResult GetShopDetailsForGeneralManagerPageList(PagedSearch request) { return _millionShopExtensionService.GetShopDetailsForGeneralManagerPageList(request, 1, this.CurrentLogin); } #endregion //#region GetPerformanceDetailsForGeneralManagerPageList(销售总监、事业部总经理智慧门店的业绩明细--业绩明细) ///// ///// 销售总监、事业部总经理智慧门店的业绩明细--业绩明细 ///// ///// ///// //[HttpPost] //public PageResult GetPerformanceDetailsForGeneralManagerPageList(PagedSearch request) //{ // return _millionShopExtensionService.GetShopDetailsForGeneralManagerPageList(request, 2, this.CurrentLogin); //} //#endregion #region GetAppletsCounts(获取使用智慧门店状态的店铺数) /// /// 获取使用智慧门店状态的店铺数 /// /// /// [HttpPost] public AppletsFlagCount GetAppletsCounts(ShopsSearchForGeneralManagerQuery query) { return _millionShopExtensionService.GetAppletsCounts(query, this.CurrentLogin); } #endregion #region GetAppletsAndMillionShopsReport(智慧门店使用情况统计、百万店打造) /// /// 智慧门店使用情况统计、百万店打造 /// /// /// [HttpPost] public ManagementSalesPerformance1 GetAppletsAndMillionShopsReport(SomeShopsSalesPerformancReq req) { return _millionShopExtensionService.GetAppletsAndMillionShopsReport(req,this.CurrentLogin.UserId,this.CurrentLogin.RoleId); } #endregion #region GetZoneList(获取区域下拉列表) /// /// 获取区域下拉列表 /// /// [HttpGet] public List GetZoneList() { return _millionShopExtensionService.GetZoneList(); } #endregion #region GetMillionShopsNewMemberSortPageList(百万店查询 销售总监、事业部总经理各项明细--纳新) /// /// 百万店查询 销售总监、事业部总经理各项明细--纳新 /// /// /// [HttpPost] public PageResult GetMillionShopsNewMemberSortPageList(PagedSearch request) { return _millionShopExtensionService.GetMillionShopsNewMemberSortPageList(request, this.CurrentLogin); } #endregion //#region GetT100AddNewsPageList(区经理、T100 各项明细--纳新) ///// ///// 区经理、T100 各项明细--纳新 ///// ///// ///// //[HttpPost] //public PageResult GetT100AddNewsPageList(PagedSearch request ) //{ // return _millionShopExtensionService.GetT100AddNewsPageList(request,this.CurrentLogin); //} //#endregion //#region GetShopDetailsAddNewMemberPageList(销售总监、事业部总经理各项统计--纳新) ///// ///// 销售总监、事业部总经理各项统计--纳新 ///// ///// ///// //[HttpPost] //public PageResult GetShopDetailsAddNewMemberPageList(PagedSearch request) //{ // return _millionShopExtensionService.GetShopDetailsAddNewMemberPageList(request, this.CurrentLogin); //} //#endregion #region GetPerformanceOfMillionShopsGeneralManagerPageList(百万店查询 销售总监、事业部总经理各项明细--业绩) /// /// 百万店查询 销售总监、事业部总经理各项明细--业绩 /// /// /// [HttpPost] public PageResult GetMillionShopsPerformanceGeneralManagerPageList(PagedSearch request) { return _millionShopExtensionService.GetMillionShopsPerformanceGeneralManagerPageList(request,this.CurrentLogin); } #endregion //#region GetT100PerformancePageList(区经理、T100 各项明细--业绩) ///// ///// 区经理、T100 各项明细--业绩 ///// ///// ///// //[HttpPost] //public PageResult GetT100PerformancePageList(PagedSearch request) //{ // return _millionShopExtensionService.GetT100PerformancePageList(request, this.CurrentLogin); //} //#endregion } }