分拣任务变更 现场问题处理
This commit is contained in:
@@ -124,11 +124,19 @@ namespace Tnb.WarehouseMgr
|
||||
//自制的采购入库 不在质检保存里调用erp接口
|
||||
if (string.IsNullOrEmpty(wmsPurchaseH.erp_bill_code))
|
||||
{
|
||||
await _db.Updateable<WmsPurchaseD>()
|
||||
.SetColumns(x => x.qc_res == qcRes)
|
||||
.Where(x => x.id == id)
|
||||
.ExecuteCommandAsync();
|
||||
return "保存成功";
|
||||
}
|
||||
|
||||
// 托盘对应入库单
|
||||
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("不存在此明细的入库记录!可能是入库任务还未执行完成或者物料是由人工入库");
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user