1
wankeda
2025-02-12 8326222e65f0bb258c99d93f1954d7696c4ef00d
WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs
@@ -42,13 +42,23 @@
                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",
@@ -66,7 +76,7 @@
                        //var responses = HttpHelper.Post<WebResponseContent>(ReceiveTask, tasks, "立库出库数量回传WMS");
                    }
                }
            }
            BaseDal.AddData(tasks);
            return tasks;
@@ -176,8 +186,8 @@
                    MaterielName = outboundOrderDetail.MaterielName,
                    UseableQuantity = outboundOrderDetail.OrderQuantity,
                    BatchNo = outboundOrderDetail.BatchNo,
                    LinId=outboundOrderDetail.LinId,
                    PalletCode=outboundOrderDetail.LPNNo,
                    LinId = outboundOrderDetail.LinId,
                    PalletCode = outboundOrderDetail.LPNNo,
                };
                stockSelectViews.Add(stockSelectViewDTO);
@@ -236,7 +246,6 @@
                //stockSelectViewDTO.PalletCode = orderAddDTO1;
                //stockSelectViewDTO.LocationCode = orderAddDTO1;
                GenerateOutboundTasks(oldOutboundOrder.Id, stockSelectViews);
                content = WebResponseContent.Instance.OK();
            }
@@ -310,7 +319,7 @@
            }
            catch (Exception ex)
            {
                return WebResponseContent.Instance.Error(ex.Message);
                throw new Exception(ex.Message);
            }
        }