using System.ComponentModel.DataAnnotations; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using WTA.Application.Identity.Entities.SystemManagement; using WTA.Application.Identity.Entities.SystemManagement.Group; using WTA.Shared.Application; using WTA.Shared.Attributes; using WTA.Shared.Controllers; namespace WTA.Application.Identity.Controllers; [Route("api/{culture=zh}/[controller]/[action]")] public class JIT_PUB_SAController : BaseController, IResourceService { private readonly GenericController _genericController; public JIT_PUB_SAController(GenericController genericController) { this._genericController = genericController; } //[NonAction] //public override IActionResult Create([FromBody] PUB_CAN_SA model) //{ // return base.Create(model); //} //[NonAction] //public override IActionResult Export([FromBody] PaginationModel model, bool includeAll = false, bool includeDeleted = false) //{ // return base.Export(model, includeAll, includeDeleted); //} [HttpGet] public virtual IActionResult Index() { return this._genericController.Index(); } [HttpPost, Multiple, Order(-4), HtmlClass("el-button--primary")] public virtual IActionResult Index([FromBody] PaginationModel model) { return this._genericController.Index(model); } [HttpPost, Multiple, Order(0), HtmlClass("el-button--danger")] public virtual IActionResult Delete([FromBody] Guid[] guids) { return this._genericController.Delete(guids); } [HttpGet, AllowAnonymous, Multiple, Order(-2), HtmlClass("el-button--primary")] public virtual IActionResult Import() { return this._genericController.Import(); } [Consumes("multipart/form-data")] [HttpPost, Multiple, Order(-2), HtmlClass("el-button--primary")] public virtual IActionResult Import([Required] IFormFile file, bool partial = false, bool replace = false) { return this._genericController.Import(file, partial, replace); } } [Display(Name = "结算数据")] [JITDataInputGroup] [Order(1)] public class JIT_PUB_SA : IResource { [Display(Name = "期间")] public string Version { get; set; } = null!; [Display(Name = "结算单据")] [OneToMany] public string BillNum { get; set; } = null!; /// /// 1、新建 2、已有出库3、已有扣减寄售库 /// [Display(Name = "状态")] public string State { get; set; } = null!; }