MeiSaiSiXieTongApi/MyCode.Project.WebApi/Areas/Wechat/Controllers/HuFuWangChangEveningSummaryController.cs
2025-04-24 18:31:27 +08:00

228 lines
10 KiB
C#

using MyCode.Project.Domain.Message.Act.Common;
using MyCode.Project.Domain.Message.Common;
using MyCode.Project.Domain.Message.Request.Goods;
using MyCode.Project.Domain.Message.Request.Million;
using MyCode.Project.Domain.Message.Response.Goods;
using MyCode.Project.Domain.Message.Response.HuFuWangChang;
using MyCode.Project.Domain.Message.Response.ManagersDay;
using MyCode.Project.Domain.Message.Response.OpeningCeremony;
using MyCode.Project.Domain.Model;
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 HuFuWangChangEveningSummaryController : BaseWechatController
{
private IManagersDayService _managersDayService;
private IHuFuWangChangService _huFuWangChangService;
private IShopActionLogService _shopActionLogService;
/// <summary>
/// 初始化一个<see cref="GoodsController"/>类型的实例
/// </summary>
public HuFuWangChangEveningSummaryController(IManagersDayService managersDayService
, IHuFuWangChangService huFuWangChangService
, IShopActionLogService shopActionLogService)
{
_managersDayService = managersDayService;
_huFuWangChangService = huFuWangChangService;
_shopActionLogService = shopActionLogService;
}
#region GetHuFuSingleExperienceForEveningSummary()
/// <summary>
/// 晚会总结获取店铺的所有店员的护肤单次体验目标
/// </summary>
[HttpGet]
public EveningSummaryResp GetHuFuSingleExperienceForEveningSummary(Guid shopId)
{
DateTime days = DateTime.Now.Date;
return _huFuWangChangService.GetHuFuSingleExperienceForEveningSummary(shopId, days);
}
#endregion
#region GetNymphCardForEveningSummary(99)
/// <summary>
/// 晚会总结获取店铺的所有店员的99女神卡目标
/// </summary>
[HttpGet]
public EveningSummaryResp GetNymphCardForEveningSummary(Guid shopId)
{
DateTime days = DateTime.Now.Date;
return _huFuWangChangService.GetNymphCardForEveningSummary(shopId, days);
}
#endregion
#region GetCardCoverKPIForEveningSummary()
/// <summary>
/// 晚会总结获取店铺的所有店员的套餐销售目标
/// </summary>
[HttpGet]
public EveningSummaryResp GetCardCoverKPIForEveningSummary(Guid shopId)
{
DateTime days = DateTime.Now.Date;
return _huFuWangChangService.GetCardCoverKPIForEveningSummary(shopId, days);
}
#endregion
#region GetOldMemberHandselForEveningSummary()
/// <summary>
/// 晚会总结获取店铺的所有店员的老顾客赠送体验次数目标
/// </summary>
[HttpGet]
public EveningSummaryResp GetOldMemberHandselForEveningSummary(Guid shopId)
{
DateTime days = DateTime.Now.Date;
return _huFuWangChangService.GetOldMemberHandselForEveningSummary(shopId, days);
}
#endregion
#region CheckHuFuSingleExperienceByStoreManager()
/// <summary>
/// 店长审核所有店员的护肤单次体验目标
/// </summary>
[HttpPost]
public void CheckHuFuSingleExperienceByStoreManager(CheckItems act )
{
DateTime days = DateTime.Now.Date;
_huFuWangChangService.CheckHuFuSingleExperience(act, 10, days);
//记录小程序操作
if (this.CurrentLogin.RoleType == LoginRoleType.CustomerID)
_shopActionLogService.SetShopActionLog(act.ShopId, this.CurrentLogin.CustomerId.SafeValue(), 1, 17);
else
_shopActionLogService.SetShopActionLog(act.ShopId, this.CurrentLogin.ClerkId.SafeValue(), 2, 17);
}
#endregion
#region CheckHuFuSingleExperienceByCustomer()
/// <summary>
/// 加盟商审核所有店员的护肤单次体验目标
/// </summary>
[HttpPost]
public void CheckHuFuSingleExperienceByCustomer(CheckItems act)
{
DateTime days = DateTime.Now.Date;
_huFuWangChangService.CheckHuFuSingleExperience(act, 100, days);
//记录小程序操作
if (this.CurrentLogin.RoleType == LoginRoleType.CustomerID)
_shopActionLogService.SetShopActionLog(act.ShopId, this.CurrentLogin.CustomerId.SafeValue(), 1, 17);
else
_shopActionLogService.SetShopActionLog(act.ShopId, this.CurrentLogin.ClerkId.SafeValue(), 2, 17);
}
#endregion
#region CheckNymphCardByStoreManager(99)
/// <summary>
/// 店长审核所有店员的99女神卡目标
/// </summary>
[HttpPost]
public void CheckNymphCardByStoreManager(CheckItems act)
{
DateTime days = DateTime.Now.Date;
_huFuWangChangService.CheckNymphCard(act, 10, days);
//记录小程序操作
if (this.CurrentLogin.RoleType == LoginRoleType.CustomerID)
_shopActionLogService.SetShopActionLog(act.ShopId, this.CurrentLogin.CustomerId.SafeValue(), 1, 17);
else
_shopActionLogService.SetShopActionLog(act.ShopId, this.CurrentLogin.ClerkId.SafeValue(), 2, 17);
}
#endregion
#region CheckNymphCardByCustomer(99)
/// <summary>
/// 加盟商审核所有店员的99女神卡目标
/// </summary>
[HttpPost]
public void CheckNymphCardByCustomer(CheckItems act)
{
DateTime days = DateTime.Now.Date;
_huFuWangChangService.CheckNymphCard(act, 100, days);
//记录小程序操作
if (this.CurrentLogin.RoleType == LoginRoleType.CustomerID)
_shopActionLogService.SetShopActionLog(act.ShopId, this.CurrentLogin.CustomerId.SafeValue(), 1, 17);
else
_shopActionLogService.SetShopActionLog(act.ShopId, this.CurrentLogin.ClerkId.SafeValue(), 2, 17);
}
#endregion
#region CheckMemberHandselByStoreManager()
/// <summary>
/// 店长审核所有店员的老顾客赠送体验次数目标
/// </summary>
[HttpPost]
public void CheckMemberHandselByStoreManager(CheckItems act)
{
DateTime days = DateTime.Now.Date;
_huFuWangChangService.CheckMemberHandsel(act, 10, days);
//记录小程序操作
if (this.CurrentLogin.RoleType == LoginRoleType.CustomerID)
_shopActionLogService.SetShopActionLog(act.ShopId, this.CurrentLogin.CustomerId.SafeValue(), 1, 17);
else
_shopActionLogService.SetShopActionLog(act.ShopId, this.CurrentLogin.ClerkId.SafeValue(), 2, 17);
}
#endregion
#region CheckMemberHandselByCustomer()
/// <summary>
/// 加盟商审核所有店员的老顾客赠送体验次数目标
/// </summary>
[HttpPost]
public void CheckMemberHandselByCustomer(CheckItems act)
{
DateTime days = DateTime.Now.Date;
_huFuWangChangService.CheckMemberHandsel(act, 100, days);
//记录小程序操作
if (this.CurrentLogin.RoleType == LoginRoleType.CustomerID)
_shopActionLogService.SetShopActionLog(act.ShopId, this.CurrentLogin.CustomerId.SafeValue(), 1, 17);
else
_shopActionLogService.SetShopActionLog(act.ShopId, this.CurrentLogin.ClerkId.SafeValue(), 2, 17);
}
#endregion
#region CheckCardCoverByStoreManager()
/// <summary>
/// 店长审核所有店员的套餐销售目标
/// </summary>
[HttpPost]
public void CheckCardCoverByStoreManager(CheckItems act)
{
DateTime days = DateTime.Now.Date;
_huFuWangChangService.CheckCardCover(act, 10, days);
//记录小程序操作
if (this.CurrentLogin.RoleType == LoginRoleType.CustomerID)
_shopActionLogService.SetShopActionLog(act.ShopId, this.CurrentLogin.CustomerId.SafeValue(), 1, 17);
else
_shopActionLogService.SetShopActionLog(act.ShopId, this.CurrentLogin.ClerkId.SafeValue(), 2, 17);
}
#endregion
#region CheckCardCoverByCustomer()
/// <summary>
/// 加盟商审核审核所有店员的套餐销售目标
/// </summary>
[HttpPost]
public void CheckCardCoverByCustomer(CheckItems act)
{
DateTime days = DateTime.Now.Date;
_huFuWangChangService.CheckCardCover(act, 100, days);
//记录小程序操作
if (this.CurrentLogin.RoleType == LoginRoleType.CustomerID)
_shopActionLogService.SetShopActionLog(act.ShopId, this.CurrentLogin.CustomerId.SafeValue(), 1, 17);
else
_shopActionLogService.SetShopActionLog(act.ShopId, this.CurrentLogin.ClerkId.SafeValue(), 2, 17);
}
#endregion
}
}