电梯锁优化
This commit is contained in:
@@ -177,25 +177,6 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//Logger.LogInformation($@"【定时任务CheckGet】 {strs[2]}信号为空 {strs[2]}");
|
||||
//var DistaskH = _repository.AsSugarClient().Queryable<WmsDistaskH>().Where(p => p.startlocation_code == key && p.status == WmsWareHouseConst.TASK_BILL_STATUS_YXD_ID && string.IsNullOrEmpty(p.extras)).First();
|
||||
//if (DistaskH != null)
|
||||
//{
|
||||
// dynamic reqBody = new ExpandoObject();
|
||||
// reqBody.taskCode = DistaskH.bill_code;
|
||||
// reqBody.slotCode = key;
|
||||
// reqBody.containerCode = DistaskH.carry_code;
|
||||
// CancellationTokenSource Ctu = new();
|
||||
// Logger.LogInformation($"【定时任务CheckGet】 开始发送请求到 http://192.168.11.104:1880/wcs/notify/cargo ");
|
||||
// dynamic respBody = HttpClientHelper.PostStreamAsync("http://192.168.11.104:1880/wcs/notify/cargo", reqBody, Ctu.Token).Result;
|
||||
// Logger.LogInformation($"【定时任务CheckGet】 接收请求 http://192.168.11.104:1880/wcs/notify/cargo 结果 {respBody} ");
|
||||
// DistaskH.extras = respBody;
|
||||
// _repository.AsSugarClient().Updateable(DistaskH).ExecuteCommand();
|
||||
// Ctu.Dispose();
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -801,8 +782,6 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
{
|
||||
var strs = dic.Where(p => p.Key == key).First().Value;
|
||||
|
||||
//Logger.LogInformation($"【定时任务SSXcode】 {key}->{strs[0]} 采集结果:{resflag}");
|
||||
|
||||
bool re = await GetBoolTag(key, strs[0]);
|
||||
if (!re)
|
||||
continue;
|
||||
@@ -1029,6 +1008,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
carryBindInput.membercarry_id = LX.id;
|
||||
carryBindInput.membercarry_code = LX.carry_code;
|
||||
carryBindInput.carrystd_id = rack.carrystd_id;
|
||||
carryBindInput.source_code = target.outbill;
|
||||
|
||||
await _wmsCarryBindService.CarryBind(carryBindInput);
|
||||
|
||||
@@ -1467,6 +1447,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
CarryBindInput carryBindInput = new() { };
|
||||
carryBindInput.carry_id = wmsMechanicalArmH.rackid;
|
||||
carryBindInput.carry_code = wmsMechanicalArmH.rackcode;
|
||||
carryBindInput.source_code = wmsMechanicalArmH.outbill;
|
||||
|
||||
await _wmsCarryBindService.CarryUnbind(carryBindInput);
|
||||
|
||||
@@ -1629,7 +1610,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
//valueJson["Value"] = value;
|
||||
|
||||
//_redisData.SetHash(DevName, tag, valueJson.ToString());
|
||||
return true;
|
||||
//return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -19,5 +19,7 @@ namespace Tnb.WarehouseMgr.Entities.Dto.Inputs
|
||||
public string? carrystd_id { get; set; }
|
||||
public string? membercarry_id { get; set; }
|
||||
public string? membercarry_code { get; set; }
|
||||
public string? source_id { get; set; }
|
||||
public string? source_code { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Tnb.WarehouseMgr
|
||||
context = new(cfg);
|
||||
|
||||
s_elevatorMap = await context.Queryable<WmsElevatorH>().ToDictionaryAsync(x => x.elevator_id, x => x.elevator_code);
|
||||
s_loadedStatusDic = context.Queryable<WmsElevatorH>().ToList().ToDictionary(x => x.elevator_id, x => x.is_use);
|
||||
s_eleUseStatusDic = context.Queryable<WmsElevatorH>().ToList().ToDictionary(x => x.elevator_id, x => x.is_use);
|
||||
|
||||
if (s_eleUseStatusDic.Count < 1)
|
||||
{
|
||||
|
||||
@@ -763,8 +763,8 @@ namespace Tnb.WarehouseMgr
|
||||
[HttpPost]
|
||||
public async Task GenTaskExecute()
|
||||
{
|
||||
await CTUTaskExecute();
|
||||
await s_taskExecuteSemaphore.WaitAsync();
|
||||
await CTUTaskExecute();
|
||||
|
||||
Stopwatch sw = Stopwatch.StartNew();
|
||||
CancellationTokenSource agvCts = new();
|
||||
|
||||
@@ -226,7 +226,7 @@ namespace Tnb.WarehouseMgr
|
||||
visualDevModelCrInput.data[nameof(WmsCarrybindH.membercarry_code)] = input.membercarry_code;
|
||||
visualDevModelCrInput.data[nameof(WmsCarrybindH.type)] = 0;
|
||||
visualDevModelCrInput.data[nameof(WmsCarrybindH.carrystd_id)] = carry.carrystd_id;
|
||||
visualDevModelCrInput.data[nameof(WmsCarrybindH.create_id)] = input.create_id;
|
||||
//visualDevModelCrInput.data[nameof(WmsCarrybindH.create_id)] = input.create_id;
|
||||
visualDevModelCrInput.data[nameof(WmsCarrybindH.create_time)] = DateTime.Now;
|
||||
visualDevModelCrInput.data[nameof(WmsCarrybindH.loc)] = 1;
|
||||
VisualDevEntity? templateEntity = await _visualDevService.GetInfoById(ModuleConsts.MODULE_WMSCARRYBIND_ID, true);
|
||||
@@ -295,7 +295,7 @@ namespace Tnb.WarehouseMgr
|
||||
visualDevModelCrInput.data[nameof(WmsCarrybindH.create_id)] = input.create_id;
|
||||
visualDevModelCrInput.data[nameof(WmsCarrybindH.create_time)] = DateTime.Now;
|
||||
visualDevModelCrInput.data[nameof(WmsCarrybindH.loc)] = 1;
|
||||
VisualDevEntity? templateEntity = await _visualDevService.GetInfoById(ModuleConsts.MODULE_WMSCARRYBIND_ID, true);
|
||||
VisualDevEntity? templateEntity = await _visualDevService.GetInfoById(ModuleConsts.MODULE_WMSCARRYUNBIND_ID, true);
|
||||
await _runService.Create(templateEntity, visualDevModelCrInput);
|
||||
|
||||
await db.Ado.CommitTranAsync();
|
||||
|
||||
Reference in New Issue
Block a user