change-添加测试方法

dev
liuwf 4 weeks ago
parent 856ddfa978
commit 8f27f95f2b

@ -85,7 +85,24 @@ namespace SlnMesnac.Business
private void test()
{
try
{
sqlSugarClient.AsTenant().BeginTran();
string palletCode1 = "";
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();
palletCode1 = source.ContainerCode;
source.ContainerCode = target.ContainerCode;
target.ContainerCode = palletCode1;
sqlSugarClient.AsTenant().GetConnection("mes").Updateable<WmsBaseLocation>(source).ExecuteCommand();
sqlSugarClient.AsTenant().GetConnection("mes").Updateable<WmsBaseLocation>(target).ExecuteCommand();
sqlSugarClient.AsTenant().CommitTran();
}catch(Exception ex)
{
sqlSugarClient.AsTenant().RollbackTran();
}
// MesProductPlanDetail? mesProductPlanDetail = sqlSugarClient.AsTenant().GetConnection("mes").Queryable<MesProductPlanDetail>().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()

Loading…
Cancel
Save