| | |
| | | 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(); |
| | |
| | | { |
| | | 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}的储位信息"); |
| | |
| | | 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; |