You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

84 lines
2.7 KiB

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<JIT_PUB_SA>
{
private readonly GenericController<PUB_SA, PUB_SA, PUB_SA, PUB_SA, PUB_SA, PUB_SA> _genericController;
public JIT_PUB_SAController(GenericController<PUB_SA, PUB_SA, PUB_SA, PUB_SA, PUB_SA, PUB_SA> 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<PUB_CAN_SA, PUB_CAN_SA> 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<PUB_SA, PUB_SA> 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<PUB_SA_DETAIL>]
public string BillNum { get; set; } = null!;
/// <summary>
/// 1、新建 2、已有出库3、已有扣减寄售库
/// </summary>
[Display(Name = "状态")]
public string State { get; set; } = null!;
}