|
|
|
@ -134,9 +134,9 @@ namespace DS.WMS.Core.Invoice.Method
|
|
|
|
|
var invoices = ids.Select(x => new Entity.Invoice { Id = x, SN = sn, ApiType = InvoiceApiType.Default }).ToList();
|
|
|
|
|
await TenantDb.Updateable(invoices).UpdateColumns(x => new { x.SN, x.ApiType }).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
UpdateInvoiceNumberAsync(sn);
|
|
|
|
|
await UpdateInvoiceNumberAsync(sn);
|
|
|
|
|
|
|
|
|
|
return DataResult.Success;
|
|
|
|
|
return DataResult.Successed("开票已提交", data: sn);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -175,9 +175,9 @@ namespace DS.WMS.Core.Invoice.Method
|
|
|
|
|
if (queryResult == null || !queryResult.Success)
|
|
|
|
|
return DataResult.Failed(queryResult?.Message);
|
|
|
|
|
|
|
|
|
|
List<Entity.Invoice> invoices = [];
|
|
|
|
|
if (queryResult.Data.Order?.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
List<Entity.Invoice> invoices = [];
|
|
|
|
|
foreach (var item in queryResult.Data.Order)
|
|
|
|
|
{
|
|
|
|
|
var inv = new Entity.Invoice
|
|
|
|
@ -218,7 +218,24 @@ namespace DS.WMS.Core.Invoice.Method
|
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return DataResult.Success;
|
|
|
|
|
var result2 = DataResult.Success;
|
|
|
|
|
result2.Data = invoices;
|
|
|
|
|
return result2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 更新发票号码
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public async Task<DataResult> UpdateInvoiceNumberAsync(long id)
|
|
|
|
|
{
|
|
|
|
|
var model = await TenantDb.Queryable<Entity.Invoice>().Where(x => x.Id == id)
|
|
|
|
|
.Select(x => new { x.Id, x.SN, x.SaleDeptId, x.ApiType }).FirstAsync();
|
|
|
|
|
if (model == null)
|
|
|
|
|
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.EmptyData));
|
|
|
|
|
|
|
|
|
|
return await UpdateInvoiceNumberAsync(model.SN);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|