wxw
2024-08-17 0464969366317154fdbb51e106ca778b855bdd08
Wms/WMS.DAL/SysInfrastructure/StorageLocatRepository.cs
@@ -93,23 +93,23 @@
                    outDtoList.Add(locatEntry2);
                    // 正式运行程序放开
                    var jsonData = JsonConvert.SerializeObject(outDtoList);
                    string response = "";
                    //var jsonData = JsonConvert.SerializeObject(outDtoList);
                    //string response = "";
                    try
                    {
                        response = HttpHelper.DoPost(url, jsonData, "下发给WCS同步储位信息", "WCS");
                        //解析返回数据
                        var wcsModel = JsonConvert.DeserializeObject<WcsModel>(response);
                        if (wcsModel.StatusCode == -1)
                        {
                            throw new Exception(wcsModel.Msg);
                        }
                    }
                    catch (Exception ex)
                    {
                        throw new Exception(ex.Message);
                    }
                    //try
                    //{
                    //    response = HttpHelper.DoPost(url, jsonData, "下发给WCS同步储位信息", "WCS");
                    //    //解析返回数据
                    //    var wcsModel = JsonConvert.DeserializeObject<WcsModel>(response);
                    //    if (wcsModel.StatusCode == -1)
                    //    {
                    //        throw new Exception(wcsModel.Msg);
                    //    }
                    //}
                    //catch (Exception ex)
                    //{
                    //    throw new Exception(ex.Message);
                    //}
                }
                Db.CommitTran();
@@ -133,7 +133,7 @@
        {
            try
            {
                var locateList = GetAllWhereAsync(m => id.Contains(m.Id)).ToList();
                var locateList = GetAllWhere(m => id.Contains(m.Id)).ToList();
                if (locateList.Count == 0)
                {
                    throw new Exception($"为查询到id为{id}的储位信息");
@@ -195,23 +195,23 @@
                if (i > 0)
                {
                    // 正式运行程序放开
                    var jsonData = JsonConvert.SerializeObject(outDtoList);
                    string response = "";
                    //var jsonData = JsonConvert.SerializeObject(outDtoList);
                    //string response = "";
                    try
                    {
                        response = HttpHelper.DoPost(url, jsonData, "下发给WCS出库命令", "WCS");
                        //解析返回数据
                        var wcsModel = JsonConvert.DeserializeObject<WcsModel>(response);
                        if (wcsModel.StatusCode == -1)
                        {
                            throw new Exception(wcsModel.Msg);
                        }
                    }
                    catch (Exception ex)
                    {
                        throw new Exception(ex.Message);
                    }
                    //try
                    //{
                    //    response = HttpHelper.DoPost(url, jsonData, "下发给WCS出库命令", "WCS");
                    //    //解析返回数据
                    //    var wcsModel = JsonConvert.DeserializeObject<WcsModel>(response);
                    //    if (wcsModel.StatusCode == -1)
                    //    {
                    //        throw new Exception(wcsModel.Msg);
                    //    }
                    //}
                    //catch (Exception ex)
                    //{
                    //    throw new Exception(ex.Message);
                    //}
                }
                Db.CommitTran();
                return i > 0;