|
|
@ -2750,9 +2750,35 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
public async Task<DataResult> TestTaskFlow(string taskType, long taskId, int testType)
|
|
|
|
public async Task<DataResult> TestTaskFlow(string taskType, long taskId, int testType)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var tenantDb = saasDbService.GetBizDbScopeById(user.TenantId);
|
|
|
|
var tenantDb = saasDbService.GetBizDbScopeById(user.TenantId);
|
|
|
|
|
|
|
|
var t11 = tenantDb.ContextID;
|
|
|
|
switch (testType)
|
|
|
|
switch (testType)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
// 事务测试
|
|
|
|
|
|
|
|
case 5:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
try
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
await tenantDb.Ado.BeginTranAsync();
|
|
|
|
|
|
|
|
var t1 = tenantDb.ContextID;
|
|
|
|
|
|
|
|
var t2 = await tenantDb.Queryable<TaskFlowLogDetail>().Where(x => x.Id == taskId).ToListAsync();
|
|
|
|
|
|
|
|
var m = new TaskFlowLogDetail()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
ModuleName = taskId.ToString()
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
var t3 = await tenantDb.Insertable(m).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var service = serviceProvider.GetRequiredService<ITaskManageBCService>();
|
|
|
|
|
|
|
|
await service.TestDelete(taskId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await tenantDb.Ado.CommitTranAsync();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (Exception)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
await tenantDb.Ado.RollbackTranAsync();
|
|
|
|
|
|
|
|
throw;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
// 任务编排执行测试
|
|
|
|
// 任务编排执行测试
|
|
|
|
case 1:
|
|
|
|
case 1:
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -2810,7 +2836,6 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
// 判断条件测试
|
|
|
|
// 判断条件测试
|
|
|
|
case 4:
|
|
|
|
case 4:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
logger.LogInformation("fdfdfd");
|
|
|
|
|
|
|
|
var condition = await tenantDb.Queryable<TaskFlowCondition>().FirstAsync(x => x.Id == 4001);
|
|
|
|
var condition = await tenantDb.Queryable<TaskFlowCondition>().FirstAsync(x => x.Id == 4001);
|
|
|
|
if (condition != null)
|
|
|
|
if (condition != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|