| | |
| | | |
| | | #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) |
| | |
| | | } |
| | | |
| | | //获取该批次最终质检结果 |
| | | var quality = Db.Queryable<BllQualityInspect>().Where(a => a.IsDel == "0" && 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() |
| | | { |