生成电梯任务与判断一托延迟处理,生产入库调整

This commit is contained in:
2024-09-02 09:04:57 +08:00
parent d493a9322e
commit 6536f4f8e3
12 changed files with 251 additions and 162 deletions

View File

@@ -62,11 +62,23 @@ namespace Tnb.WarehouseMgr
throw new ArgumentNullException(nameof(input));
}
bool isOk = await _db.Updateable<WmsSterilizationInstockH>().SetColumns(it => new WmsSterilizationInstockH { status = WmsWareHouseConst.BILLSTATUS_COMPLETE_ID })
.Where(it => it.id == input.requireId).ExecuteCommandHasChangeAsync();
if (!isOk)
BasLocation endLocation = await _db.Queryable<BasLocation>().Where(r => r.id == input.wmsDistaskH.endlocation_id).FirstAsync();
// 生产入库(灭菌完成) 仓库传 1001A1100000001MA8KP
if (endLocation.wh_id == WmsWareHouseConst.WAREHOUSE_MJC_ID)
{
throw Oops.Oh(ErrorCode.COM1001);
}
// 生产入库(成品) 仓库传 1001A1100000001MA8ME
else if (endLocation.wh_id == WmsWareHouseConst.WAREHOUSE_CP_ID)
{
bool isOk = await _db.Updateable<WmsSterilizationInstockH>().SetColumns(it => new WmsSterilizationInstockH { status = WmsWareHouseConst.BILLSTATUS_COMPLETE_ID })
.Where(it => it.id == input.requireId).ExecuteCommandHasChangeAsync();
if (!isOk)
{
throw Oops.Oh(ErrorCode.COM1001);
}
}
}
}