change-添加测试方法

dev
liuwf 4 weeks ago
parent 856ddfa978
commit 8f27f95f2b

@ -80,12 +80,29 @@ namespace SlnMesnac.Business
_mesProductOrderService = serviceProvider.GetRequiredService<IMesProductOrderService>(); _mesProductOrderService = serviceProvider.GetRequiredService<IMesProductOrderService>();
_baseMaterialInfoService = serviceProvider.GetRequiredService<IBaseMaterialInfoService>(); _baseMaterialInfoService = serviceProvider.GetRequiredService<IBaseMaterialInfoService>();
Init(); Init();
} }
private void test() 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"); // MesProductPlanDetail? mesProductPlanDetail = sqlSugarClient.AsTenant().GetConnection("mes").Queryable<MesProductPlanDetail>().First(x => x.PlanCode == "20240724144533JL001");
//sqlSugarClient.AsTenant().BeginTran(); //sqlSugarClient.AsTenant().BeginTran();
//string epc = "JYHB01010102"; //string epc = "JYHB01010102";
@ -94,7 +111,7 @@ namespace SlnMesnac.Business
//BindingBarCode(bigCode, epc, productPlanDto); //BindingBarCode(bigCode, epc, productPlanDto);
//sqlSugarClient.AsTenant().BeginTran(); //sqlSugarClient.AsTenant().BeginTran();
} }
// 3114
private static bool isEmptyPalletHandleRunning = false; private static bool isEmptyPalletHandleRunning = false;
public void Init() public void Init()

Loading…
Cancel
Save