using DS.Module.Core; using DS.Module.Core.Data; using DS.WMS.Core.Code.Entity; using DS.WMS.Core.Code.Interface; using Microsoft.AspNetCore.Mvc; namespace DS.WMS.MainApi.Controllers { /// /// 发票代码API /// public class CodeInvoiceController : ApiController { private readonly ICodeInvoiceService _invokeService; /// /// 构造函数 /// /// public CodeInvoiceController(ICodeInvoiceService invokeService) { _invokeService = invokeService; } /// /// 列表 /// /// /// [HttpPost, Route("GetList")] public async Task>> GetListAsync([FromBody] PageRequest request) { return await _invokeService.GetListAsync(request); } /// /// 获取详情 /// /// 发票代码ID /// [HttpGet, Route("Edit")] public async Task> GetAsync([FromQuery] long id) { return await _invokeService.GetAsync(id); } /// /// 新增/修改 /// /// 发票代码 /// [HttpPost, Route("Edit")] public async Task> EditAsync([FromBody] CodeInvoice ci) { return await _invokeService.EditAsync(ci); } /// /// 删除 /// /// /// [HttpPost, Route("Delete")] public async Task DeleteAsync([FromBody] IdModel idModel) { return await _invokeService.DeleteAsync(idModel.Ids); } } }