判断最终目标库位是否可放置当前载具,公共函数代码优化
This commit is contained in:
@@ -60,17 +60,13 @@ namespace Tnb.WarehouseMgr
|
||||
protected Task<bool> IsCarryAndLocationMatchByCarryStd(WmsCarryH carry, BasLocation locDest)
|
||||
{
|
||||
bool isMatch = false;
|
||||
string errMessage = string.Empty;
|
||||
if (carry == null) throw new ArgumentNullException(nameof(carry));
|
||||
if (locDest == null) throw new ArgumentNullException(nameof(locDest));
|
||||
if (!carry.carrystd_id.IsNullOrEmpty() && !locDest.carrystd_id.IsNullOrEmpty())
|
||||
{
|
||||
var jsonArr = JArray.Parse(locDest.carrystd_id);
|
||||
var locCarryStdArr = jsonArr.Select(x => x.ToObject<string>()).ToArray();
|
||||
if (locCarryStdArr.Contains(carry.carrystd_id))
|
||||
{
|
||||
isMatch = true;
|
||||
}
|
||||
isMatch = locCarryStdArr.Contains(carry.carrystd_id);
|
||||
}
|
||||
return Task.FromResult(isMatch);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user