This commit is contained in:
2023-06-20 14:27:52 +08:00
parent e999b4615c
commit 7aec24710d

View File

@@ -191,7 +191,8 @@ namespace Tnb.WarehouseMgr
var emptyCarrys = await _db.Queryable<WmsEmptyOutstockD>().Where(it => it.bill_id == input.requireId).ToListAsync();
// 判断所有明细是否都完成
if (emptyCarrys.All(x=> x.status == WmsWareHouseConst.BILLSTATUS_COMPLETE_ID)) {
if (emptyCarrys?.Count > 0 && emptyCarrys.All(x => x.status == WmsWareHouseConst.BILLSTATUS_COMPLETE_ID))
{
await _db.Updateable<WmsEmptyOutstockH>().SetColumns(it => new WmsEmptyOutstockH { status = WmsWareHouseConst.BILLSTATUS_COMPLETE_ID }).Where(it => it.id == input.requireId).ExecuteCommandHasChangeAsync();
}
if (!isOk) throw Oops.Oh(ErrorCode.COM1001);