using MyCode.Project.Domain.Message.Request.Clerk; using MyCode.Project.Domain.Message.Request.Million; using MyCode.Project.Domain.Message.Request.Target; using MyCode.Project.Domain.Message.Request.User; using MyCode.Project.Domain.Message.Response.CardCover; using MyCode.Project.Domain.Message.Response.MillionPolicy; using MyCode.Project.Domain.Message.Response.Shop; using MyCode.Project.Domain.Message.Response.Target; using MyCode.Project.Domain.Message.Response.User; 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 { /// ///百万店--拓店指标 相关 /// public class MillionShopExtensionController : BaseWechatController { private IMillionShopExtensionService _millionShopExtensionService; /// /// 初始化一个类型的实例 /// public MillionShopExtensionController(IMillionShopExtensionService millionShopExtensionService) { _millionShopExtensionService = millionShopExtensionService; } #region GetShopMonthEx 获取店铺纳新月度与日指标 /// /// 获取店铺纳新月度与日指标 /// /// 店铺ID:加盟商查看时需传 /// 指标类型 0:月度 1:日指标 /// [HttpGet] public ExtensionResp GetShopMonthEx(Guid? ShopID,int TargetType) { ShopID = ShopID.HasValue ? ShopID : this.CurrentLogin.ShopId; return _millionShopExtensionService.GetShopMonthEx(ShopID.Value,TargetType); } #endregion #region SetMonthExDetail 设置店铺纳新月度与日指标 /// /// 设置店铺纳新月度与日指标 /// /// [HttpPost] public void SetMonthExDetail(ExtensionReq request) { request.ShopID = request.ShopID.HasValue ? request.ShopID.Value : this.CurrentLogin.ShopId; _millionShopExtensionService.SetMonthExDetail(request, this.CurrentLogin); } #endregion #region GetShopMonthInvite 获取店铺邀约月度与日指标 /// /// 获取店铺邀约月度与日指标 /// /// 店铺ID:加盟商查看时需传 /// 指标类型 0:月度 1:日指标 /// [HttpGet] public InviteResp GetShopMonthInvite(Guid? ShopID, int TargetType) { ShopID = ShopID.HasValue ? ShopID : this.CurrentLogin.ShopId; return _millionShopExtensionService.GetShopMonthInvite(ShopID.Value,TargetType); } #endregion #region SetMonthExDetail 设置店铺邀约月度与日指标 /// /// 设置店铺邀约月度与日指标 /// /// [HttpPost] public void SetMonthInviteDetail(InviteReq request) { request.ShopID = request.ShopID.HasValue ? request.ShopID.Value : this.CurrentLogin.ShopId; _millionShopExtensionService.SetMonthInviteDetail(request, this.CurrentLogin); } #endregion #region GetShopMonthNurse 获取店铺护理月度与日指标 /// /// 获取店铺护理月度与日指标 /// /// 店铺ID:加盟商查看时需传 /// 指标类型 0:月度 1:日指标 /// [HttpGet] public NurseResp GetShopMonthNurse(Guid? ShopID, int TargetType) { ShopID = ShopID.HasValue ? ShopID : this.CurrentLogin.ShopId; return _millionShopExtensionService.GetShopMonthNurse(ShopID.Value,TargetType); } #endregion #region SetMonthExDetail 设置店铺护理月度与日指标 /// /// 设置店铺护理月度与日指标 /// /// [HttpPost] public void SetMonthNurseDetail(NurseReq request) { request.ShopID = request.ShopID.HasValue ? request.ShopID.Value : this.CurrentLogin.ShopId; _millionShopExtensionService.SetMonthNurseDetail(request, this.CurrentLogin); } #endregion #region GetShopMonthExperience 获取店铺体验月度与日指标 /// /// 获取店铺体验月度与日指标 /// /// 店铺ID:加盟商查看时需传 /// 指标类型 0:月度 1:日指标 /// [HttpGet] public ExperienceResp GetShopMonthExperience(Guid? ShopID, int TargetType) { ShopID = ShopID.HasValue ? ShopID : this.CurrentLogin.ShopId; return _millionShopExtensionService.GetShopMonthExperience(ShopID.Value, TargetType); } #endregion #region SetMonthExDetail 设置店铺体验月度与日指标 /// /// 设置店铺体验月度与日指标 /// /// [HttpPost] public void SetMonthExperienceDetail(ExperienceReq request) { request.ShopID = request.ShopID.HasValue ? request.ShopID.Value : this.CurrentLogin.ShopId; _millionShopExtensionService.SetMonthExperienceDetail(request, this.CurrentLogin); } #endregion #region GetShopMonthFission 获取店铺裂变月度与日指标 /// /// 获取店铺裂变月度与日指标 /// /// 店铺ID:加盟商查看时需传 /// 指标类型 0:月度 1:日指标 /// [HttpGet] public FissionResp GetShopMonthFission(Guid? ShopID, int TargetType) { ShopID = ShopID.HasValue ? ShopID : this.CurrentLogin.ShopId; return _millionShopExtensionService.GetShopMonthFission(ShopID.Value, TargetType); } #endregion #region SetMonthFissionDetail 设置店铺裂变月度与日指标 /// /// 设置店铺裂变月度与日指标 /// /// [HttpPost] public void SetMonthFissionDetail(FissionReq request) { request.ShopID = request.ShopID.HasValue ? request.ShopID.Value : this.CurrentLogin.ShopId; _millionShopExtensionService.SetMonthFissionDetail(request, this.CurrentLogin); } #endregion #region GetShopMonthSheet 获取店铺核销月度与日指标 /// /// 获取店铺核销月度与日指标 /// /// 店铺ID:加盟商查看时需传 /// 指标类型 0:月度 1:日指标 /// [HttpGet] public FissionResp GetShopMonthSheet(Guid? ShopID, int TargetType) { ShopID = ShopID.HasValue ? ShopID : this.CurrentLogin.ShopId; return _millionShopExtensionService.GetShopMonthSheet(ShopID.Value, TargetType); } #endregion #region SetMonthSheetDetail 设置店铺核销月度与日指标 /// /// 设置店铺核销月度与日指标 /// /// [HttpPost] public void SetMonthSheetDetail(FissionReq request) { request.ShopID = request.ShopID.HasValue ? request.ShopID.Value : this.CurrentLogin.ShopId; _millionShopExtensionService.SetMonthSheetDetail(request, this.CurrentLogin); } #endregion #region GetClerkZHplan 消息-店员获取本人五项指标任务安排或查看本人五项指标数据 /// /// 消息-店员获取本人五项指标任务安排或查看本人五项指标数据 /// /// 消息任务公告主键ID /// 查看类型 0:本人任务 1:本人任务数据 /// [HttpGet] public ZHWorkResp GetClerkZHplan(Guid id,int type) { return _millionShopExtensionService.GetClerkZHplan(id,type,this.CurrentLogin); } #endregion #region GetClerkZHResult 消息-店员提交五项指标数据 /// /// 消息-店员提交五项指标数据 /// /// [HttpPost] public void GetClerkZHResult(ZHWorkResp request) { _millionShopExtensionService.GetClerkZHResult(request, this.CurrentLogin); } #endregion #region GetShopZHplan 消息-加盟商获取店铺早会指标安排 /// /// 消息-加盟商获取店铺早会指标安排 /// /// 消息任务公告主键ID /// [HttpGet] public ZHWCClerkResp GetShopZHplan(Guid id) { return _millionShopExtensionService.GetShopZHplan(id); } #endregion #region 门店今日业绩(新的站内消息内容) /// /// 门店今日业绩(新的站内消息内容) /// /// 店铺主键 [HttpGet] public Guid RefreshMessage(Guid shopId) { if (this.CurrentLogin.RoleType== Infrastructure.Enumeration.LoginRoleType.Clerk) { ClerkKPIInfo act = new ClerkKPIInfo(); act.ClerkID = this.CurrentLogin.ClerkId.Value; act.OpenId = null; act.Time = DateTime.Now; string json = JsonHelper.ToJson(act); _millionShopExtensionService.SendTodaySalesPerforClerk(json); return Guid.NewGuid(); } else { return _millionShopExtensionService.AddSysMessage(shopId, this.CurrentLogin.UserId, (int)this.CurrentLogin.RoleType, 0, DateTime.Now); } } #endregion //#region 门店今日业绩(新的站内消息内容) ///// ///// 门店今日业绩(新的站内消息内容) ///// ///// 店铺主键 //[AllowAnonymous] //public void AddSysMessage(Guid shopId, Guid loginId, int roleType) //{ // _millionShopExtensionService.AddSysMessage(shopId, loginId, roleType); //} //#endregion } }