待灭菌仓流程,erp采购订单接口,日志完善
This commit is contained in:
@@ -651,13 +651,13 @@ namespace Tnb.WarehouseMgr
|
||||
|
||||
public async Task<bool> Check(string code, string action)
|
||||
{
|
||||
Logger.Information($"【Check】 判断CTU是否可以取货 {code} {action}");
|
||||
Logger.Information($"【Check】 判断KIVA是否可以{action} {code}");
|
||||
Dictionary<string, string[]> putdic = new Dictionary<string, string[]>();
|
||||
Dictionary<string, string[]> getdic = new Dictionary<string, string[]>();
|
||||
putdic.Add("ZSSSXCTU02", new string[] { "YTCS", "AllowCtuFullOut_CS04", });
|
||||
putdic.Add("ZSSSXCTU01", new string[] { "YTCS", "AllowCtuFullOut_CS02", });
|
||||
getdic.Add("ZSSSXCTU01", new string[] { "YTCS", "AllowAgvEmptyOut_CS01" });
|
||||
getdic.Add("ZSSSXCTU02", new string[] { "YTCS", "AllowAgvEmptyOut_CS03" });
|
||||
putdic.Add("ZSSSXCTU02", new string[] { "YTCS", "左输送线下层允许入箱4", });
|
||||
putdic.Add("ZSSSXCTU01", new string[] { "YTCS", "左输送线下层允许入箱2", });
|
||||
getdic.Add("ZSSSXCTU01", new string[] { "YTCS", "输送线上层允许出箱1" });
|
||||
getdic.Add("ZSSSXCTU02", new string[] { "YTCS", "输送线上层允许出箱3" });
|
||||
|
||||
#region 注塑车间点位
|
||||
putdic.Add("ZS-C01-1", new string[] { "hxjC", "A2允许入空箱", });
|
||||
@@ -751,18 +751,18 @@ namespace Tnb.WarehouseMgr
|
||||
strs = getdic.Where(p => p.Key == code).First().Value;
|
||||
|
||||
bool flag = await _redisData.HashExists(strs[0], strs[1]);
|
||||
Logger.Information($"【Check】{action} 判断CTU是否可以取货1 获取{code}的标签{strs[1]}是否存在 结果为:{flag} ");
|
||||
Logger.Information($"【Check】{action} 判断KIVA是否可以取货(信号是否存在) 获取{code}的标签{strs[1]}是否存在 结果为:{flag} ");
|
||||
if (!flag)
|
||||
{
|
||||
throw new Exception($"【Check】{action} 判断CTU是否可以取货1 获取{code}的标签{strs[1]}是否存在 结果为:{flag} ");
|
||||
throw new Exception($"【Check】{action} 判断KIVA是否可以取货(信号是否存在) 获取{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】{action} 判断CTU是否可以取货2 获取{code}的标签{strs[1]}信号值 结果为:{result} ");
|
||||
Logger.Information($"【Check】{action} 判断KIVA是否可以取货(信号是否允许) 获取{code}的标签{strs[1]}信号值 结果为:{result} ");
|
||||
if (!result)
|
||||
{
|
||||
throw new Exception($"【Check】{action} 判断CTU是否可以取货2 获取{code}的标签{strs[1]}信号值 结果为:{result} ");
|
||||
throw new Exception($"【Check】{action} 判断KIVA是否可以取货(信号是否允许) 获取{code}的标签{strs[1]}信号值 结果为:{result} ");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -773,18 +773,18 @@ namespace Tnb.WarehouseMgr
|
||||
strs = putdic.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】 判断CTU是否可以放货(信号是否存在) 获取{code}的标签{strs[1]}是否存在 结果为:{flag} ");
|
||||
if (!flag)
|
||||
{
|
||||
throw new Exception($"【Check】 判断CTU是否可以取货1 {code} {action} flag:{flag} ");
|
||||
throw new Exception($"【Check】 判断CTU是否可以放货(信号是否存在) 获取{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】 判断CTU是否可以放货(信号是否允许) 获取{code}的标签{strs[1]}信号值 结果为:{result}");
|
||||
if (!result)
|
||||
{
|
||||
throw new Exception($"【Check】 判断CTU是否可以取货2 {code} {action} result:{result} ");
|
||||
throw new Exception($"【Check】 判断CTU是否可以放货(信号是否允许) 获取{code}的标签{strs[1]}信号值 结果为:{result} ");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user