| | |
| | | /// <param name="bitBoxMark">零箱标记</param> |
| | | /// <param name="inspectStatus">质量状态</param> |
| | | /// <returns></returns> |
| | | 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 ownerNo, string ownerName, |
| | | string startTime, string endTime, string WareHouseNo, string AreaNo) |
| | | 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 ownerNo, string ownerName, string startTime, string endTime, string WareHouseNo, string AreaNo) |
| | | { |
| | | 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"; |
| | | 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)) |
| | | { |
| | |
| | | endTime = Convert.ToDateTime(endTime).AddDays(1).ToString(); |
| | | str += $" and detail.CompleteTime < '{endTime}'"; |
| | | } |
| | | if (!string.IsNullOrEmpty(WareHouseNo)) |
| | | { |
| | | str += $" and detail.WareHouseNo = '{WareHouseNo}'"; |
| | | } |
| | | //重复条件 |
| | | //if (!string.IsNullOrEmpty(WareHouseNo)) |
| | | //{ |
| | | // str += $" and detail.WareHouseNo = '{WareHouseNo}'"; |
| | | //} |
| | | if (!string.IsNullOrEmpty(WareHouseNo)) |
| | | { |
| | | str += $" and detail.WareHouseNo = '{WareHouseNo}'"; |
| | |
| | | } |
| | | if (!string.IsNullOrEmpty(arr)) |
| | | { |
| | | str += $" and Id in ({arr})"; |
| | | str += $" and detail.Id in ({arr})"; |
| | | } |
| | | else |
| | | { |
| | | str += " and Id = ''"; |
| | | str += " and detail.Id=''"; |
| | | } |
| | | } |
| | | |