bug修复
This commit is contained in:
@@ -71,7 +71,7 @@ namespace Tnb.WarehouseMgr
|
||||
private readonly ElevatorControlConfiguration _eleCtlCfg = App.Configuration.Build<ElevatorControlConfiguration>();
|
||||
private static Dictionary<string, object> locMap = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);
|
||||
private readonly IConfiguration _configuration;
|
||||
private readonly RedisData _redisData;
|
||||
private readonly StackExRedisHelper _redisData;
|
||||
private readonly IVisualDevService _visualDevService;
|
||||
private readonly IRunService _runService;
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace Tnb.WarehouseMgr
|
||||
public Func<string, int, Task> AddUnExecuteTask { get; set; }
|
||||
|
||||
|
||||
public WareHouseService(ISqlSugarRepository<WmsInstockH> repository, IDictionaryDataService dictionaryDataService, RedisData redisData,
|
||||
public WareHouseService(ISqlSugarRepository<WmsInstockH> repository, IDictionaryDataService dictionaryDataService, StackExRedisHelper redisData,
|
||||
IBillRullService billRullService, IUserManager userManager, ICacheManager cacheManager, IElevatorControlService elevatorControlService,
|
||||
IWmsCarryBindService wmsCarryBindService,
|
||||
IRunService runService,
|
||||
@@ -389,7 +389,7 @@ namespace Tnb.WarehouseMgr
|
||||
throw new AppFriendlyException("点位" + input.targetName + "不存在", 500);
|
||||
strs = putdic.Where(p => p.Key == input.targetName).First().Value;
|
||||
|
||||
bool flag = await _redisData.HashExist(strs[0], strs[1]);
|
||||
bool flag = await _redisData.HashExists(strs[0], strs[1]);
|
||||
if (!flag)
|
||||
{
|
||||
throw new AppFriendlyException("点位" + input.targetName + "不存在", 500);
|
||||
@@ -423,7 +423,7 @@ namespace Tnb.WarehouseMgr
|
||||
|
||||
putdic.Add("ZS-C02-1", new string[] { "hxjC", "A3允许入空箱", });
|
||||
getdic.Add("ZS-C02-2", new string[] { "hxjC", "A3允许取满箱" });
|
||||
|
||||
|
||||
putdic.Add("ZS-C03-1", new string[] { "hxjC", "A4允许入空箱", });
|
||||
getdic.Add("ZS-C03-2", new string[] { "hxjC", "A4允许取满箱" });
|
||||
|
||||
@@ -436,6 +436,7 @@ namespace Tnb.WarehouseMgr
|
||||
putdic.Add("ZS-C06-1", new string[] { "hxjC", "A7允许入空箱", });
|
||||
getdic.Add("ZS-C06-2", new string[] { "hxjC", "A7允许取满箱" });
|
||||
var strs = new string[] { };
|
||||
|
||||
if (action == "LOAD")//取货
|
||||
{
|
||||
if (!getdic.ContainsKey(code))
|
||||
@@ -444,15 +445,16 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
strs = getdic.Where(p => p.Key == code).First().Value;
|
||||
|
||||
bool flag = _redisData.HashExist(strs[0], strs[1]).Result;
|
||||
bool flag = await _redisData.HashExists(strs[0], strs[1]);
|
||||
Logger.Information($"【Check】 判断CTU是否可以取货1 {code} {action} flag:{flag} ");
|
||||
if (!flag)
|
||||
{
|
||||
Logger.Information($"【Check】 判断CTU是否可以取货 {code} {action} flag:{flag} ");
|
||||
return false;
|
||||
}
|
||||
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;
|
||||
return true;
|
||||
@@ -463,15 +465,16 @@ namespace Tnb.WarehouseMgr
|
||||
return false;
|
||||
strs = putdic.Where(p => p.Key == code).First().Value;
|
||||
|
||||
bool flag = _redisData.HashExist(strs[0], strs[1]).Result;
|
||||
bool flag = await _redisData.HashExists(strs[0], strs[1]);
|
||||
Logger.Information($"【Check】 判断CTU是否可以取货1 {code} {action} flag:{flag} ");
|
||||
if (!flag)
|
||||
{
|
||||
Logger.Information($"【Check】 判断CTU是否可以取货 {code} {action} flag:{flag} ");
|
||||
return false;
|
||||
}
|
||||
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;
|
||||
return true;
|
||||
@@ -749,7 +752,7 @@ namespace Tnb.WarehouseMgr
|
||||
//JObject valueJson = new JObject();
|
||||
//valueJson["Value"] = value;
|
||||
|
||||
//bool res = await _redisData.HSet(DevName, tag, valueJson.ToString());
|
||||
//_redisData.SetHash(DevName, tag, valueJson.ToString());
|
||||
//return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user