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 { /// /// 采购订单相关 /// public class PurchaseOrderController : BaseAdminController { private IPurchaseOrderService _purchaseOrderService; /// /// /// /// public PurchaseOrderController(IPurchaseOrderService purchaseOrderService ) { _purchaseOrderService = purchaseOrderService; } #region GetPageList(采购订单分页列表查询) /// /// 采购订单分页列表查询 /// /// /// [HttpPost] public PageResult GetPageList(PagedSearch pagedSearch) { return _purchaseOrderService.GetPageList(pagedSearch, this.CurrentLogin); } #endregion #region GetPurchaseOrderItemList(根据采购订单FID获取明细列表) /// /// 根据采购订单FID获取明细列表 /// /// /// [HttpPost] public List GetPurchaseOrderItemList(PurchaseOrderItemSearch search) { return _purchaseOrderService.GetPurchaseOrderItemList(search, this.CurrentLogin); } #endregion #region BatchSetChengNuoJiaoQi(批量修改供应商承诺交期字段) /// /// 批量修改供应商承诺交期字段 /// /// [HttpPost] public void BatchSetChengNuoJiaoQi(List updateList) { if (this.CurrentLogin.RoleType == 1) { throw new BaseException("管理员只能查看数据"); } _purchaseOrderService.BatchSetChengNuoJiaoQi(updateList, this.CurrentLogin.SupplierId); } #endregion #region BatchSetNewChengNuoJiaoQi(批量修改供应商承诺最新交期字段) /// /// 批量修改供应商承诺最新交期字段 /// /// [HttpPost] public void BatchSetNewChengNuoJiaoQi(List updateList) { if (this.CurrentLogin.RoleType == 1) { throw new BaseException("管理员只能查看数据"); } _purchaseOrderService.BatchSetNewChengNuoJiaoQi(updateList, this.CurrentLogin.SupplierId); } #endregion #region BatchAddInvoiceOrder(选中明细生成发货通知单) /// /// 选中明细生成发货通知单 /// /// [HttpPost] public string BatchAddInvoiceOrder(AddOrder act) { if (this.CurrentLogin.RoleType == 1) { throw new BaseException("管理员只能查看数据"); } return _purchaseOrderService.BatchAddInvoiceOrder(act, this.CurrentLogin); } #endregion } }