chengsc
2024-10-30 0653b5bee559d54fe8ac519aa98115e6a8aa31b0
Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
@@ -429,34 +429,34 @@
                {
                    new OperationASNServer().AddLogOperationAsn("入库作业", "入库单据", model.ASNNo, "添加", $"添加了单据号为{model.ASNNo}的单据信息", Convert.ToInt32(model.CreateUser));
                    //if (addOder.Count > 0)
                    //{
                    //    // 正式运行程序放开
                    //    var jsonData = JsonConvert.SerializeObject(addOder);
                    //    string response = "";
                    if (addOder.Count > 0)
                    {
                        // 正式运行程序放开
                        var jsonData = JsonConvert.SerializeObject(addOder);
                        string response = "";
                    //    try
                    //    {
                    //        var time1 = DateTime.Now;//发送时间 .ToString("yyyy-MM-dd HH:mm:ss")
                    //        //给WCS下发入库单信息
                    //        response = HttpHelper.DoPost(url, jsonData, "下发给WCS出库命令", "WCS");
                        try
                        {
                            var time1 = DateTime.Now;//发送时间 .ToString("yyyy-MM-dd HH:mm:ss")
                            //给WCS下发入库单信息
                            response = HttpHelper.DoPost(url, jsonData, "下发给WCS出库命令", "WCS");
                    //        //////解析返回数据
                    //        var wcsModel = JsonConvert.DeserializeObject<WcsModel>(response);
                    //        if (wcsModel.StatusCode == 0)
                    //        {
                    //        }
                    //        if (wcsModel.StatusCode == -1)
                    //        {
                            //解析返回数据
                            var wcsModel = JsonConvert.DeserializeObject<WcsModel>(response);
                            if (wcsModel.StatusCode == 0)
                            {
                    //        }
                    //    }
                    //    catch (Exception ex)
                    //    {
                    //        throw new Exception(ex.Message);
                    //    }
                    //}
                            }
                            if (wcsModel.StatusCode == -1)
                            {
                                throw new Exception($"下发WCS失败:{wcsModel.Msg}");
                            }
                        }
                        catch (Exception ex)
                        {
                            throw new Exception(ex.Message);
                        }
                    }
                    return strMessage;
                }
                else