using DS.Module.Core; using DS.Module.Core.Data; using DS.WMS.Core.TaskPlat.Dtos; using DS.WMS.Core.TaskPlat.Interface; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DS.WMS.Core.TaskPlat.Method { public class MyModuleTest1 : IMyModuleTest1 { public Task TestMethod11(TaskFlowDataContext dataContext) { //throw new ArgumentException("缺少参数:Age"); var address = dataContext.Get("Address"); var height = dataContext.Get("Height"); var info = dataContext.Get(nameof(TaskManageOrderMessageInfo)); var bcInfoVessel = info?.Main?.BCInfo.Vessel; //return Task.FromResult(DataResult.Successed($"TestMethod11返回的成功结果,address:{address},height:{height},bcInfoVessel:{bcInfoVessel}")); return Task.FromResult(DataResult.Failed($"TestMethod11返回的失败结果,address:{address},height:{height},bcInfoVessel:{bcInfoVessel}")); } //public Task TestMethod11() //{ // return Task.FromResult(DataResult.Successed($"TestMethod11返回的成功结果")); //} public Task TestMethod12(TaskFlowDataContext dataContext) { //throw new Exception("TestMethod12内的测试异常"); //return Task.FromResult(DataResult.Successed($"TestMethod12返回的成功结果")); return Task.FromResult(DataResult.Failed($"TestMethod12返回的失败结果")); } } }