From f82511343cf2c8ecf3981954e7eb92172d72a905 Mon Sep 17 00:00:00 2001 From: Huangxiaoqiang-03 <1247017146@qq.com> Date: 星期二, 05 十一月 2024 17:26:08 +0800 Subject: [PATCH] 1 --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs | 40 +++++++++++++++------------------------- 1 files changed, 15 insertions(+), 25 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs" index d213931..2e875d6 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs" @@ -168,15 +168,18 @@ try { Dt_LocationInfo result = isDepth(locations); - if (result != null) + if (!black) { - int beforeStatusEnd = result.LocationStatus; + if (result != null) + { + int beforeStatusEnd = result.LocationStatus; - result.LocationStatus = LocationStatusEnum.Free.ObjToInt(); + result.LocationStatus = LocationStatusEnum.Free.ObjToInt(); - BaseDal.UpdateData(result); + BaseDal.UpdateData(result); - _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(result, beforeStatusEnd, changType, "", TaskNum); + _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(result, beforeStatusEnd, changType, "", TaskNum); + } } } catch (Exception ex) @@ -189,27 +192,12 @@ { if (locationInfo.Depth == 2) { - if (locationInfo.Row == 1 || locationInfo.Row == 5) - { - Dt_LocationInfo dt_LocationInfo = BaseDal.QueryFirst(x => x.Row == locationInfo.Row + 1 && x.Layer == locationInfo.Layer && x.Column == locationInfo.Column && x.RoadwayNo == locationInfo.RoadwayNo); - - if (dt_LocationInfo != null) - { - return dt_LocationInfo; - } - - } - else if (locationInfo.Row == 4 || locationInfo.Row == 8) - { - Dt_LocationInfo dt_LocationInfo = BaseDal.QueryFirst(x => x.Row == locationInfo.Row + 1 && x.Layer == locationInfo.Layer && x.Column == locationInfo.Column && x.RoadwayNo == locationInfo.RoadwayNo); - - if (dt_LocationInfo != null) - { - return dt_LocationInfo; - } - } + return AdjacentDepthLocation(locationInfo.LocationCode); } - return null; + else + { + return null; + } } public void RelocationLock(Dt_LocationInfo locationInfo, Dt_LocationInfo locationInfos, int TaskNum) { @@ -221,10 +209,12 @@ if (beforeStartStatus == LocationStatusEnum.Pallet.ObjToInt()) { locationInfos.LocationStatus = LocationStatusEnum.PalletLock.ObjToInt(); + locationInfo.LocationStatus = LocationStatusEnum.PalletLock.ObjToInt(); } else { locationInfos.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); + locationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); } BaseDal.UpdateData(locationInfo); -- Gitblit v1.9.3