| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 下发入库申请储位任务(下发==》AGV小车) |
| | | /// 下发入库申请储位任务(下发==》WCS) |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | |
| | | try |
| | | { |
| | | var time1 = DateTime.Now;//发送时间 .ToString("yyyy-MM-dd HH:mm:ss") |
| | | //response = HttpHelper.DoPost(url, jsonData, "下发给AGV叫料出库命令", "AGV"); |
| | | response = HttpHelper.DoPost(url, jsonData, "下发给WCS入库命令", "WCS"); |
| | | var time2 = DateTime.Now;//返回时间 .ToString("yyyy-MM-dd HH:mm:ss") |
| | | var list = new List<string>() { model.TaskNo }; |
| | | //解析返回数据 |
| | | var wcsModel = JsonConvert.DeserializeObject<WcsModel>(response); |
| | | if (wcsModel.StatusCode == 0) |
| | | { |
| | | //更改任务的发送返回时间// |
| | | new TaskServer().EditTaskIssueOk(list, time1, time2); |
| | | |
| | | ////解析返回数据 |
| | | //var wcsModel = JsonConvert.DeserializeObject<WcsModel>(response); |
| | | //if (wcsModel.StatusCode == 0) |
| | | //{ |
| | | // //更改任务的发送返回时间// |
| | | //new TaskServer().EditTaskIssueOk(list2, time1, time2); |
| | | |
| | | //} |
| | | //if (wcsModel.StatusCode == -1) |
| | | //{ |
| | | // new TaskServer().EditTaskIssueNo(list2, time1, time2, wcsModel.Msg); |
| | | // throw new Exception(wcsModel.Msg); |
| | | //} |
| | | } |
| | | if (wcsModel.StatusCode == -1) |
| | | { |
| | | new TaskServer().EditTaskIssueNo(list, time1, time2, wcsModel.Msg); |
| | | throw new Exception(wcsModel.Msg); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |