using Model.ModelDto.DataDto;
|
using SqlSugar;
|
using System;
|
using System.Collections.Generic;
|
using System.Text;
|
using WMS.DAL;
|
using WMS.Entity.Context;
|
using WMS.Entity.DataEntity;
|
using WMS.IBLL.IBllCheckServer;
|
|
namespace WMS.BLL.BllCheckServer
|
{
|
public class WarehouseOutsidePalletsServer : DbHelper<DataStockDetail>, IWarehouseOutsidePalletsServer
|
{
|
private static readonly SqlSugarScope Db = DataContext.Db;
|
public WarehouseOutsidePalletsServer() : base(Db)
|
{
|
}
|
|
/// <summary>
|
/// 获取库外托盘信息列表
|
/// </summary>
|
/// <param name="skuNo">物料号</param>
|
/// <param name="skuName">物料名称</param>
|
/// <param name="lotNo">批次</param>
|
/// <param name="palletNo">托盘号</param>
|
/// <returns></returns>
|
public List<MateDataStockDto> GetPalletsOutside(string skuNo, string skuName, string lotNo, string palletNo)
|
{
|
string str = "select Id,LotNo,LotText,SupplierLot,SkuNo,SkuName,Standard,Qty,LockQty,FrozenQty,PalletNo,Status,InspectMark,BitPalletMark,InspectStatus from DataStockDetail where IsDel = @isdel and LocatNo = @locatno";
|
//判断物料号是否为空
|
if (!string.IsNullOrEmpty(skuNo))
|
{
|
str += " and SkuNo like @skuno";
|
}
|
//判断物料名称是否为空
|
if (!string.IsNullOrEmpty(skuName))
|
{
|
str += " and SkuName like @skuname";
|
}
|
//判断批次是否为空
|
if (!string.IsNullOrEmpty(lotNo))
|
{
|
str += " and LotNo like @lotno";
|
}
|
//判断托盘号是否为空
|
if (!string.IsNullOrEmpty(palletNo))
|
{
|
str += " and PalletNo like @palletno";
|
}
|
//排序
|
str += " order by LotNo,SkuNo,PalletNo";
|
List<MateDataStockDto> mateDataStockDtos = Db.Ado.SqlQuery<MateDataStockDto>(str, new
|
{
|
isdel = "0", //是否删除
|
locatno = "", //储位地址
|
skuno = skuNo, //物料号
|
skuname = skuName, // 物料名称
|
lotno = lotNo, //批次
|
palletno = palletNo //托盘号
|
});
|
return mateDataStockDtos;
|
}
|
}
|
}
|