| | |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.LotNo), it => it.LotNo.Contains(model.LotNo.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.SkuNo), it => it.SkuNo.Contains(model.SkuNo.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.SkuName), it => it.SkuName.Contains(model.SkuName.Trim())) |
| | | .AndIF((model.BindNo != 0 && !string.IsNullOrWhiteSpace(model.BindNo.ToString())),it=>it.BindNo == model.BindNo) |
| | | .AndIF((model.BindNo != 0 && !string.IsNullOrWhiteSpace(model.BindNo.ToString())), it => it.BindNo == model.BindNo) |
| | | .And(m => m.IsDel == "0") |
| | | .ToExpression(); |
| | | |
| | |
| | | |
| | | #region 指定储位 |
| | | //指定储位数据源(正常的空储位) |
| | | public List<LocatDto> GetLocateList(string houseNo, string roadwayNo, string row, string column, string layer, |
| | | public List<LocatDto> GetLocateList(string houseNo, string roadwayNo, string row, string column, string layer, |
| | | string locateNo, string BindId, int page, int limit, out int count) |
| | | { |
| | | try |
| | | { |
| | | //获取托盘绑定 |
| | | var bindASNDetailNo = Db.Queryable<BllPalletBind>().Where(a => a.IsDel == "0" && a.Status == "0" |
| | | var bindASNDetailNo = Db.Queryable<BllPalletBind>().Where(a => a.IsDel == "0" && a.Status == "0" |
| | | && a.Id == int.Parse(BindId)).Select(a => a.ASNDetailNo).First(); |
| | | //获取单据明细 |
| | | var noticeDetailSkuNo = Db.Queryable<BllArrivalNoticeDetail>().Where(a => a.Id == bindASNDetailNo |
| | | var noticeDetailSkuNo = Db.Queryable<BllArrivalNoticeDetail>().Where(a => a.Id == bindASNDetailNo |
| | | && a.IsDel == "0").Select(a => a.SkuNo).First(); |
| | | //获取物料 |
| | | var skuCategoryNo = Db.Queryable<SysMaterials>().Where(a => a.IsDel == "0" && a.SkuNo == noticeDetailSkuNo) |
| | |
| | | .And(m => m.AreaNo.Contains(categoryAreaNo)) |
| | | .ToExpression();//注意 这一句 不能少 |
| | | var total = 0; |
| | | var list = Db.Queryable<SysStorageLocat>().Where(item).OrderByDescending(a=>a.Depth).OrderBy(a=>a.Column) |
| | | var list = Db.Queryable<SysStorageLocat>().Where(item).OrderByDescending(a => a.Depth).OrderBy(a => a.Column) |
| | | .Select(a => new LocatDto() |
| | | { |
| | | Id = a.Id, |
| | |
| | | throw new Exception("该储位状态不是空储位或标志不是正常的"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | //判断当前托盘是否存在绑定信息 |
| | | if (!string.IsNullOrWhiteSpace(bind.LocatNo)) |
| | |
| | | } |
| | | |
| | | //获取该批次最终质检结果 |
| | | var quality = Db.Queryable<BllQualityInspect>().Where(a => a.IsDel == "0" && a.ASNNo == noticeDetail.ASNNo && a.LotNo == noticeDetail.LotNo).OrderByDescending(a => a.CreateTime).First(); |
| | | BllQualityInspect quality = new BllQualityInspect(); |
| | | //判断是否为退货入库单 |
| | | if (notice.Type == "3") |
| | | { |
| | | quality = Db.Queryable<BllQualityInspect>().Where(a => a.IsDel == "0" && a.ASNNo == noticeDetail.ASNNo && a.SkuNo == noticeDetail.SkuNo && a.LotNo == noticeDetail.LotNo).OrderByDescending(a => a.CreateTime).First(); |
| | | } |
| | | else |
| | | { |
| | | quality = Db.Queryable<BllQualityInspect>().Where(a => a.IsDel == "0" && a.SkuNo == noticeDetail.SkuNo && a.LotNo == noticeDetail.LotNo).OrderByDescending(a => a.CreateTime).First(); |
| | | } |
| | | |
| | | #region 库存明细 |
| | | var sd = new DataStockDetail() |
| | | { |
| | |
| | | sd.OwnerName = notice.CustomerName;//货主名称 |
| | | } |
| | | else if (notice.Type == "1" || notice.Type == "5")//1:采购入库,2:其它入库 |
| | | { |
| | | sd.SupplierNo= notice.CustomerNo;//供应商编码 |
| | | { |
| | | sd.SupplierNo = notice.CustomerNo;//供应商编码 |
| | | sd.SupplierName = notice.CustomerName;//供应商名称 |
| | | } |
| | | |