...
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Back.Common;
|
||||
|
||||
using Back.Common;
|
||||
using Back.Data.Contracts;
|
||||
using Back.Data.Models.Warehouse;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
@@ -36,7 +37,7 @@ namespace Back.Services.Warehouse
|
||||
info = s.info,
|
||||
Type = TypeCirculation.Remittance,
|
||||
ModelTypeID = (int)s.Type,
|
||||
ModelTypeTitle = s.Type.GetDisplayName(),
|
||||
ModelTypeTitle = s.Type.GetEnumDisplayName(),
|
||||
invoiceID = s.InvoiceID,
|
||||
});
|
||||
if (!string.IsNullOrEmpty(date))
|
||||
@@ -55,24 +56,23 @@ namespace Back.Services.Warehouse
|
||||
info = s.info,
|
||||
Type = TypeCirculation.Receipt,
|
||||
ModelTypeID = (int)s.Type,
|
||||
ModelTypeTitle = s.Type.GetDisplayName(),
|
||||
ModelTypeTitle = s.Type.GetEnumDisplayName(),
|
||||
invoiceID = s.InvoiceID,
|
||||
ForSale = s.ForSale,
|
||||
});
|
||||
if (!string.IsNullOrEmpty(date))
|
||||
RequestReceipt = RequestReceipt.Where(w => w.Date == date);
|
||||
if (CODID != 0)
|
||||
RequestReceipt = RequestReceipt.Where(w => w.CODID == CODID);
|
||||
try
|
||||
{
|
||||
var item = await RequestReceipt.Union(RequestRemittance).OrderByDescending(o => o.Date).ToListAsync();
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
var itemsReceipt = await RequestReceipt.ToListAsync();
|
||||
var Remittance = await RequestRemittance.ToListAsync();
|
||||
|
||||
throw;
|
||||
}
|
||||
return await RequestReceipt.Union(RequestRemittance).OrderByDescending(o => o.Date).Paging(PageIndex, PageSize);
|
||||
|
||||
return await itemsReceipt.Union(Remittance).OrderByDescending(o => o.Date).Paging(PageIndex, PageSize);
|
||||
|
||||
|
||||
// return await RequestReceipt.Union(RequestRemittance).OrderByDescending(o => o.Date).Paging(PageIndex, PageSize);
|
||||
//var list = await RequestReceipt.ToListAsync();
|
||||
//list.AddRange(await RequestRemittance.ToListAsync());
|
||||
//return await list.OrderByDescending(o=>o.Date).AsQueryable().Paging(PageIndex, PageSize);
|
||||
|
||||
Reference in New Issue
Block a user