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();