盘点对接以及现场问题处理

This commit is contained in:
2024-09-18 18:40:29 +08:00
parent b4e7dceffb
commit d835c96f2f
12 changed files with 85 additions and 11 deletions

View File

@@ -136,6 +136,7 @@ namespace Tnb.WarehouseMgr
await _db.Insertable(instockDs).ExecuteCommandAsync();
var purchase = await _db.Queryable<WmsPurchaseH>().FirstAsync(it => it.id == purchaseDs.First().bill_id);
if (string.IsNullOrEmpty(purchase.supplier_id))
{
BasSupplier basSupplier = await _db.Queryable<BasSupplier>().Where(x=>x.supplier_code==purchase.supplier_code).FirstAsync();
@@ -149,6 +150,11 @@ namespace Tnb.WarehouseMgr
purchase.supplier_id = basSupplier.id;
}
}
//purchase.supplier_code
List<WmsPurchaseD> dList = await _db.Queryable<WmsPurchaseD>().Where(x=>x.bill_id==purchaseDs.First().bill_id).OrderBy(x=>x.id).ToListAsync();
List<String> materialIds = purchaseDs.Select(x=>x.material_id).Distinct().ToList();
List<String> unitCodes = purchaseDs.Select(x => x.unit_id).Distinct().ToList();