| | |
| | | /// <param name="skuNo">物料编码</param> |
| | | /// <param name="skuName">物料名称</param> |
| | | /// <returns></returns> |
| | | public List<MateDataStockDto> GetDataStockList(string skuNo, string skuName, string ownerNo, string ownerName) |
| | | public List<MateDataStockDto> GetDataStockList(string skuNo, string skuName, string ownerNo, string ownerName, string lotNo) |
| | | { |
| | | string str = "select stock.SkuNo,stock.SkuName,stock.LotNo,stock.LotText,stock.Standard,stock.Qty," + |
| | | "stock.LockQty,stock.FrozenQty,stock.OwnerNo,stock.OwnerName,(mate.Weight * stock.Qty) WeightSum " + |
| | |
| | | { |
| | | str += " and stock.OwnerName like @ownerName"; |
| | | } |
| | | //判断货主名称是否为空 |
| | | if (!string.IsNullOrEmpty(lotNo)) |
| | | { |
| | | str += " and stock.LotNo like @lotNo"; |
| | | } |
| | | //排序 |
| | | str += " order by stock.SkuNo"; |
| | | List<MateDataStockDto> StockList = Db.Ado.SqlQuery<MateDataStockDto>(str, new |
| | |
| | | skuno = "%" + skuNo + "%", //物料编码 |
| | | skuname = "%" + skuName + "%", //物料名称 |
| | | ownerNo= "%" + ownerNo + "%", //货主编码 |
| | | ownerName= "%" + ownerName + "%" //货主名称 |
| | | ownerName= "%" + ownerName + "%", //货主名称 |
| | | lotNo= "%" + lotNo + "%", //批次号 |
| | | }); |
| | | |
| | | //库存总量 |
| | |
| | | { |
| | | str += " and detail.LotNo like @lotno"; |
| | | } |
| | | if (!string.IsNullOrEmpty(skuNo) && string.IsNullOrEmpty(lotNo)) |
| | | { |
| | | str += " and detail.LotNo = ''"; |
| | | } |
| | | //判断储位地址是否为空 |
| | | if (!string.IsNullOrEmpty(locatNo)) |
| | | { |