入库业务增加库位与载具规格关联的限制

This commit is contained in:
FanLian
2023-07-18 11:17:51 +08:00
parent 43f73b16a7
commit 0daf7fe663
7 changed files with 53 additions and 17 deletions

View File

@@ -272,6 +272,8 @@ namespace Tnb.WarehouseMgr
var loc = await _db.Queryable<BasLocation>().FirstAsync(it => it.location_code == input.instock.location_code && it.is_type != EnumLocationType..ToString());
var carry = await _db.Queryable<WmsCarryH>().SingleAsync(it => it.carry_code == input.instock.carry_code);
var isMatch = await IsCarryAndLocationMatchByCarryStd(carry, loc);
if (!isMatch) throw new AppFriendlyException("库位与载具规格不匹配", 500);
//如果数据不全或有误,
if (carry.IsNull() || loc.IsNull() || instockds?.Count < 1 || instockcodes?.Count < 1)
{