| | |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_DTO.Agv; |
| | | using WIDESEAWCS_Common; |
| | | using WIDESEAWCS_Common.APIEnum; |
| | | using WIDESEAWCS_Common.TaskEnum; |
| | | using WIDESEAWCS_Core; |
| | |
| | | List<Dt_WarehouseDevice> warehouseDevices = Db.Queryable<Dt_WarehouseDevice>().ToList(); |
| | | |
| | | List<Dt_Task> tasks = new List<Dt_Task>(); |
| | | |
| | | bool flag = false; |
| | | |
| | | foreach (var item in taskDTOs) |
| | | { |
| | | if (BaseDal.QueryFirst(x => x.TaskNum == item.TaskNum || x.PalletCode == item.PalletCode) != null) |
| | | { |
| | | flag = true; |
| | | continue; |
| | | } |
| | | Dt_Task task = _mapper.Map<Dt_Task>(item); |
| | |
| | | |
| | | _taskExecuteDetailService.AddTaskExecuteDetail(tasks.Select(x => x.TaskNum).ToList(), "鎺ユ敹WMS浠诲姟"); |
| | | |
| | | content = tasks.Count > 0 ? WebResponseContent.Instance.OK("鎴愬姛") : WebResponseContent.Instance.Error("澶辫触"); |
| | | content = (tasks.Count > 0 || flag) ? WebResponseContent.Instance.OK("鎴愬姛") : WebResponseContent.Instance.Error("澶辫触"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | /// <returns></returns> |
| | | public string? RequestAssignLocation(int taskNum, string roadwayNo) |
| | | { |
| | | string responseStr = HttpHelper.Get($"http://127.0.0.1:9283/api/Task/AssignInboundTaskLocation?taskNum={taskNum}&roadwayNo={roadwayNo}"); |
| | | string responseStr = HttpHelper.Get($"http://127.0.0.1:9293/api/Task/AssignInboundTaskLocation?taskNum={taskNum}&roadwayNo={roadwayNo}"); |
| | | |
| | | WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr); |
| | | if (responseContent != null && responseContent.Status && responseContent.Data != null) |