From 58521fa3ea566b5c1991566b499d8c885d9e3e63 Mon Sep 17 00:00:00 2001 From: zhou keda <1315948824@qq.com> Date: Tue, 21 May 2024 10:25:22 +0800 Subject: [PATCH] bug --- .../Tnb.ProductionMgr/TimeWorkService.cs | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs b/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs index 71833489..7441dc26 100644 --- a/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs @@ -96,13 +96,13 @@ namespace Tnb.ProductionMgr if (cs01==true && !cs01Flag) { BasFactoryConfig config = await _repository.AsSugarClient().Queryable().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.DOMAIN); - HttpUtils.RequestGet($"http://localhost:9232/api/production/time-work/empty-carry-out-stk-left"); + HttpUtils.RequestGet($"{config.value}/api/production/time-work/empty-carry-out-stk-left"); } if (cs03==true && !cs03Flag) { BasFactoryConfig config = await _repository.AsSugarClient().Queryable().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.DOMAIN); - HttpUtils.RequestGet($"http://localhost:9232/api/production/time-work/empty-carry-out-stk-right"); + HttpUtils.RequestGet($"{config.value}/api/production/time-work/empty-carry-out-stk-right"); } return Task.CompletedTask; @@ -167,26 +167,24 @@ namespace Tnb.ProductionMgr } var db = _repository.AsSugarClient(); - Dictionary postData = new Dictionary(); + BasLocation startLocation = await db.Queryable().Where(x=>x.location_code==startLocationCode).FirstAsync(); + CommonCreatePretaskInput postData = new CommonCreatePretaskInput(); + postData.startlocation_id = startLocation.id; + // postData.endlocation_id = - - Dictionary header = new() - { - ["Authorization"] = App.HttpContext != null ? App.HttpContext.Request.Headers["Authorization"] : "" - }; BasFactoryConfig config = await db.Queryable().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.DOMAIN); - string sendResult = HttpUtils.RequestPost($"{config.value}/api/visualdev/OnlineDev/{ModuleConsts.MODULE_WMSDELIVERYPDA_ID}", JsonConvert.SerializeObject(postData), header); - - AuthResponse authResponse = JsonConvert.DeserializeObject(sendResult); - if(authResponse.code == 200 && authResponse.data.ObjToBool()) - { - Log.Information("【FixedPointDelivery】注塑定点配送成功"); - //_redisData.Set("DB100.132.0_flag", true, TimeSpan.FromMinutes(20)); - } - else - { - Log.Information(sendResult); - } + // string sendResult = HttpUtils.RequestPost($"{config.value}/api/wms/ware-house/common-create-pretask", JsonConvert.SerializeObject(postData), header); + // + // AuthResponse authResponse = JsonConvert.DeserializeObject(sendResult); + // if(authResponse.code == 200 && authResponse.data.ObjToBool()) + // { + // Log.Information("【FixedPointDelivery】注塑定点配送成功"); + // //_redisData.Set("DB100.132.0_flag", true, TimeSpan.FromMinutes(20)); + // } + // else + // { + // Log.Information(sendResult); + // } }