From eaf35219a20bafed2158374674c61b028a413652 Mon Sep 17 00:00:00 2001 From: liuwf Date: Mon, 28 Oct 2024 16:35:16 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SlnMesnac.Business/ProdCompletionBusiness.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/SlnMesnac.Business/ProdCompletionBusiness.cs b/SlnMesnac.Business/ProdCompletionBusiness.cs index 719a3cd..0b3743c 100644 --- a/SlnMesnac.Business/ProdCompletionBusiness.cs +++ b/SlnMesnac.Business/ProdCompletionBusiness.cs @@ -80,7 +80,7 @@ namespace SlnMesnac.Business _mesProductOrderService = serviceProvider.GetRequiredService(); _baseMaterialInfoService = serviceProvider.GetRequiredService(); Init(); - + } private void test() @@ -92,13 +92,14 @@ namespace SlnMesnac.Business WmsBaseLocation source = sqlSugarClient.AsTenant().GetConnection("mes").Queryable().Where(x => x.LocationCode == "3114").First(); WmsBaseLocation target = sqlSugarClient.AsTenant().GetConnection("mes").Queryable().Where(x => x.LocationCode == "3314").First(); - palletCode1 = source.ContainerCode; + // palletCode1 = source.ContainerCode; - source.ContainerCode = target.ContainerCode; - target.ContainerCode = palletCode1; + // source.ContainerCode = target.ContainerCode; + target.ContainerCode = source.ContainerCode; sqlSugarClient.AsTenant().GetConnection("mes").Updateable(source).ExecuteCommand(); sqlSugarClient.AsTenant().GetConnection("mes").Updateable(target).ExecuteCommand(); sqlSugarClient.AsTenant().CommitTran(); + }catch(Exception ex) { sqlSugarClient.AsTenant().RollbackTran();