|
|
|
@ -31,22 +31,11 @@ namespace DS.WMS.FeeApi.Controllers
|
|
|
|
|
/// <param name="request"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost, Route("GetApplicationList")]
|
|
|
|
|
public async Task<DataResult<List<InvoiceApplicationDto>>> GetApplicationListAsync([FromBody]PageRequest request)
|
|
|
|
|
public async Task<DataResult<List<InvoiceApplicationDto>>> GetApplicationListAsync([FromBody] PageRequest request)
|
|
|
|
|
{
|
|
|
|
|
return await _service.GetApplicationListAsync(request);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取发票申请明细
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id">申请单ID</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet, Route("GetApplicationDetails")]
|
|
|
|
|
public async Task<DataResult<List<InvoiceApplicationDetailDto>>> GetApplicationDetailsAsync([FromQuery]long id)
|
|
|
|
|
{
|
|
|
|
|
return await _service.GetApplicationDetailsAsync(id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取发票申请明细
|
|
|
|
|
/// </summary>
|
|
|
|
@ -78,7 +67,7 @@ namespace DS.WMS.FeeApi.Controllers
|
|
|
|
|
/// <param name="request">请求参数</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost, Route("Save")]
|
|
|
|
|
public async Task<DataResult<Invoice>> SaveAsync([FromBody]InvoiceRequest<Invoice> request)
|
|
|
|
|
public async Task<DataResult<Invoice>> SaveAsync([FromBody] InvoiceRequest<Invoice> request)
|
|
|
|
|
{
|
|
|
|
|
if (!ModelState.IsValid)
|
|
|
|
|
return DataResult<Invoice>.Failed(ModelState.GetErrorMessage(), MultiLanguageConst.IllegalRequest);
|
|
|
|
@ -142,5 +131,33 @@ namespace DS.WMS.FeeApi.Controllers
|
|
|
|
|
bool isLocked = Convert.ToBoolean(model.Value);
|
|
|
|
|
return await _service.SetLockAsync(isLocked, model.Ids);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 发起开票请求
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="issuanceService"></param>
|
|
|
|
|
/// <param name="idModel">开票的发票ID</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost, Route("Initiate")]
|
|
|
|
|
public async Task<DataResult<string>> InitiateAsync([FromServices] IInvoiceIssuanceService issuanceService,
|
|
|
|
|
[FromBody] IdModel idModel)
|
|
|
|
|
{
|
|
|
|
|
if (!ModelState.IsValid)
|
|
|
|
|
return DataResult<string>.Failed(ModelState.GetErrorMessage(), MultiLanguageConst.IllegalRequest);
|
|
|
|
|
|
|
|
|
|
return await issuanceService.InitiateAsync(idModel.Ids);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 添加租户信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="issuanceService"></param>
|
|
|
|
|
/// <param name="tenant">租户信息</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost, Route("AddTenant")]
|
|
|
|
|
public async Task<string> AddTenantAsync([FromServices] IInvoiceIssuanceService issuanceService, Tenant tenant)
|
|
|
|
|
{
|
|
|
|
|
return await issuanceService.AddTenantAsync(tenant);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|