From 8326222e65f0bb258c99d93f1954d7696c4ef00d Mon Sep 17 00:00:00 2001 From: wankeda <Administrator@DESKTOP-HAU3ST3> Date: 星期三, 12 二月 2025 11:28:03 +0800 Subject: [PATCH] 1 --- WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs | 21 +++++++++++++++------ 1 files changed, 15 insertions(+), 6 deletions(-) diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs b/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs index 271c05a..df24b9a 100644 --- a/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs +++ b/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); } } -- Gitblit v1.9.3