From 875e462062d827b109a86f6a1bccbfc853156f30 Mon Sep 17 00:00:00 2001 From: wangxinhui <wangxinhui@hnkhzn.com> Date: 星期四, 24 七月 2025 09:59:13 +0800 Subject: [PATCH] 优化 --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs | 1 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ProOutOrderService.cs | 2 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/阻焊仓/StackerCraneJob_ZH.cs | 107 +++++++++++++++++++++++++++++++++-- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockInfoService.cs | 47 +++++++++------ 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/阻焊仓/GroundStationJob_ZH.cs | 4 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 10 ++- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs | 1 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/ProStockInfoRepository.cs | 2 8 files changed, 140 insertions(+), 34 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/GroundStationJob_ZH.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/GroundStationJob_ZH.cs" index 47f3490..fb868b5 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/GroundStationJob_ZH.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/GroundStationJob_ZH.cs" @@ -71,8 +71,8 @@ ////鍒ゆ柇AGV浠诲姟瀹屾垚锛屽悗鍐欑粰鍦伴潰绔欏彇璐у畬鎴� //device.SetValue(GroundStationDBName.W_TakeRequest, false, item.StationCode); //device.SetValue(GroundStationDBName.W_TakeFinish, false, item.StationCode); - Dt_Task task = _taskRepository.QueryFirst(x => x.DeviceCode == item.StackerCraneCode && x.TaskState == TaskStatusEnum.New.ObjToInt() && x.NextAddress==item.StationCode); - Dt_Task? taskOther = _taskRepository.QueryFirst(x => x.Roadway == item.StackerCraneCode && (x.TaskState == TaskStatusEnum.SC_Executing.ObjToInt() || x.TaskState == TaskStatusEnum.SC_Execute.ObjToInt() || x.TaskState == TaskStatusEnum.AGV_Executing.ObjToInt() || x.TaskState == TaskStatusEnum.AGV_WaitToExecute.ObjToInt() || x.TaskState == TaskStatusEnum.Exception.ObjToInt())); + Dt_Task task = _taskRepository.QueryFirst(x => x.DeviceCode == item.StackerCraneCode && x.TaskType < TaskTypeEnum.Inbound.ObjToInt() && x.TaskState == TaskStatusEnum.New.ObjToInt() && x.NextAddress==item.StationCode); + Dt_Task? taskOther = _taskRepository.QueryFirst(x => x.Roadway == item.StackerCraneCode && x.TaskType < TaskTypeEnum.Inbound.ObjToInt() && (x.TaskState == TaskStatusEnum.SC_Executing.ObjToInt() || x.TaskState == TaskStatusEnum.SC_Execute.ObjToInt() || x.TaskState == TaskStatusEnum.AGV_Executing.ObjToInt() || x.TaskState == TaskStatusEnum.AGV_WaitToExecute.ObjToInt() || x.TaskState == TaskStatusEnum.Exception.ObjToInt())); if (task != null && isCanPut && !isCanTake && !putRequest && !putFinish && !takeRequest && !takeFinish && taskOther == null) { _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, nextAddress: item.StackerCraneStationCode); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs" index 622e6e5..a4c0b39 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs" @@ -21,6 +21,12 @@ using WIDESEAWCS_Tasks.StackerCraneJob; using WIDESEAWCS_Tasks; using WIDESEAWCS_Core; +using Newtonsoft.Json; +using WIDESEAWCS_Common.APIEnum; +using WIDESEAWCS_Core.Helper; +using WIDESEAWCS_DTO.TaskInfo; +using WIDESEAWCS_Core.Caches; +using AutoMapper; namespace WIDESEAWCS_Tasks { @@ -32,14 +38,32 @@ private readonly ITaskRepository _taskRepository; private readonly IRouterService _routerService; private readonly IStationMangerRepository _stationMangerRepository; + private readonly ICacheService _cacheService; + private readonly IMapper _mapper; + private List<Dt_ApiInfo> apiInfos; - public StackerCraneJob_ZH(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository) + public StackerCraneJob_ZH(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository,ICacheService cacheService, IMapper mapper) { _taskService = taskService; _taskExecuteDetailService = taskExecuteDetailService; _taskRepository = taskRepository; _routerService = routerService; _stationMangerRepository = stationMangerRepository; + _cacheService = cacheService; + _mapper = mapper; + string? apiInfoStr = _cacheService.Get("apiInfos"); + if (!string.IsNullOrEmpty(apiInfoStr)) + { + List<Dt_ApiInfo>? infos = JsonConvert.DeserializeObject<List<Dt_ApiInfo>>(apiInfoStr); + if (infos == null || infos.Count == 0) + { + apiInfos = new List<Dt_ApiInfo>(); + } + else + { + apiInfos = infos; + } + } } public Task Execute(IJobExecutionContext context) @@ -183,22 +207,89 @@ if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) { - if (OutTaskStationIsOccupied(task) != null || true) + if (OutTaskStationIsOccupied(task) == null) { - return task; - } - else - { + bool flag = false; List<string> otherOutStaionCodes = _routerService.QueryNextRoutes(commonStackerCrane.DeviceCode, task.NextAddress, task.TaskType).Select(x => x.ChildPosi).ToList(); List<Dt_Task> tasks = _taskService.QueryStackerCraneOutTasks(commonStackerCrane.DeviceCode, otherOutStaionCodes); foreach (var item in tasks) { if (OutTaskStationIsOccupied(task) != null) { - return task; + flag = true; + break; } } - task = _taskService.QueryStackerCraneInTask(commonStackerCrane.DeviceCode); + if (!flag) + { + task = _taskService.QueryStackerCraneInTask(commonStackerCrane.DeviceCode); + } + } + } + if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) + { + string? url = apiInfos.FirstOrDefault(x => x.ApiCode == APIEnum.WMSIsReloaction.ToString())?.ApiAddress; + if (string.IsNullOrEmpty(url)) + { + _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"鏈壘鍒癢MS绉诲簱鍒ゆ柇鎺ュ彛"); + WriteError(commonStackerCrane.DeviceCode, $"鏈壘鍒癢MS绉诲簱鍒ゆ柇鎺ュ彛"); + _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒癢MS绉诲簱鍒ゆ柇鎺ュ彛"); + return null; + } + string response = HttpHelper.Post($"{url}?taskNum={task.TaskNum}&locationCode={task.CurrentAddress}", "");//todo 璋冪敤WMS浠诲姟瀹屾垚鏂规硶 + if (string.IsNullOrEmpty(response)) + { + _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"绉诲簱鎺ュ彛璋冪敤閿欒"); + WriteError(commonStackerCrane.DeviceCode, $"绉诲簱鎺ュ彛璋冪敤閿欒"); + _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"绉诲簱鎺ュ彛璋冪敤閿欒"); + return null; + } + WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(response); + if (responseContent == null || !responseContent.Status) + { + _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"绉诲簱鎺ュ彛璋冪敤閿欒"); + WriteError(commonStackerCrane.DeviceCode, $"绉诲簱鎺ュ彛璋冪敤閿欒"); + _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"绉诲簱鎺ュ彛璋冪敤閿欒"); + return null; + } + WMSTaskDTO? taskDTO = JsonConvert.DeserializeObject<WMSTaskDTO>(responseContent.Data.Serialize()); + if (taskDTO == null) + { + _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"绉诲簱鎺ュ彛璋冪敤閿欒"); + WriteError(commonStackerCrane.DeviceCode, $"绉诲簱鎺ュ彛璋冪敤閿欒"); + _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"绉诲簱鎺ュ彛璋冪敤閿欒"); + return null; + + } + if (task.TaskNum == taskDTO.TaskNum) + { + return task; + } + else + { + Dt_Task reloTask = _mapper.Map<Dt_Task>(taskDTO); + //鍒ゆ柇绉诲簱璐т綅浠诲姟鏄惁宸插瓨鍦紝濡傚瓨鍦ㄥ厛鎵ц + Dt_Task existTask = _taskService.QueryStackerExistTask(reloTask.PalletCode, reloTask.SourceAddress); + if (existTask != null && existTask.TaskState == (int)TaskStatusEnum.SC_Execute) + { + return existTask; + } + else if (existTask != null && existTask.TaskState != (int)TaskStatusEnum.SC_Execute) + { + return null; + } + else + { + reloTask.TaskState = TaskStatusEnum.SC_Execute.ObjToInt(); + reloTask.CurrentAddress = taskDTO.SourceAddress; + reloTask.NextAddress = taskDTO.TargetAddress; + reloTask.DeviceCode = task.DeviceCode; + reloTask.TaskType = TaskTypeEnum.Relocation.ObjToInt(); + int taskId = _taskRepository.AddData(reloTask); + reloTask.TaskId = taskId; + } + return reloTask; + } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ProOutOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ProOutOrderService.cs" index 2ea2ca9..833e973 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ProOutOrderService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ProOutOrderService.cs" @@ -95,7 +95,7 @@ } else if (outOrderDTO.OType==2) { - warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA101.ToString()); + warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA71.ToString()); } List<Dt_ProOutOrderDetail> proOutOrderDetails = new List<Dt_ProOutOrderDetail>(); Dictionary<string,string> keyValuePairs =new Dictionary<string, string>(); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/ProStockInfoRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/ProStockInfoRepository.cs" index 7449017..7063262 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/ProStockInfoRepository.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/ProStockInfoRepository.cs" @@ -56,7 +56,7 @@ .Any(v => v.ProductCode == proOutOrderDetail.PCode && v.ProductVersion.StartsWith(proOutOrderDetail.PVer.Substring(0,1)) - && (isCanLot ? isCanLot : v.BagNo == proOutOrderDetail.PLot) + && (isCanLot ? isCanLot : v.ProductCode == proOutOrderDetail.PLot) && (isCanDate ? isCanDate : v.DateCode == proOutOrderDetail.DateCode) )) .ToList(); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockInfoService.cs" index ab0e7bb..9321114 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockInfoService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockInfoService.cs" @@ -128,7 +128,7 @@ bool isCanLot = string.IsNullOrEmpty(outOrderDetail.PLot); bool isCanDate = string.IsNullOrEmpty(outOrderDetail.DateCode); float stockTotalQuantity = stockInfos.Select(x => x.proStockInfoDetails.Where(x => x.ProductCode == outOrderDetail.PCode && x.ProductVersion.StartsWith(outOrderDetail.PVer.Substring(0, 1)) - && (isCanLot ? isCanLot : x.BagNo == outOrderDetail.PLot) + && (isCanLot ? isCanLot : x.ProductCode == outOrderDetail.PLot) && (isCanDate ? isCanDate : x.DateCode == outOrderDetail.DateCode)) .Sum(v => v.StockPcsQty - v.OutboundQuantity)).Sum(x => x); //stockInfos = stockInfos.OrderBy(x => x.Id).ToList(); @@ -141,13 +141,13 @@ Dt_ProStockInfo stockInfo = stockInfos[index]; float useableStockQuantity = stockInfo.proStockInfoDetails .Where(x => x.ProductCode == outOrderDetail.PCode && x.ProductVersion.StartsWith(outOrderDetail.PVer.Substring(0,1)) - && (isCanLot ? isCanLot : x.BagNo == outOrderDetail.PLot) + && (isCanLot ? isCanLot : x.ProductCode == outOrderDetail.PLot) && (isCanDate ? isCanDate : x.DateCode == outOrderDetail.DateCode)) .Sum(x => x.StockPcsQty - x.OutboundQuantity); if (useableStockQuantity < needQuantity && useableStockQuantity >0) { stockInfo.proStockInfoDetails.Where(x => x.ProductCode == outOrderDetail.PCode && x.ProductVersion.StartsWith(outOrderDetail.PVer.Substring(0, 1)) - && (isCanLot ? isCanLot : x.BagNo == outOrderDetail.PLot) + && (isCanLot ? isCanLot : x.ProductCode == outOrderDetail.PLot) && (isCanDate ? isCanDate : x.DateCode == outOrderDetail.DateCode)).ToList().ForEach(x => x.OutboundQuantity = x.StockPcsQty); needQuantity -= useableStockQuantity; } @@ -158,7 +158,7 @@ //婊¤冻鏉′欢杩涜鍒嗛厤 if ((x.StockPcsQty > x.OutboundQuantity) && x.ProductCode == outOrderDetail.PCode && x.ProductVersion.StartsWith(outOrderDetail.PVer.Substring(0, 1)) - && (isCanLot ? isCanLot : x.BagNo == outOrderDetail.PLot) + && (isCanLot ? isCanLot : x.ProductCode == outOrderDetail.PLot) && (isCanDate ? isCanDate : x.DateCode == outOrderDetail.DateCode)) { if (x.StockPcsQty - x.OutboundQuantity >= needQuantity) @@ -375,11 +375,14 @@ { try { - List<Dt_ProStockInfo> proStockInfo = BaseDal.QueryData(x => x.WarehouseId == warehouseId); - List<int> proStockId = proStockInfo.Select(x => x.Id).ToList(); - List<Dt_ProStockInfoDetail> proStockInfoDetails = BaseDal.Db.Queryable<Dt_ProStockInfoDetail>().Where(x => proStockId.Contains(x.OutDetailId)).ToList(); - List<string> proCode = proStockInfoDetails.Select(x => x.ProductCode).ToList(); - return WebResponseContent.Instance.OK(data: proCode); + //鑾峰彇鎵�鏈夊簱瀛樺瀷鍙� + List<Dt_ProStockInfoDetail> proStockInfoDetails = _stockRepository.ProStockInfoRepository.Db.Queryable<Dt_ProStockInfo, Dt_ProStockInfoDetail>((master, detail) => master.Id == detail.ProStockId) + .Where((master, detail) => master.WarehouseId == warehouseId) + .Select((master, detail) => detail) + .ToList(); + //杩囨护閲嶅 + List<string> proCode = proStockInfoDetails.Select(x => x.ProductCode).Distinct().ToList(); + return WebResponseContent.Instance.OK("鎴愬姛",data: proCode); } catch (Exception ex) { @@ -391,11 +394,14 @@ { try { - List<Dt_ProStockInfo> proStockInfo = BaseDal.QueryData(x => x.WarehouseId == warehouseId); - List<int> proStockId = proStockInfo.Select(x => x.Id).ToList(); - List<Dt_ProStockInfoDetail> proStockInfoDetails = BaseDal.Db.Queryable<Dt_ProStockInfoDetail>().Where(x => scrapProCode.Contains(x.ProductCode) && proStockId.Contains(x.OutDetailId)).ToList(); - List<string> productVersion = proStockInfoDetails.Select(x => x.ProductVersion).ToList(); - return WebResponseContent.Instance.OK(data: productVersion); + //鑾峰彇鎸囧畾浜у搧搴撳瓨鐗堟湰 + List<Dt_ProStockInfoDetail> proStockInfoDetails = _stockRepository.ProStockInfoRepository.Db.Queryable<Dt_ProStockInfo, Dt_ProStockInfoDetail>((master, detail) => master.Id == detail.ProStockId) + .Where((master, detail) => master.WarehouseId == warehouseId && detail.ProductCode== scrapProCode) + .Select((master, detail) => detail) + .ToList(); + //杩囨护閲嶅 + List<string> productVersion = proStockInfoDetails.Select(x => x.ProductVersion).Distinct().ToList(); + return WebResponseContent.Instance.OK("鎴愬姛",data: productVersion); } catch (Exception ex) { @@ -407,11 +413,14 @@ { try { - List<Dt_ProStockInfo> proStockInfo = BaseDal.QueryData(x => x.WarehouseId == warehouseId); - List<int> proStockId = proStockInfo.Select(x => x.Id).ToList(); - List<Dt_ProStockInfoDetail> proStockInfoDetails = BaseDal.Db.Queryable<Dt_ProStockInfoDetail>().Where(x => scrapProCode.Contains(x.ProductCode) && proStockId.Contains(x.OutDetailId)).ToList(); - List<string> lotNumber = proStockInfoDetails.Select(x => x.LotNumber).ToList(); - return WebResponseContent.Instance.OK(data: lotNumber); + //鑾峰彇鎸囧畾浜у搧搴撳瓨鎵规 + List<Dt_ProStockInfoDetail> proStockInfoDetails = _stockRepository.ProStockInfoRepository.Db.Queryable<Dt_ProStockInfo, Dt_ProStockInfoDetail>((master, detail) => master.Id == detail.ProStockId) + .Where((master, detail) => master.WarehouseId == warehouseId && detail.ProductCode == scrapProCode) + .Select((master, detail) => detail) + .ToList(); + //杩囨护閲嶅 + List<string> lotNumber = proStockInfoDetails.Select(x => x.LotNumber).Distinct().ToList(); + return WebResponseContent.Instance.OK("鎴愬姛", data: lotNumber); } catch (Exception ex) { diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs" index d96efaa..f95c73e 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs" @@ -663,6 +663,7 @@ throw new Exception("鍚屾MES搴撳瓨鏉垮嚭搴撳け璐�,閿欒:" + responseContent.Message); } _unitOfWorkManage.CommitTran(); + PushTasksToWCS(tasks); } return content.OK($"鎻愪緵杩斿簱鍗曟帴鏀舵垚鍔�,ReceiveDown:{model.ReceiveDown}"); } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" index a0ff157..f671669 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" @@ -824,6 +824,7 @@ switch (task.TaskType) { case (int)TaskTypeEnum.OutProduct: + case (int)TaskTypeEnum.OutSendProduct: content = OutProductCompleted(task); break; case (int)TaskTypeEnum.OutMesRworkProduct: @@ -935,9 +936,12 @@ BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateTypeEnum.鑷姩瀹屾垚 : OperateTypeEnum.浜哄伐瀹屾垚); _unitOfWorkManage.CommitTran(); //MES鎴愬搧鍑哄簱鍚屾 - MesShipmentOrderSync shipmentOrderSync = MesOutSync(outProStockInfo, proOutOrderDetail, proStockInfoDetails); - ShipmentOrderSync(shipmentOrderSync); - ShipmentOrderMESSync(shipmentOrderSync); + if (task.TaskType!= TaskTypeEnum.OutSendProduct.ObjToInt()) + { + MesShipmentOrderSync shipmentOrderSync = MesOutSync(outProStockInfo, proOutOrderDetail, proStockInfoDetails); + ShipmentOrderSync(shipmentOrderSync); + ShipmentOrderMESSync(shipmentOrderSync); + } content.OK(); } catch (Exception ex) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs" index 895943c..a45e862 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs" @@ -1024,6 +1024,7 @@ StockQuantity -=(decimal)assignAmount; OrderDetail.OverOutQuantity += assignAmount; OrderDetail.LockQuantity += assignAmount; + v.StockQuantity = (float)Math.Round(StockQuantity,3); upstockDetails.Add(v); } else -- Gitblit v1.9.3