public WCSOutStockTaskItemViewModel(OutStockInfo outStockInfo, CreateOutStockResult result)
        {
            this.Title    = "出库任务" + outStockInfo.TaskId;
            _outStockInfo = outStockInfo;
            _result       = result;

            this.Datas.Add(new TaskItemData("收到消息", JsonConvert.SerializeObject(outStockInfo)));
            this.Datas.Add(new TaskItemData("消息回复", JsonConvert.SerializeObject(result)));
        }
        public CreateOutStockResult CreateOutStock([FromBody] OutStockInfo outStockInfo)
        {
            CreateOutStockResult result = new CreateOutStockResult()
            {
                Successd = true
            };

            _eventBus.Post(new KeyValuePair <OutStockInfo, CreateOutStockResult>(outStockInfo, result), TimeSpan.Zero);
            return(result);
        }
        /// <summary>
        /// 创建WCS出库任务
        /// </summary>
        /// <param name="stockOutTask"></param>
        /// <returns></returns>
        public async Task <CreateOutStockResult> CreateStockOutTask([JsonContent] StockOutTaskInfo stockOutTask)
        {
            if (_apiProxy == null)
            {
                return(new CreateOutStockResult()
                {
                    Successd = true
                });
            }
            CreateOutStockResult result = await _apiProxy.CreateStockOut(stockOutTask);

            return(result);
        }