...
This commit is contained in:
@@ -27,7 +27,7 @@ namespace Back.Services.Warehouse
|
||||
{
|
||||
var model = new Receipt()
|
||||
{
|
||||
Date = item.Date,
|
||||
Date = item.Date.Replace("/",""),
|
||||
CODID = item.CODID,
|
||||
Count = item.Count,
|
||||
ForSale = item.ForSale,
|
||||
@@ -60,7 +60,7 @@ namespace Back.Services.Warehouse
|
||||
public async Task<ReceiptDto?> Update(ReceiptDto item)
|
||||
{
|
||||
var model= await _ReceiptRepo.Get(w => w.ID == item.ID).FirstOrDefaultAsync();
|
||||
model.Date= item.Date;
|
||||
model.Date= item.Date.Replace("/", "");
|
||||
model.CODID= item.CODID;
|
||||
model.Count= item.Count;
|
||||
model.ForSale= item.ForSale;
|
||||
|
@@ -19,7 +19,7 @@ namespace Back.Services.Warehouse
|
||||
{
|
||||
var model = new Remittance()
|
||||
{
|
||||
Date = item.Date,
|
||||
Date = item.Date.Replace("/", ""),
|
||||
CODID = item.CODID,
|
||||
Count = item.Count,
|
||||
info = item.info,
|
||||
@@ -44,7 +44,7 @@ namespace Back.Services.Warehouse
|
||||
public async Task<RemittanceDto?> Update(RemittanceDto item)
|
||||
{
|
||||
var model = await _ReceiptRepo.Get(w => w.ID == item.ID).FirstOrDefaultAsync();
|
||||
model.Date = item.Date;
|
||||
model.Date = item.Date.Replace("/", "");
|
||||
model.CODID = item.CODID;
|
||||
model.Count = item.Count;
|
||||
model.info = item.info;
|
||||
|
@@ -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