出库单调整

This commit is contained in:
18942506660
2023-10-28 10:00:02 +08:00
parent f75aafdd35
commit cff81fe647
6 changed files with 178 additions and 9 deletions

View File

@@ -1,7 +1,9 @@
using AutoMapper;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Storage;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WMS.Web.Core.Dto.OutStock;
@@ -63,9 +65,40 @@ namespace WMS.Web.Repositories
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
public Task<(List<OutStockQueryInfoResponse> list, int total)> GetListAsync(OutStockQueryRequest dto)
public async Task<(List<OutStockQueryInfoResponse> list, int total)> GetListAsync(OutStockQueryRequest dto)
{
throw new NotImplementedException();
var query = _context.OutStock
.OrderByDescending(o => o.Id)
.Where(adv => 1 == 1);
if (dto.CreateBeginDate != null)
query = query.Where(w => w.CreateTime >= dto.CreateBeginDate);
if (dto.CreateEndDate != null)
query = query.Where(w => w.CreateTime <= dto.CreateEndDate);
//组装
int total = await query.CountAsync();
var list = await query.Select(s => new OutStockQueryInfoResponse()
{
#region dto组装
Id = 0,
Status = "",
Type = "",
Creator = "",
CreateTime=s.CreateTime,
SuccessSync = s.SuccessSync,
Stock = "",
SourceBillNo="",
SaleBillNo = "",
DeliveryOrg = "",
ReceiptCustomer = "",
MaterialName = "",
MaterialNumber = "",
Specifications = "",
Qty=0
#endregion
}).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
return (list, total);
}
}
}