| | |
| | | if (stockInfo != null) |
| | | { |
| | | Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == stockInfo.LocationCode); |
| | | Dt_Task dt_Task = BaseDal.QueryFirst(x => x.SourceAddress == locationInfo.LocationCode || x.TargetAddress == locationInfo.LocationCode); |
| | | if (dt_Task != null) |
| | | { |
| | | throw new Exception("该货位已存在起点任务或终点任务"); |
| | | } |
| | | Dt_Task dt_Task1 = BaseDal.QueryFirst(x => x.PalletCode == stockInfo.PalletCode); |
| | | if (dt_Task1 != null) |
| | | { |
| | | throw new Exception("该托盘已存在任务"); |
| | | } |
| | | Dt_RoadwayInfo roadwayInfo = _basicService.RoadwayInfoService.Repository.QueryFirst(x => x.RoadwayNo == locationInfo.RoadwayNo); |
| | | Dt_StockInfoDetail stockInfoDetail = _stockService.StockInfoDetailService.Repository.QueryFirst(x => x.StockId == stockInfo.Id); |
| | | if (roadwayInfo != null) |
| | | { |
| | | Dt_Task task = new() |
| | | { |
| | | OrderNo=stockInfoDetail.OrderNo, |
| | | OrderNo = stockInfoDetail.OrderNo, |
| | | CurrentAddress = "0", |
| | | Grade = 0, |
| | | Creater = "WMS", |
| | |
| | | //var responses = HttpHelper.Post<WebResponseContent>(ReceiveTask, tasks, "立库出库数量回传WMS"); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | BaseDal.AddData(tasks); |
| | | return tasks; |
| | |
| | | MaterielName = outboundOrderDetail.MaterielName, |
| | | UseableQuantity = outboundOrderDetail.OrderQuantity, |
| | | BatchNo = outboundOrderDetail.BatchNo, |
| | | LinId=outboundOrderDetail.LinId, |
| | | PalletCode=outboundOrderDetail.LPNNo, |
| | | LinId = outboundOrderDetail.LinId, |
| | | PalletCode = outboundOrderDetail.LPNNo, |
| | | }; |
| | | stockSelectViews.Add(stockSelectViewDTO); |
| | | |
| | |
| | | |
| | | //stockSelectViewDTO.PalletCode = orderAddDTO1; |
| | | //stockSelectViewDTO.LocationCode = orderAddDTO1; |
| | | |
| | | GenerateOutboundTasks(oldOutboundOrder.Id, stockSelectViews); |
| | | content = WebResponseContent.Instance.OK(); |
| | | } |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | throw new Exception(ex.Message); |
| | | } |
| | | } |
| | | |