| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using Model.ModelDto.DataDto; |
| | | using SqlSugar; |
| | | using WMS.DAL; |
| | | using WMS.Entity.Context; |
| | |
| | | /// <param name="bitBoxMark">零箱标记</param> |
| | | /// <param name="inspectStatus">质量状态</param> |
| | | /// <returns></returns> |
| | | public List<DataStockDetail> GetBindList(string skuNo, string skuName, string palletNo, string lotNo, string boxNo, string status, string inspectMark, string bitPalletMark, string bitBoxMark, string inspectStatus) |
| | | public List<StockDetailDto> GetBindList(string skuNo, string skuName, string palletNo, string lotNo, string boxNo, string status, string inspectMark, string bitPalletMark, string bitBoxMark, string inspectStatus) |
| | | { |
| | | string str = "select Id,LotNo,LotText,SupplierLot,SkuNo,SkuName,Qty,LockQty,FrozenQty,WareHouseNo,AreaNo,LocatNo,PalletNo,PalletNo2,PalletNo3,InspectMark,BitPalletMark from DataStockDetail where IsDel = @isdel"; |
| | | string str = "select detail.*,house.WareHouseNo + '-' + house.WareHouseName as WareHouseName,roadway.RoadwayNo + '-' + roadway.RoadwayName as RoadwayName,area.AreaNo + '-' + area.AreaName as AreaName from DataStockDetail detail left join SysStorageRoadway roadway on detail.RoadwayNo = roadway.RoadwayNo left join SysWareHouse house on detail.WareHouseNo = house.WareHouseNo left join SysStorageArea area on detail.AreaNo = area.AreaNo where detail.IsDel = @isdel"; |
| | | //判断物料号是否为空 |
| | | if (!string.IsNullOrEmpty(skuNo)) |
| | | { |
| | | str += " and SkuNo like @skuno"; |
| | | str += " and detail.SkuNo like @skuno"; |
| | | } |
| | | //判断物料名称是否为空 |
| | | if (!string.IsNullOrEmpty(skuName)) |
| | | { |
| | | str += " and SkuName like @skuname"; |
| | | str += " and detail.SkuName like @skuname"; |
| | | } |
| | | //判断托盘号是否为空 |
| | | if (!string.IsNullOrEmpty(palletNo)) |
| | | { |
| | | str += " and PalletNo like @palletno"; |
| | | str += " and detail.PalletNo like @palletno"; |
| | | } |
| | | //判断批次是否为空 |
| | | if (!string.IsNullOrEmpty(lotNo)) |
| | | { |
| | | str += " and LotNo like @lotno"; |
| | | str += " and detail.LotNo like @lotno"; |
| | | } |
| | | //判断零托标记是否为空 |
| | | if (!string.IsNullOrEmpty(bitPalletMark)) |
| | | { |
| | | str += " and BitPalletMark = @bitpalletmark"; |
| | | str += " and detail.BitPalletMark = @bitpalletmark"; |
| | | } |
| | | |
| | | int i = 0; |
| | |
| | | if (!string.IsNullOrEmpty(inspectMark)) |
| | | { |
| | | boxstr += " and InspectMark = @inspectmark"; |
| | | str += " and InspectMark = @inspectmark"; |
| | | str += " and detail.InspectMark = @inspectmark"; |
| | | i = 1; |
| | | } |
| | | //判断零箱标记是否为空 |
| | |
| | | if (!string.IsNullOrEmpty(inspectStatus)) |
| | | { |
| | | boxstr += " and InspectStatus = @inspectstatus"; |
| | | str += " and InspectStatus = @inspectstatus"; |
| | | str += " and detail.InspectStatus = @inspectstatus"; |
| | | i = 1; |
| | | } |
| | | //将箱码数据进行排序 |
| | |
| | | |
| | | //排序 |
| | | str += " order by PalletNo,SkuNo,LotNo"; |
| | | List<DataStockDetail> boxInforList = Db.Ado.SqlQuery<DataStockDetail>(str, new |
| | | List<StockDetailDto> boxInforList = Db.Ado.SqlQuery<StockDetailDto>(str, new |
| | | { |
| | | isdel = "0", //是否删除 |
| | | skuno = "%" + skuNo + "%", //物料号 |