333
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
using MyCode.Project.WebApi.Controllers;
|
||||
using MyCode.Project.Domain.Message.Response.User;
|
||||
using Newtonsoft.Json;
|
||||
using System.Threading;
|
||||
using MyCode.Project.Infrastructure.Constant;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace MyCode.Project.WebApi.Areas.Admin.Controllers
|
||||
{
|
||||
public class BaseAdminController : BaseAPIController
|
||||
{
|
||||
/// <summary>
|
||||
/// 取得登录信息
|
||||
/// </summary>
|
||||
protected AdminLoginInfo CurrentLogin
|
||||
{
|
||||
get
|
||||
{
|
||||
var obj = this.RequestContext.RouteData.Values[Const.LoginInfoKey];
|
||||
|
||||
return JsonConvert.DeserializeObject<AdminLoginInfo>(obj.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
using MyCode.Project.Domain.Dtos.Request.Act;
|
||||
using MyCode.Project.Domain.Message.Act.PurchaseOrder;
|
||||
using MyCode.Project.Domain.Message.Common;
|
||||
using MyCode.Project.Domain.Message.Request.InvoiceOrder;
|
||||
using MyCode.Project.Domain.Message.Request.PurchaseOrder;
|
||||
using MyCode.Project.Domain.Message.Request.User;
|
||||
using MyCode.Project.Domain.Message.Response.InvoiceOrder;
|
||||
using MyCode.Project.Domain.Message.Response.PurchaseOrder;
|
||||
using MyCode.Project.Infrastructure.Common;
|
||||
using MyCode.Project.Infrastructure.Extensions;
|
||||
using MyCode.Project.Repositories.Common;
|
||||
using MyCode.Project.Services;
|
||||
using System.Collections.Generic;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace MyCode.Project.WebApi.Areas.Admin.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 系统配置相关
|
||||
/// </summary>
|
||||
public class GlobalSwitchController : BaseAdminController
|
||||
{
|
||||
private IGlobalSwitchService _globalSwitchService;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="globalSwitchService"></param>
|
||||
public GlobalSwitchController(IGlobalSwitchService globalSwitchService
|
||||
)
|
||||
{
|
||||
_globalSwitchService = globalSwitchService;
|
||||
}
|
||||
|
||||
#region SavePosAppVersionConfig(保存版本配置信息)
|
||||
/// <summary>
|
||||
/// 保存版本配置信息
|
||||
/// </summary>
|
||||
/// <param name="act"></param>
|
||||
[HttpPost]
|
||||
public void SavePosAppVersionConfig(PosAppVersionConfigAct act)
|
||||
{
|
||||
_globalSwitchService.SavePosAppVersionConfig(act);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region SavePosAppVersionConfig(获取版本号配置信息)
|
||||
/// <summary>
|
||||
/// 获取版本号配置信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public PosAppVersionConfigAct GetAppVersionConfig()
|
||||
{
|
||||
return _globalSwitchService.GetPosAppVersionConfig();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region GetAppVersionConfig(获取版本号配置信息For Pda)
|
||||
/// <summary>
|
||||
/// 获取版本号配置信息For Pda
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[AllowAnonymous]
|
||||
public PosAppVersionConfigAct GetAppVersion(string key)
|
||||
{
|
||||
if (key.ToUpper() == "A9E45EED-E6F2-4276-8554-AF3055CA0512")
|
||||
return _globalSwitchService.GetPosAppVersionConfig();
|
||||
else
|
||||
return null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
using MyCode.Project.Domain.Message.Act.PurchaseOrder;
|
||||
using MyCode.Project.Domain.Message.Common;
|
||||
using MyCode.Project.Domain.Message.Request.InvoiceOrder;
|
||||
using MyCode.Project.Domain.Message.Request.PurchaseOrder;
|
||||
using MyCode.Project.Domain.Message.Request.User;
|
||||
using MyCode.Project.Domain.Message.Response.InvoiceOrder;
|
||||
using MyCode.Project.Domain.Message.Response.PurchaseOrder;
|
||||
using MyCode.Project.Domain.Message.Response.User;
|
||||
using MyCode.Project.Infrastructure.Common;
|
||||
using MyCode.Project.Infrastructure.Extensions;
|
||||
using MyCode.Project.Repositories.Common;
|
||||
using MyCode.Project.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace MyCode.Project.WebApi.Areas.Admin.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 发货通知单相关
|
||||
/// </summary>
|
||||
public class InvoiceOrderController : BaseAdminController
|
||||
{
|
||||
private IInvoiceOrderService _invoiceOrderService;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="invoiceOrderService"></param>
|
||||
public InvoiceOrderController(IInvoiceOrderService invoiceOrderService
|
||||
)
|
||||
{
|
||||
_invoiceOrderService = invoiceOrderService;
|
||||
}
|
||||
|
||||
#region GetPageList(发货通知单分页列表查询)
|
||||
/// <summary>
|
||||
/// 发货通知单分页列表查询
|
||||
/// </summary>
|
||||
/// <param name="pagedSearch"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public PageResult<InvoiceOrderPageList> GetPageList(PagedSearch<InvoiceOrderPageSearch> pagedSearch)
|
||||
{
|
||||
return _invoiceOrderService.GetPageList(pagedSearch, this.CurrentLogin);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region DeleteOrder(删除某个发货订单)
|
||||
/// <summary>
|
||||
/// 删除某个发货订单
|
||||
/// </summary>
|
||||
/// <param name="act"></param>
|
||||
[HttpPost]
|
||||
public void DeleteOrder(IdAct act )
|
||||
{
|
||||
_invoiceOrderService.DeleteOrder(act,this.CurrentLogin);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
158
MyCode.Project.WebApi/Areas/Admin/Controllers/LoginController.cs
Normal file
158
MyCode.Project.WebApi/Areas/Admin/Controllers/LoginController.cs
Normal file
@@ -0,0 +1,158 @@
|
||||
using MyCode.Project.Domain.Message.Act.User;
|
||||
using MyCode.Project.Domain.Message.Common;
|
||||
using MyCode.Project.Domain.Message.Request.User;
|
||||
using MyCode.Project.Domain.Message.Response.Common;
|
||||
using MyCode.Project.Domain.Message.Response.User;
|
||||
using MyCode.Project.Infrastructure.Common;
|
||||
using MyCode.Project.Infrastructure.Enumeration;
|
||||
using MyCode.Project.Infrastructure.Exceptions;
|
||||
using MyCode.Project.Services;
|
||||
using MyCode.Project.Services.Implementation;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Http;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace MyCode.Project.WebApi.Areas.Admin.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 账号相关
|
||||
/// </summary>
|
||||
public class LoginController : BaseAdminController
|
||||
{
|
||||
private ISysLoginService _sysLoginService;
|
||||
private IPurchaseOrderService _purchaseOrderService;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sysLoginService"></param>
|
||||
public LoginController(ISysLoginService sysLoginService
|
||||
, IPurchaseOrderService purchaseOrderService
|
||||
)
|
||||
{
|
||||
_purchaseOrderService = purchaseOrderService;
|
||||
_sysLoginService = sysLoginService;
|
||||
}
|
||||
|
||||
#region Login(账号登陆)
|
||||
/// <summary>
|
||||
/// 账号登陆
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
|
||||
public string Login(GetTokenRequest request)
|
||||
{
|
||||
return _sysLoginService.Login(request);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region GetPageList(获取分页列表)
|
||||
/// <summary>
|
||||
/// 获取分页列表
|
||||
/// </summary>
|
||||
/// <param name="search"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public PageResult<AccountPageList> GetPageList(PagedSearch<SysLoginPageSearch> search)
|
||||
{
|
||||
return _sysLoginService.GetPageList(search,this.CurrentLogin);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Save(保存账号)
|
||||
/// <summary>
|
||||
/// 保存账号
|
||||
/// </summary>
|
||||
/// <param name="act"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public void Save(SysloginAct act)
|
||||
{
|
||||
if (this.CurrentLogin.RoleType == 1)
|
||||
_sysLoginService.Save(act, this.CurrentLogin);
|
||||
else
|
||||
{
|
||||
throw new BaseException("只有管理员才能新建账号");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Save(供应商修改自己的密码)
|
||||
/// <summary>
|
||||
/// 供应商修改自己的密码
|
||||
/// </summary>
|
||||
/// <param name="pwd">密码</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public void UpPassword(string pwd)
|
||||
{
|
||||
_sysLoginService.UpPassword(pwd, this.CurrentLogin);
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 获取供应商列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpGet]
|
||||
public List<ItemResult> GetBDSupplierList()
|
||||
{
|
||||
var result = _purchaseOrderService.GetBDSupplierList();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取金蝶系统的采购组织
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpGet]
|
||||
public List<ItemResult> GetFPurchaseOrgList()
|
||||
{
|
||||
var result = _purchaseOrderService.GetFPurchaseOrgList();
|
||||
return result;
|
||||
}
|
||||
|
||||
#region GetAccountInfo(获取已登录的账号信息)
|
||||
/// <summary>
|
||||
/// 获取已登录的账号信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpGet]
|
||||
public AccountInfo GetAccountInfo()
|
||||
{
|
||||
var loginInfo = this.CurrentLogin;
|
||||
AccountInfo result = new AccountInfo();
|
||||
result.SupplierName = loginInfo.SupplierName;
|
||||
result.Name = loginInfo.Name;
|
||||
result.RoleType = loginInfo.RoleType;
|
||||
result.IfForeign = loginInfo.IfForeign;
|
||||
return result;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region BatchUpdateStatus(批量更新账号状态)
|
||||
/// <summary>
|
||||
/// 批量更新账号状态
|
||||
/// </summary>
|
||||
/// <param name="act"></param>
|
||||
[HttpPost]
|
||||
public void BatchUpdateStatus(StatusAct act)
|
||||
{
|
||||
if (this.CurrentLogin.RoleType == 1)
|
||||
_sysLoginService.BatchUpdateStatus(act, act.Status);
|
||||
else
|
||||
{
|
||||
throw new BaseException("只有管理员才能启用/禁用账号");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
using MyCode.Project.Domain.Message.Response.User;
|
||||
using MyCode.Project.Infrastructure.Constant;
|
||||
using MyCode.Project.WebApi.Controllers;
|
||||
using MyCode.Project.Domain.Config;
|
||||
using MyCode.Project.Services;
|
||||
using MyCode.Project.Infrastructure.Common;
|
||||
using MyCode.Project.Domain.Message.Request.User;
|
||||
using MyCode.Project.Infrastructure.Enumeration;
|
||||
using MyCode.Project.Domain.Message.Act.User;
|
||||
using MyCode.Project.Domain.Message.Response.Goods;
|
||||
using MyCode.Project.Domain.Model;
|
||||
using MyCode.Project.Domain.Message.Response.Common;
|
||||
using MyCode.Project.Domain.Businesses.BillKeeping;
|
||||
using MyCode.Project.Domain.Message.Response.Member;
|
||||
using MyCode.Project.Domain.Message.Response.WebSocket;
|
||||
using MyCode.Project.Domain.Message.Response.Chat;
|
||||
using MyCode.Project.Domain.Message.Request.WebSocket;
|
||||
using MyCode.Project.Domain.Message.Request.PerformanceRecord;
|
||||
using MyCode.Project.Domain.Message.Response.ZhaoShang;
|
||||
using MyCode.Project.Domain.Message.Act.Report2301;
|
||||
using MyCode.Project.Domain.Message.Request.Report40;
|
||||
using MyCode.Project.Domain.Message.Response.Report40;
|
||||
using Senparc.NeuChar.NeuralSystems;
|
||||
|
||||
namespace MyCode.Project.WebApi.Areas.Admin.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// mysql数据库的报表系统相关,仅供系统内部调用
|
||||
/// </summary>
|
||||
public class LxmReportApiController : BaseAdminController
|
||||
{
|
||||
private IUserService _userService;
|
||||
private IReport2308Service _report2308Service;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="userService"></param>
|
||||
public LxmReportApiController(IUserService userService
|
||||
, IReport2308Service report2308Service )
|
||||
{
|
||||
_userService = userService;
|
||||
_report2308Service = report2308Service;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#region GetShopListByLoginId(根据账号ID获取店铺权限数组)
|
||||
/// <summary>
|
||||
/// 根据账号ID获取店铺权限数组
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
|
||||
public List<Guid> GetShopListByLoginId(BfyApiKeyAct request)
|
||||
{
|
||||
if (request.LxmZHMDReportKey.ToLower() == Const.LxmZHMDReportKey.ToLower())
|
||||
{
|
||||
return _userService.GetShopListByLoginIdForReport(request.Json);
|
||||
}
|
||||
return
|
||||
null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region GetUserOrganizationTrees(获取树形结构的某账号下的组织架构用户)
|
||||
/// <summary>
|
||||
/// 获取树形结构的某账号下的组织架构用户
|
||||
/// </summary>
|
||||
/// <param name="req">组织ID,初始本人传"-1"</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
public List<UserOrganizationTree> GetUserOrganizationTrees(BfyApiKeyAct request)
|
||||
{
|
||||
if (request.LxmZHMDReportKey.ToLower() == Const.LxmZHMDReportKey.ToLower())
|
||||
{
|
||||
var req = JsonHelper.ToObject<GetUserOrganizationTrees>(request.Json);
|
||||
Guid userId = Guid.Empty;
|
||||
if (req.UserId.HasValue)
|
||||
{
|
||||
userId = req.UserId.Value;
|
||||
}
|
||||
|
||||
return _report2308Service.GetUserOrganizationTrees(req.OrganizationId, userId);
|
||||
}
|
||||
return
|
||||
null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region QuYuZongLan2308(区域方块数据查询)
|
||||
/// <summary>
|
||||
/// 区域方块数据查询
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
public QuYuZongLan2308 QuYuZongLan(BfyApiKeyAct request)
|
||||
{
|
||||
if (request.LxmZHMDReportKey.ToLower() == Const.LxmZHMDReportKey.ToLower())
|
||||
{
|
||||
QuYu2308Query req = JsonHelper.ToObject<QuYu2308Query>(request.Json);
|
||||
var condition = req;
|
||||
//按区域类型,今日和月分别查询
|
||||
if (req.OrganizationId == null && (req.ShopIds.Count == 0 || req.ShopIds == null) && req.IfAllShop == 1
|
||||
|| (req.IfAllShop == 0 && condition.LabelQuery != null && condition.LabelQuery.SearchType > 0 && condition.LabelQuery.LabelIds.Count > 0))
|
||||
{
|
||||
var ids = _userService.GetShopListByLoginId(request.loginInfo.UserId, request.loginInfo.RoleId, request.loginInfo.OrganizationId);
|
||||
req.ShopIds = ids;
|
||||
}
|
||||
return _report2308Service.QuYuZongLan2308(req);
|
||||
}
|
||||
return
|
||||
null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
using MyCode.Project.Domain.Message.Act.Report2301;
|
||||
using MyCode.Project.Domain.Message.Act.SalesSheetPay;
|
||||
using MyCode.Project.Domain.Message.Request.Goods;
|
||||
using MyCode.Project.Domain.Message.Response.Goods;
|
||||
using MyCode.Project.Domain.Message.Response.Report40;
|
||||
using MyCode.Project.Domain.Message.Response.User;
|
||||
using MyCode.Project.Infrastructure.Common;
|
||||
using MyCode.Project.Infrastructure.Constant;
|
||||
using MyCode.Project.Infrastructure.Extensions;
|
||||
using MyCode.Project.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace MyCode.Project.WebApi.Areas.Admin.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// POS机调用的相关接口,仅供系统内部调用
|
||||
/// </summary>
|
||||
public class LxmShopApiController : BaseAdminController
|
||||
{
|
||||
|
||||
private ISalesSheetService _salesSheetService;
|
||||
private ISalesSheetPayService _salesSheetPayService;
|
||||
private IReport40Service _report40Service;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="salesSheetService"></param>
|
||||
/// <param name="salesSheetPayService"></param>
|
||||
public LxmShopApiController(ISalesSheetService salesSheetService
|
||||
, ISalesSheetPayService salesSheetPayService,
|
||||
IReport40Service report40Service)
|
||||
{
|
||||
|
||||
_salesSheetService = salesSheetService;
|
||||
_salesSheetPayService = salesSheetPayService;
|
||||
_report40Service = report40Service;
|
||||
}
|
||||
|
||||
#region GetDetailListByCode(根据抖音码获取对应的商品列表)
|
||||
/// <summary>
|
||||
/// 根据抖音码获取对应的商品列表
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
|
||||
public List<TuanGouGoodsPageListResp> GetDetailListByCode(BfyApiKeyAct request)
|
||||
{
|
||||
if (request.LxmZHMDReportKey.ToLower() == Const.LxmSysTemReportKey.ToLower())
|
||||
{
|
||||
var act = JsonHelper.ToObject<DouYinUrlAct>(request.Json);
|
||||
return _salesSheetService.GetDetailListByCode(act.Code,act.ShopId);
|
||||
}
|
||||
return
|
||||
null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region TuanGouConfirmPayOnline( 确认结账(用于对接了抖音的店铺团购核销码支付))
|
||||
/// <summary>
|
||||
/// 确认结账(用于对接了抖音的店铺团购核销码支付)
|
||||
/// </summary>
|
||||
/// <param name="request"> </param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
public Guid? TuanGouConfirmPayOnline(BfyApiKeyAct request)
|
||||
{
|
||||
if (request.LxmZHMDReportKey.ToLower() == Const.LxmSysTemReportKey.ToLower())
|
||||
{
|
||||
var req = JsonHelper.ToObject<TuanGouConfirmPayOnlineAct>(request.Json);
|
||||
LoginInfo loginInfo = req.CurrentLoginInfo;
|
||||
req.Act.ShopId = loginInfo.ShopId.SafeValue();
|
||||
return _salesSheetPayService.TuanGouConfirmPayOnline(req.Act, loginInfo);
|
||||
}
|
||||
return
|
||||
null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
///// <summary>
|
||||
///// 获取店铺与带教师的数据
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//[HttpGet]
|
||||
//public List<ShopDaiJiaoShi> GetShopDaiJiaoShiList()
|
||||
//{
|
||||
// return _report40Service.GetShopDaiJiaoShiList();
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
using MyCode.Project.Domain.Message.Act.PurchaseOrder;
|
||||
using MyCode.Project.Domain.Message.Common;
|
||||
using MyCode.Project.Domain.Message.Request.PurchaseOrder;
|
||||
using MyCode.Project.Domain.Message.Request.User;
|
||||
using MyCode.Project.Domain.Message.Response.PurchaseOrder;
|
||||
using MyCode.Project.Infrastructure.Common;
|
||||
using MyCode.Project.Infrastructure.Exceptions;
|
||||
using MyCode.Project.Infrastructure.Extensions;
|
||||
using MyCode.Project.Repositories.Common;
|
||||
using MyCode.Project.Services;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace MyCode.Project.WebApi.Areas.Admin.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 采购订单相关
|
||||
/// </summary>
|
||||
public class PurchaseOrderController : BaseAdminController
|
||||
{
|
||||
private IPurchaseOrderService _purchaseOrderService;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="purchaseOrderService"></param>
|
||||
public PurchaseOrderController(IPurchaseOrderService purchaseOrderService
|
||||
)
|
||||
{
|
||||
_purchaseOrderService = purchaseOrderService;
|
||||
}
|
||||
|
||||
#region GetPageList(采购订单分页列表查询)
|
||||
/// <summary>
|
||||
/// 采购订单分页列表查询
|
||||
/// </summary>
|
||||
/// <param name="pagedSearch"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public PageResult<PurchaseOrderPageList> GetPageList(PagedSearch<PurchaseOrderPageSearch> pagedSearch)
|
||||
{
|
||||
return _purchaseOrderService.GetPageList(pagedSearch, this.CurrentLogin);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region GetPurchaseOrderItemList(根据采购订单FID获取明细列表)
|
||||
/// <summary>
|
||||
/// 根据采购订单FID获取明细列表
|
||||
/// </summary>
|
||||
/// <param name="search"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public List<PurchaseOrderItemList> GetPurchaseOrderItemList(PurchaseOrderItemSearch search)
|
||||
{
|
||||
return _purchaseOrderService.GetPurchaseOrderItemList(search, this.CurrentLogin);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region BatchSetChengNuoJiaoQi(批量修改供应商承诺交期字段)
|
||||
/// <summary>
|
||||
/// 批量修改供应商承诺交期字段
|
||||
/// </summary>
|
||||
/// <param name="updateList"></param>
|
||||
[HttpPost]
|
||||
public void BatchSetChengNuoJiaoQi(List<UpdateTime> updateList)
|
||||
{
|
||||
if (this.CurrentLogin.RoleType == 1)
|
||||
{
|
||||
throw new BaseException("管理员只能查看数据");
|
||||
}
|
||||
_purchaseOrderService.BatchSetChengNuoJiaoQi(updateList, this.CurrentLogin.SupplierId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region BatchSetNewChengNuoJiaoQi(批量修改供应商承诺最新交期字段)
|
||||
/// <summary>
|
||||
/// 批量修改供应商承诺最新交期字段
|
||||
/// </summary>
|
||||
/// <param name="updateList"></param>
|
||||
[HttpPost]
|
||||
public void BatchSetNewChengNuoJiaoQi(List<UpdateTime> updateList)
|
||||
{
|
||||
if (this.CurrentLogin.RoleType == 1)
|
||||
{
|
||||
throw new BaseException("管理员只能查看数据");
|
||||
}
|
||||
_purchaseOrderService.BatchSetNewChengNuoJiaoQi(updateList, this.CurrentLogin.SupplierId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region BatchAddInvoiceOrder(选中明细生成发货通知单)
|
||||
/// <summary>
|
||||
/// 选中明细生成发货通知单
|
||||
/// </summary>
|
||||
/// <param name="updateList"></param>
|
||||
[HttpPost]
|
||||
public string BatchAddInvoiceOrder(AddOrder act)
|
||||
{
|
||||
if (this.CurrentLogin.RoleType == 1)
|
||||
{
|
||||
throw new BaseException("管理员只能查看数据");
|
||||
}
|
||||
return _purchaseOrderService.BatchAddInvoiceOrder(act, this.CurrentLogin);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
using MyCode.Project.Domain.Message.Response.User;
|
||||
using MyCode.Project.Infrastructure.Constant;
|
||||
using MyCode.Project.WebApi.Controllers;
|
||||
using MyCode.Project.Domain.Config;
|
||||
using MyCode.Project.Services;
|
||||
using MyCode.Project.Infrastructure.Common;
|
||||
using MyCode.Project.Domain.Message.Request.User;
|
||||
using MyCode.Project.Infrastructure.Enumeration;
|
||||
using MyCode.Project.Domain.Message.Act.User;
|
||||
using MyCode.Project.Domain.Message.Response.Goods;
|
||||
using MyCode.Project.Domain.Model;
|
||||
using MyCode.Project.Domain.Message.Response.Common;
|
||||
using MyCode.Project.Domain.Businesses.BillKeeping;
|
||||
using MyCode.Project.Domain.Message.Response.Member;
|
||||
using MyCode.Project.Domain.Message.Response.WebSocket;
|
||||
using MyCode.Project.Domain.Message.Response.Chat;
|
||||
using MyCode.Project.Domain.Message.Request.WebSocket;
|
||||
using MyCode.Project.Domain.Message.Request.PerformanceRecord;
|
||||
|
||||
namespace MyCode.Project.WebApi.Areas.Admin.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 门店问卷调查相关,仅供系统内部调用
|
||||
/// </summary>
|
||||
public class ShopQuestionnaireController : BaseAdminController
|
||||
{
|
||||
private ITokenService _tokenService;
|
||||
private IShopQuestionnaireService _shopQuestionnaireService;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="tokenService"></param>
|
||||
public ShopQuestionnaireController(ITokenService tokenService
|
||||
, IShopQuestionnaireService shopQuestionnaireService)
|
||||
{
|
||||
_tokenService = tokenService;
|
||||
_shopQuestionnaireService = shopQuestionnaireService;
|
||||
}
|
||||
|
||||
#region GetLoginInfoForQuestionnaire(问卷调查的获取账号信息)
|
||||
/// <summary>
|
||||
/// 问卷调查的获取账号信息
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
|
||||
public LoginInfoQuestionnaire GetLoginInfoForQuestionnaire(GetLoginInfo request)
|
||||
{
|
||||
if(request.Key== "5C26BEA3-3874-43D1-B0C5-EABE452343BE")
|
||||
return _tokenService.GetLoginInfoForQuestionnaire(request);
|
||||
return
|
||||
null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region GetShopClerk(获取门店与店长的资料)
|
||||
/// <summary>
|
||||
/// 获取门店与店长的资料
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
|
||||
public List<ShopClerk> GetShopClerk(GetShopClerk request)
|
||||
{
|
||||
if (request.Key == "5C26BEA3-3874-43D1-B0C5-EABE452343BE")
|
||||
return _tokenService.GetShopClerk(request);
|
||||
return
|
||||
null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region GetUserIdListByUserId(通过账号ID获取所有下级的账号ID)
|
||||
/// <summary>
|
||||
/// 通过账号ID获取所有下级的账号ID
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
|
||||
public List<Guid> GetUserIdListByUserId(GetUserId request)
|
||||
{
|
||||
if (request.Key == "5C26BEA3-3874-43D1-B0C5-EABE452343BE")
|
||||
return _shopQuestionnaireService.GetUserIdListByUserId(request.UserId);
|
||||
return
|
||||
null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user