From 86a17a782bfb9f6c907b43f5105ff8c059a1f87b Mon Sep 17 00:00:00 2001 From: hutongqing <hutongqing@hnkhzn.com> Date: 星期日, 19 一月 2025 14:58:11 +0800 Subject: [PATCH] 1 --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Reloaction.cs | 24 +++++++++++++++++++----- 1 files changed, 19 insertions(+), 5 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Reloaction.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Reloaction.cs" index 19d348a..b1dd885 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Reloaction.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Reloaction.cs" @@ -61,7 +61,21 @@ return WebResponseContent.Instance.OK(data: _mapper.Map<WMSTaskDTO>(taskTemp)); } - Dt_LocationInfo? newLocation = _basicService.LocationInfoService.AssignLocation(needRelocationItem.RoadwayNo, (PalletTypeEnum)task.PalletType, task.WarehouseId); + int heightType = 0; + if(needRelocationItem.Layer == 5) + { + heightType = 3; + } + else if(needRelocationItem.Layer == 4) + { + heightType = 2; + } + else if(needRelocationItem.Layer <= 3 && needRelocationItem.Layer >= 1) + { + heightType = 1; + } + + Dt_LocationInfo? newLocation = _basicService.LocationInfoService.AssignLocation(needRelocationItem.RoadwayNo, task.PalletType, task.WarehouseId, needRelocationItem.LocationCode, heightType); if (newLocation != null) { Dt_Task newTask = new Dt_Task() @@ -85,12 +99,12 @@ Repository.AddData(newTask); { LocationStatusEnum lastStatus = (LocationStatusEnum)newLocation.LocationStatus; - _basicService.LocationInfoService.UpdateLocationStatus(newLocation, (PalletTypeEnum)task.PalletType, LocationStatusEnum.Lock, stockInfo.WarehouseId); + _basicService.LocationInfoService.UpdateLocationStatus(newLocation, task.PalletType, LocationStatusEnum.Lock, stockInfo.WarehouseId); _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(newLocation, lastStatus, LocationStatusEnum.Lock, LocationChangeType.RelocationAssignLocation, taskNum: newTask.TaskNum); } { LocationStatusEnum lastStatus = (LocationStatusEnum)needRelocationItem.LocationStatus; - _basicService.LocationInfoService.UpdateLocationStatus(needRelocationItem, (PalletTypeEnum)task.PalletType, LocationStatusEnum.Lock, stockInfo.WarehouseId); + _basicService.LocationInfoService.UpdateLocationStatus(needRelocationItem, task.PalletType, LocationStatusEnum.Lock, stockInfo.WarehouseId); _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(needRelocationItem, lastStatus, LocationStatusEnum.Lock, LocationChangeType.RelocationAssignLocation, taskNum: newTask.TaskNum); } stockInfo.StockStatus = StockStatusEmun.绉诲簱閿佸畾.ObjToInt(); @@ -138,8 +152,8 @@ _unitOfWorkManage.BeginTran(); stockInfo.LocationCode = locationInfoEnd.LocationCode; _stockService.StockInfoService.Repository.UpdateData(stockInfo); - _basicService.LocationInfoService.UpdateLocationStatus(locationInfoStart, (PalletTypeEnum)stockInfo.PalletType, LocationStatusEnum.Free, stockInfo.WarehouseId); - _basicService.LocationInfoService.UpdateLocationStatus(locationInfoEnd, (PalletTypeEnum)stockInfo.PalletType, LocationStatusEnum.InStock, stockInfo.WarehouseId); + _basicService.LocationInfoService.UpdateLocationStatus(locationInfoStart, stockInfo.PalletType, LocationStatusEnum.Free, stockInfo.WarehouseId); + _basicService.LocationInfoService.UpdateLocationStatus(locationInfoEnd, stockInfo.PalletType, LocationStatusEnum.InStock, stockInfo.WarehouseId); BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? WIDESEA_Core.Enums.OperateTypeEnum.浜哄伐瀹屾垚 : WIDESEA_Core.Enums.OperateTypeEnum.鑷姩瀹屾垚); _unitOfWorkManage.CommitTran(); return WebResponseContent.Instance.OK(); -- Gitblit v1.9.3