收货控制 自动空托盘出库调整

This commit is contained in:
2024-10-18 14:42:23 +08:00
parent 013c706b42
commit f365035a89
3 changed files with 24 additions and 3 deletions

View File

@@ -135,8 +135,9 @@ namespace Tnb.WarehouseMgr
List<WmsInstockH> instock_mains = await _db.Queryable<WmsInstockH>().Where(x => x.source_id == wmsPurchaseD.bill_id).ToListAsync();
if (instock_mains.Count == 0)
{
throw Oops.Bah("不存在此明细的入库记录!可能是入库任务还未执行完成或者物料是由人工入库");
throw Oops.Bah($"采购收货单{wmsPurchaseH.bill_code}不存在此明细的入库记录!可能是入库任务还未执行完成或者物料是由人工入库");
}
List<WmsInstockD> allInstockDetails = await _db.Queryable<WmsInstockD>().Where(it => instock_mains.Select(r => r.id).Contains(it.bill_id) && it.material_id == wmsPurchaseD.material_id && it.code_batch == wmsPurchaseD.code_batch).OrderBy(x=>x.id).ToListAsync();