From 6c37fcdb0a97f69382420653d72ff2dcbc4d849e Mon Sep 17 00:00:00 2001 From: FanLian Date: Tue, 8 Aug 2023 15:12:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=81=94=E6=A0=B8?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3Taskcode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tnb.WarehouseMgr/DeviceProviderService.cs | 2 +- .../LocationDefinitionService.cs | 22 +++++++++---------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/WarehouseMgr/Tnb.WarehouseMgr/DeviceProviderService.cs b/WarehouseMgr/Tnb.WarehouseMgr/DeviceProviderService.cs index 61588ff9..9e23a680 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/DeviceProviderService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/DeviceProviderService.cs @@ -83,7 +83,7 @@ namespace Tnb.WarehouseMgr { var eles = await _db.Queryable().LeftJoin((a, b) => a.id == b.bill_id) .LeftJoin((a, b, c) => b.location_id == c.endlocation_id) - .Where((a, b, c) => c.endlocation_code == input.targetName && c.bill_code == $"{input.taskChainCode}-{input.taskCode}") + .Where((a, b, c) => c.endlocation_code == input.targetName && c.bill_code == input.taskCode) .ToListAsync(); } catch (Exception) diff --git a/WarehouseMgr/Tnb.WarehouseMgr/LocationDefinitionService.cs b/WarehouseMgr/Tnb.WarehouseMgr/LocationDefinitionService.cs index 28853ff5..ab6a1016 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/LocationDefinitionService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/LocationDefinitionService.cs @@ -36,8 +36,6 @@ namespace Tnb.WarehouseMgr int row = 0; try { - //例1 获取所有表 - List> dics = await ImportExcelToMemory(file); List locs = new List(); BasLocation loc = new BasLocation(); @@ -55,16 +53,16 @@ namespace Tnb.WarehouseMgr } } locs.ForEach(x => - { - x.id = SnowflakeIdHelper.NextId(); - x.org_id = _userManager.User.OrganizeId; - x.is_lock = 0; - x.create_id = _userManager.UserId; - x.create_time = DateTime.Now; - x.modify_id = null; - x.modify_time = null; - x.is_mix = 1; - }); + { + x.id = SnowflakeIdHelper.NextId(); + x.org_id = _userManager.User.OrganizeId; + x.is_lock = 0; + x.create_id = _userManager.UserId; + x.create_time = DateTime.Now; + x.modify_id = null; + x.modify_time = null; + x.is_mix = 1; + }); await _db.Ado.BeginTranAsync(); row = await _db.Insertable(locs).ExecuteCommandAsync(); From dfd2b7ddb50f018191b9b25016f3a8d135d2d6da Mon Sep 17 00:00:00 2001 From: FanLian Date: Tue, 8 Aug 2023 15:13:01 +0800 Subject: [PATCH 2/2] 1 --- WarehouseMgr/Tnb.WarehouseMgr/DeviceProviderService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WarehouseMgr/Tnb.WarehouseMgr/DeviceProviderService.cs b/WarehouseMgr/Tnb.WarehouseMgr/DeviceProviderService.cs index 9e23a680..0cfb0e10 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/DeviceProviderService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/DeviceProviderService.cs @@ -60,7 +60,7 @@ namespace Tnb.WarehouseMgr { var eles = await _db.Queryable().LeftJoin((a, b) => a.id == b.bill_id) .LeftJoin((a, b, c) => b.location_id == c.startlocation_id) - .Where((a, b, c) => c.startlocation_code == input.sourceName && c.bill_code == $"{input.taskChainCode}-{input.taskCode}") + .Where((a, b, c) => c.startlocation_code == input.sourceName && c.bill_code == input.taskCode) .ToListAsync(); } catch (Exception) @@ -141,7 +141,7 @@ namespace Tnb.WarehouseMgr { try { - var disTasks = await _db.Queryable().Where(it => it.bill_code.Contains($"{input.taskChainCode}-{input.taskCode}")).ToListAsync(); + var disTasks = await _db.Queryable().Where(it => it.bill_code.Contains(input.taskCode)).ToListAsync(); if (input.action == "取货") { TaskExecuteAfterUpInput taskExecuteAfterUpInput = new() @@ -179,7 +179,7 @@ namespace Tnb.WarehouseMgr { var eles = await _db.Queryable().LeftJoin((a, b) => a.id == b.bill_id) .LeftJoin((a, b, c) => b.location_id == c.startlocation_id) - .Where((a, b, c) => c.startlocation_code == input.sourceName && c.bill_code == $"{input.taskChainCode}-{input.taskCode}") + .Where((a, b, c) => c.startlocation_code == input.sourceName && c.bill_code == input.taskCode) .ToListAsync(); } catch (Exception)