From 94065c4920832b40f775f4a5c00a2d12df1a9baf Mon Sep 17 00:00:00 2001 From: majian <780924089@qq.com> Date: Tue, 11 Jun 2024 13:41:56 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B5=E6=A2=AF=E9=94=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tnb.ProductionMgr/RedisBackGround.cs | 25 +++---------------- .../Dto/Inputs/CarryBindInput.cs | 2 ++ .../Tnb.WarehouseMgr/DevServBase`1.cs | 2 +- .../Tnb.WarehouseMgr/WareHouseService.cs | 2 +- .../Tnb.WarehouseMgr/WmsCarryBindService.cs | 4 +-- 5 files changed, 9 insertions(+), 26 deletions(-) diff --git a/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs b/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs index 85c2df5d..2e3555b4 100644 --- a/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs +++ b/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs @@ -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().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 diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Inputs/CarryBindInput.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Inputs/CarryBindInput.cs index fa60b017..5bdd0cbb 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Inputs/CarryBindInput.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Inputs/CarryBindInput.cs @@ -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; } } } diff --git a/WarehouseMgr/Tnb.WarehouseMgr/DevServBase`1.cs b/WarehouseMgr/Tnb.WarehouseMgr/DevServBase`1.cs index 0190670d..96e383a2 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/DevServBase`1.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/DevServBase`1.cs @@ -47,7 +47,7 @@ namespace Tnb.WarehouseMgr context = new(cfg); s_elevatorMap = await context.Queryable().ToDictionaryAsync(x => x.elevator_id, x => x.elevator_code); - s_loadedStatusDic = context.Queryable().ToList().ToDictionary(x => x.elevator_id, x => x.is_use); + s_eleUseStatusDic = context.Queryable().ToList().ToDictionary(x => x.elevator_id, x => x.is_use); if (s_eleUseStatusDic.Count < 1) { diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs index 5c985023..ca4fce99 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs @@ -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(); diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsCarryBindService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsCarryBindService.cs index 1179aeca..22ef6ead 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsCarryBindService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsCarryBindService.cs @@ -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();