|
|
@ -92,13 +92,14 @@ namespace SlnMesnac.Business
|
|
|
|
|
|
|
|
|
|
|
|
WmsBaseLocation source = sqlSugarClient.AsTenant().GetConnection("mes").Queryable<WmsBaseLocation>().Where(x => x.LocationCode == "3114").First();
|
|
|
|
WmsBaseLocation source = sqlSugarClient.AsTenant().GetConnection("mes").Queryable<WmsBaseLocation>().Where(x => x.LocationCode == "3114").First();
|
|
|
|
WmsBaseLocation target = sqlSugarClient.AsTenant().GetConnection("mes").Queryable<WmsBaseLocation>().Where(x => x.LocationCode == "3314").First();
|
|
|
|
WmsBaseLocation target = sqlSugarClient.AsTenant().GetConnection("mes").Queryable<WmsBaseLocation>().Where(x => x.LocationCode == "3314").First();
|
|
|
|
palletCode1 = source.ContainerCode;
|
|
|
|
// palletCode1 = source.ContainerCode;
|
|
|
|
|
|
|
|
|
|
|
|
source.ContainerCode = target.ContainerCode;
|
|
|
|
// source.ContainerCode = target.ContainerCode;
|
|
|
|
target.ContainerCode = palletCode1;
|
|
|
|
target.ContainerCode = source.ContainerCode;
|
|
|
|
sqlSugarClient.AsTenant().GetConnection("mes").Updateable<WmsBaseLocation>(source).ExecuteCommand();
|
|
|
|
sqlSugarClient.AsTenant().GetConnection("mes").Updateable<WmsBaseLocation>(source).ExecuteCommand();
|
|
|
|
sqlSugarClient.AsTenant().GetConnection("mes").Updateable<WmsBaseLocation>(target).ExecuteCommand();
|
|
|
|
sqlSugarClient.AsTenant().GetConnection("mes").Updateable<WmsBaseLocation>(target).ExecuteCommand();
|
|
|
|
sqlSugarClient.AsTenant().CommitTran();
|
|
|
|
sqlSugarClient.AsTenant().CommitTran();
|
|
|
|
|
|
|
|
|
|
|
|
}catch(Exception ex)
|
|
|
|
}catch(Exception ex)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
sqlSugarClient.AsTenant().RollbackTran();
|
|
|
|
sqlSugarClient.AsTenant().RollbackTran();
|
|
|
|