bug、提示信息完善

This commit is contained in:
2024-06-18 09:01:28 +08:00
parent a945d5db15
commit a30bcf213d
6 changed files with 77 additions and 21 deletions

View File

@@ -403,8 +403,9 @@ namespace Tnb.WarehouseMgr
.OrderBy(policy.policy)
.Select<WmsCarryH>()
.Distinct()
.ToListAsync();
items = items.Distinct().ToList();
return input.Size > 0 ? items.Take(input.Size).ToList() : items;
}
@@ -555,17 +556,19 @@ namespace Tnb.WarehouseMgr
strs = getdic.Where(p => p.Key == code).First().Value;
bool flag = await _redisData.HashExists(strs[0], strs[1]);
Logger.Information($"【Check】 判断CTU是否可以取货1 {code} {action} flag:{flag} ");
Logger.Information($"【Check】{action} 判断CTU是否可以取货1 获取{code}的标签{strs[1]}是否存在 结果为:{flag} ");
if (!flag)
{
return false;
throw new Exception($"【Check】{action} 判断CTU是否可以取货1 获取{code}的标签{strs[1]}是否存在 结果为:{flag} ");
}
string data = _redisData.GetHash(strs[0], strs[1]).Result;
JObject? res = JsonConvert.DeserializeObject<JObject>(data);
bool result = res != null && res["Value"] != null ? res.Value<bool>("Value") : false;
Logger.Information($"【Check】 判断CTU是否可以取货2 {code} {action} result:{result} ");
Logger.Information($"【Check】{action} 判断CTU是否可以取货2 获取{code}的标签{strs[1]}信号值 结果为:{result} ");
if (!result)
return false;
{
throw new Exception($"【Check】{action} 判断CTU是否可以取货2 获取{code}的标签{strs[1]}信号值 结果为:{result} ");
}
return true;
}
else if (action == "UNLOAD")//放货
@@ -578,14 +581,16 @@ namespace Tnb.WarehouseMgr
Logger.Information($"【Check】 判断CTU是否可以取货1 {code} {action} flag:{flag} ");
if (!flag)
{
return false;
throw new Exception($"【Check】 判断CTU是否可以取货1 {code} {action} flag:{flag} ");
}
string data = _redisData.GetHash(strs[0], strs[1]).Result;
JObject? res = JsonConvert.DeserializeObject<JObject>(data);
bool result = res != null && res["Value"] != null ? res.Value<bool>("Value") : false;
Logger.Information($"【Check】 判断CTU是否可以取货2 {code} {action} result:{result} ");
if (!result)
return false;
{
throw new Exception($"【Check】 判断CTU是否可以取货2 {code} {action} result:{result} ");
}
return true;
}
return false;
@@ -997,6 +1002,7 @@ namespace Tnb.WarehouseMgr
for (int i = 0, cnt = items.Count; i < cnt; i++)
{
items[i].id = SnowflakeIdHelper.NextId();
items[i].create_time = DateTime.Now;
items[i].status = WmsWareHouseConst.TASK_BILL_STATUS_DZX_ID;
}
int moveNum = itGroup.First().move_num;