移箱操作
This commit is contained in:
@@ -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.MoveBoxRecord;
|
||||
@@ -58,10 +60,38 @@ namespace WMS.Web.Repositories
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Task<(List<MoveBoxRecordQueryInfoResponse> list, int total)> GetListAsync(MoveBoxRecordQueryRequest dto)
|
||||
/// <summary>
|
||||
/// 列表
|
||||
/// </summary>
|
||||
/// <param name="dto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<(List<MoveBoxRecordQueryInfoResponse> list, int total)> GetListAsync(MoveBoxRecordQueryRequest dto)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
var query = _context.MoveBoxRecord
|
||||
.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 MoveBoxRecordQueryInfoResponse()
|
||||
{
|
||||
#region dto组装
|
||||
Box = "",
|
||||
SrcSubStock = "",
|
||||
Specifications = "",
|
||||
DestSubStock = "",
|
||||
Qty = 0,
|
||||
Type = "",
|
||||
Creator = "",
|
||||
CreateTime = s.CreateTime
|
||||
#endregion
|
||||
|
||||
}).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
|
||||
return (list, total);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user