333
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user