254 lines
10 KiB
C#
254 lines
10 KiB
C#
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
|
||
{
|
||
/// <summary>
|
||
/// 数据中心的报表
|
||
/// </summary>
|
||
public class ReportController : BaseWechatController
|
||
{
|
||
private IMillionShopExtensionService _millionShopExtensionService;
|
||
private IShopActionLogService _shopActionLogService;
|
||
|
||
/// <summary>
|
||
/// 初始化一个<see cref="GoodsController"/>类型的实例
|
||
/// </summary>
|
||
public ReportController(IMillionShopExtensionService millionShopExtensionService
|
||
, IShopActionLogService shopActionLogService)
|
||
{
|
||
_millionShopExtensionService = millionShopExtensionService;
|
||
_shopActionLogService = shopActionLogService;
|
||
}
|
||
|
||
#region GetSalesPerformanceResp(店铺的数据中心的报表)
|
||
/// <summary>
|
||
/// 店铺的数据中心的报表
|
||
/// </summary>
|
||
/// <param name="req"></param>
|
||
/// <returns></returns>
|
||
[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(店员的数据中心的报表)
|
||
/// <summary>
|
||
/// 店员的数据中心的报表
|
||
/// </summary>
|
||
/// <param name="req"></param>
|
||
/// <returns></returns>
|
||
[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 个人数据中心的店员列表
|
||
/// <summary>
|
||
/// 个人数据中心的店员列表
|
||
/// </summary>
|
||
/// <param name="ShopID">月报选中的店铺</param>
|
||
/// <returns></returns>
|
||
[HttpGet]
|
||
public List<ClerkSelfListResp> GetClerkList(Guid ShopID)
|
||
{
|
||
return _millionShopExtensionService.GetClerkList(ShopID,CurrentLogin);
|
||
}
|
||
#endregion
|
||
|
||
#region GetBothSingle(获取店铺打造期间的月均单业绩)
|
||
/// <summary>
|
||
/// 获取店铺打造期间的月均单业绩
|
||
/// </summary>
|
||
/// <param name="shopId"></param>
|
||
/// <returns></returns>
|
||
[HttpGet]
|
||
[AllowAnonymous]
|
||
public decimal GetBothSingle(Guid shopId)
|
||
{
|
||
return _millionShopExtensionService.GetBothSingle(shopId);
|
||
}
|
||
#endregion
|
||
|
||
#region GetPartOfSomeShopsSalesPerformance(管理层查看多个店铺的时间范围内的业绩数据)
|
||
/// <summary>
|
||
/// 管理层查看多个店铺的时间范围内的业绩数据
|
||
/// </summary>
|
||
/// <param name="req"></param>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
public ManagementSalesPerformance GetPartOfSomeShopsSalesPerformance(SomeShopsSalesPerformancReq req)
|
||
{
|
||
return _millionShopExtensionService.GetPartOfSomeShopsSalesPerformance(req,this.CurrentLogin);
|
||
}
|
||
#endregion
|
||
|
||
#region GetShopDetailsT100PageList(T100智慧门店使用明细)
|
||
/// <summary>
|
||
/// T100智慧门店使用明细
|
||
/// </summary>
|
||
/// <param name="request"></param>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
public PageResult<ShopDetailsT100Resp> GetShopDetailsT100PageList(PagedSearch<ShopsSearchQuery> request)
|
||
{
|
||
return _millionShopExtensionService.GetShopDetailsT100PageList(request, this.CurrentLogin);
|
||
}
|
||
#endregion
|
||
|
||
#region GetShopDetailsForGeneralManagerPageList(销售总监、事业部总经理智慧门店使用明细)
|
||
/// <summary>
|
||
/// 销售总监、事业部总经理智慧门店使用明细
|
||
/// </summary>
|
||
/// <param name="request"></param>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
public PageResult<ShopDetailsGeneralManagerResp> GetShopDetailsForGeneralManagerPageList(PagedSearch<ShopsSearchForGeneralManagerQuery> request)
|
||
{
|
||
return _millionShopExtensionService.GetShopDetailsForGeneralManagerPageList(request, 1, this.CurrentLogin);
|
||
}
|
||
#endregion
|
||
|
||
//#region GetPerformanceDetailsForGeneralManagerPageList(销售总监、事业部总经理智慧门店的业绩明细--业绩明细)
|
||
///// <summary>
|
||
///// 销售总监、事业部总经理智慧门店的业绩明细--业绩明细
|
||
///// </summary>
|
||
///// <param name="request"></param>
|
||
///// <returns></returns>
|
||
//[HttpPost]
|
||
//public PageResult<ShopDetailsGeneralManagerResp> GetPerformanceDetailsForGeneralManagerPageList(PagedSearch<ShopsSearchForGeneralManagerQuery> request)
|
||
//{
|
||
// return _millionShopExtensionService.GetShopDetailsForGeneralManagerPageList(request, 2, this.CurrentLogin);
|
||
//}
|
||
//#endregion
|
||
|
||
#region GetAppletsCounts(获取使用智慧门店状态的店铺数)
|
||
/// <summary>
|
||
/// 获取使用智慧门店状态的店铺数
|
||
/// </summary>
|
||
/// <param name="query"></param>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
public AppletsFlagCount GetAppletsCounts(ShopsSearchForGeneralManagerQuery query)
|
||
{
|
||
return _millionShopExtensionService.GetAppletsCounts(query, this.CurrentLogin);
|
||
}
|
||
#endregion
|
||
|
||
#region GetAppletsAndMillionShopsReport(智慧门店使用情况统计、百万店打造)
|
||
/// <summary>
|
||
/// 智慧门店使用情况统计、百万店打造
|
||
/// </summary>
|
||
/// <param name="req"></param>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
public ManagementSalesPerformance1 GetAppletsAndMillionShopsReport(SomeShopsSalesPerformancReq req)
|
||
{
|
||
return _millionShopExtensionService.GetAppletsAndMillionShopsReport(req,this.CurrentLogin.UserId,this.CurrentLogin.RoleId);
|
||
}
|
||
#endregion
|
||
|
||
#region GetZoneList(获取区域下拉列表)
|
||
/// <summary>
|
||
/// 获取区域下拉列表
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
[HttpGet]
|
||
public List<ZoneItemsResp> GetZoneList()
|
||
{
|
||
return _millionShopExtensionService.GetZoneList();
|
||
}
|
||
#endregion
|
||
|
||
#region GetMillionShopsNewMemberSortPageList(百万店查询 销售总监、事业部总经理各项明细--纳新)
|
||
/// <summary>
|
||
/// 百万店查询 销售总监、事业部总经理各项明细--纳新
|
||
/// </summary>
|
||
/// <param name="request"></param>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
public PageResult<ShopDetailsNewMemberSortResp> GetMillionShopsNewMemberSortPageList(PagedSearch<ShopsSearchForGeneralManagerQuery> request)
|
||
{
|
||
return _millionShopExtensionService.GetMillionShopsNewMemberSortPageList(request, this.CurrentLogin);
|
||
}
|
||
#endregion
|
||
|
||
//#region GetT100AddNewsPageList(区经理、T100 各项明细--纳新)
|
||
///// <summary>
|
||
///// 区经理、T100 各项明细--纳新
|
||
///// </summary>
|
||
///// <param name="request"></param>
|
||
///// <returns></returns>
|
||
//[HttpPost]
|
||
//public PageResult<ShopDetailsNewMemberSortResp> GetT100AddNewsPageList(PagedSearch<ShopsSearchForGeneralManagerQuery> request )
|
||
//{
|
||
// return _millionShopExtensionService.GetT100AddNewsPageList(request,this.CurrentLogin);
|
||
//}
|
||
//#endregion
|
||
|
||
//#region GetShopDetailsAddNewMemberPageList(销售总监、事业部总经理各项统计--纳新)
|
||
///// <summary>
|
||
///// 销售总监、事业部总经理各项统计--纳新
|
||
///// </summary>
|
||
///// <param name="request"></param>
|
||
///// <returns></returns>
|
||
//[HttpPost]
|
||
//public PageResult<ShopDetailsNewMemberSortResp> GetShopDetailsAddNewMemberPageList(PagedSearch<ShopsSearchForGeneralManagerQuery> request)
|
||
//{
|
||
// return _millionShopExtensionService.GetShopDetailsAddNewMemberPageList(request, this.CurrentLogin);
|
||
//}
|
||
//#endregion
|
||
|
||
#region GetPerformanceOfMillionShopsGeneralManagerPageList(百万店查询 销售总监、事业部总经理各项明细--业绩)
|
||
/// <summary>
|
||
/// 百万店查询 销售总监、事业部总经理各项明细--业绩
|
||
/// </summary>
|
||
/// <param name="request"></param>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
public PageResult<ShopDetailsGeneralManagerResp> GetMillionShopsPerformanceGeneralManagerPageList(PagedSearch<ShopsSearchForGeneralManagerQuery> request)
|
||
{
|
||
return _millionShopExtensionService.GetMillionShopsPerformanceGeneralManagerPageList(request,this.CurrentLogin);
|
||
}
|
||
#endregion
|
||
|
||
//#region GetT100PerformancePageList(区经理、T100 各项明细--业绩)
|
||
///// <summary>
|
||
///// 区经理、T100 各项明细--业绩
|
||
///// </summary>
|
||
///// <param name="request"></param>
|
||
///// <returns></returns>
|
||
//[HttpPost]
|
||
//public PageResult<ShopDetailsGeneralManagerResp> GetT100PerformancePageList(PagedSearch<ShopsSearchForGeneralManagerQuery> request)
|
||
//{
|
||
// return _millionShopExtensionService.GetT100PerformancePageList(request, this.CurrentLogin);
|
||
//}
|
||
//#endregion
|
||
|
||
}
|
||
}
|