任务执行模块修改

usertest
zhangxiaofeng 3 months ago
parent a5212eb3e2
commit 4a9206a4f2

@ -296,7 +296,12 @@ namespace DS.WMS.Core.TaskPlat
}
dynamic dynamicTask = task;
if (dynamicTask.Result != null)
if (taskObj.GetType().GetProperty("Result")?.PropertyType?.Name == "VoidTaskResult")
{
flowLogDetail.ExecuteReturn = "执行返回结果为void";
}
else
{
if (dynamicTask.Result != null)
{
@ -306,10 +311,10 @@ namespace DS.WMS.Core.TaskPlat
{
flowLogDetail.ExecuteReturn = "执行返回结果为null";
}
var isSuccess = dynamicTask.Result.Succeeded;
if (isSuccess != null && isSuccess is bool)
if (dynamicTask.Result is DataResult dataResult && dataResult != null)
{
var isSuccess = dynamicTask.Result.Succeeded;
flowLogDetail.IsSuccess = isSuccess;
if (isSuccess == false)

Loading…
Cancel
Save