From 8f27f95f2b87508013764aa83d32656518c4c84b Mon Sep 17 00:00:00 2001 From: liuwf Date: Mon, 21 Oct 2024 08:42:44 +0800 Subject: [PATCH] =?UTF-8?q?change-=E6=B7=BB=E5=8A=A0=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SlnMesnac.Business/ProdCompletionBusiness.cs | 23 +++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/SlnMesnac.Business/ProdCompletionBusiness.cs b/SlnMesnac.Business/ProdCompletionBusiness.cs index c6b50b5..719a3cd 100644 --- a/SlnMesnac.Business/ProdCompletionBusiness.cs +++ b/SlnMesnac.Business/ProdCompletionBusiness.cs @@ -80,12 +80,29 @@ namespace SlnMesnac.Business _mesProductOrderService = serviceProvider.GetRequiredService(); _baseMaterialInfoService = serviceProvider.GetRequiredService(); Init(); - + } private void test() { - + try + { + sqlSugarClient.AsTenant().BeginTran(); + string palletCode1 = ""; + + 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; + + source.ContainerCode = target.ContainerCode; + target.ContainerCode = palletCode1; + sqlSugarClient.AsTenant().GetConnection("mes").Updateable(source).ExecuteCommand(); + sqlSugarClient.AsTenant().GetConnection("mes").Updateable(target).ExecuteCommand(); + sqlSugarClient.AsTenant().CommitTran(); + }catch(Exception ex) + { + sqlSugarClient.AsTenant().RollbackTran(); + } // MesProductPlanDetail? mesProductPlanDetail = sqlSugarClient.AsTenant().GetConnection("mes").Queryable().First(x => x.PlanCode == "20240724144533JL001"); //sqlSugarClient.AsTenant().BeginTran(); //string epc = "JYHB01010102"; @@ -94,7 +111,7 @@ namespace SlnMesnac.Business //BindingBarCode(bigCode, epc, productPlanDto); //sqlSugarClient.AsTenant().BeginTran(); } - + // 3114 private static bool isEmptyPalletHandleRunning = false; public void Init()