调整出库单结构
This commit is contained in:
@@ -82,6 +82,10 @@ namespace WMS.Web.Repositories
|
||||
/// <returns></returns>
|
||||
public async Task<(List<OutStockQueryInfoResponse> list, int total)> GetListAsync(OutStockQueryRequest dto)
|
||||
{
|
||||
List<int> detailIds = new List<int>();
|
||||
if (!string.IsNullOrEmpty(dto.SourceBillNo))
|
||||
detailIds = await _context.OutStockTaskDetails.FromSqlRaw($"SELECT Id FROM t_wms_outstock_details WHERE SourceBillNo like '%{dto.SourceBillNo}%'").Select(s => s.Id).ToListAsync();
|
||||
|
||||
List<int> ids = new List<int>();
|
||||
if (!string.IsNullOrEmpty(dto.Creator))
|
||||
{
|
||||
@@ -134,8 +138,8 @@ namespace WMS.Web.Repositories
|
||||
query = query.Where(w => mIds.Contains(w.detail.MaterialId));
|
||||
if (ids.Count() > 0)
|
||||
query = query.Where(w => ids.Contains(w.order.CreatorId));
|
||||
if (!string.IsNullOrEmpty(dto.SourceBillNo))
|
||||
query = query.Where(w => EF.Functions.Like(w.order.SourceBillNo, "%" + dto.SourceBillNo + "%"));
|
||||
if (detailIds.Count()!=0)
|
||||
query = query.Where(w => detailIds.Contains(w.detail.Id));
|
||||
if (dto.Type != null)
|
||||
query = query.Where(w => w.order.Type == (OutStockType)dto.Type);
|
||||
if (dto.SuccessSync != null)
|
||||
@@ -160,8 +164,8 @@ namespace WMS.Web.Repositories
|
||||
CreateTime = s.order.CreateTime.DateToStringSeconds(),
|
||||
SuccessSync = s.order.SuccessSync,
|
||||
Stock = _singleDataService.GetSingleData(SingleAction.Stocks, _loginRepositories.CompanyId, s.detail.StockCode),
|
||||
SourceBillNo = s.order.SourceBillNo,
|
||||
SaleBillNo = s.detail.SaleBillNo,
|
||||
SourceBillNo =string.Join(",",s.detail.SourceBillNos),
|
||||
SaleBillNo = string.Join(",", s.detail.SaleBillNos),
|
||||
DeliveryOrg = _erpBasicDataExtendService.GetOrgName(orgs, s.order.DeliveryOrgId),
|
||||
ReceiptCustomer = s.order.Type == OutStockType.Sal
|
||||
? _erpBasicDataExtendService.GetCustomerName(customers, s.order.ReceiptCustomerId)
|
||||
|
||||
Reference in New Issue
Block a user