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, IWarehouseOutsidePalletsServer { private static readonly SqlSugarScope Db = DataContext.Db; public WarehouseOutsidePalletsServer() : base(Db) { } /// /// 获取库外托盘信息列表 /// /// 物料号 /// 物料名称 /// 批次 /// 托盘号 /// public List 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 mateDataStockDtos = Db.Ado.SqlQuery(str, new { isdel = "0", //是否删除 locatno = "", //储位地址 skuno = skuNo, //物料号 skuname = skuName, // 物料名称 lotno = lotNo, //批次 palletno = palletNo //托盘号 }); return mateDataStockDtos; } } }