From 18d1f45193e34e00fc1b6f65b8596ddb29c5267d Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期二, 24 十二月 2024 15:32:43 +0800 Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs | 46 +++++++++++++++++++++++++++++++++------------- 1 files changed, 33 insertions(+), 13 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs" index 31aed3f..ac15f3f 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs" @@ -24,21 +24,21 @@ /// <summary> /// 娴嬭瘯鏋朵粨璐т綅鍒嗛厤 <br/> /// 鎵樼洏绫诲瀷锛� <br/> - /// 1锛氭渶闀� <br/> - /// 2锛氶暱 <br/> - /// 3锛氫腑绛� <br/> - /// 4锛氱煭 <br/> - /// 3鍜�4閮芥槸3娣憋紝涓斿彲浠ユ贩鏀俱�� <br/> - /// 1鍜�2閮芥槸2娣憋紝涓斿彲浠ユ贩鏀俱�� <br/> + /// 1锛氱煭 <br/> + /// 2锛氫腑绛� <br/> + /// 3锛氶暱 <br/> + /// 4锛氱壒闀� <br/> + /// 1鍜�2閮芥槸3娣憋紝涓斿彲浠ユ贩鏀俱�� <br/> + /// 3鍜�4閮芥槸2娣憋紝涓斿彲浠ユ贩鏀俱�� <br/> /// 绉诲簱鏃跺彧鑳芥槸鍚屼晶璐т綅銆� /// </summary> /// <param name="roadwayNo">宸烽亾鍙�</param> /// <param name="palletType"> /// 鎵樼洏绫诲瀷 <br/> - /// 1锛氭渶闀� <br/> - /// 2锛氶暱 <br/> - /// 3锛氫腑绛� <br/> - /// 4锛氱煭 + /// 1锛氱煭 <br/> + /// 2锛氫腑绛� <br/> + /// 3锛氶暱 <br/> + /// 4锛氱壒闀� /// </param> /// <returns></returns> public Dt_LocationInfo? AssignLocation_CSJ(string roadwayNo, PalletTypeEnum palletType, string beRelocationCode = "") @@ -99,7 +99,6 @@ Dt_LocationInfo? locationInfo = GetUsableLocation_CSJ(locationInfos, undefinedTypeEmptyLocation, palletType); if (locationInfo != null) { - UpdateLocationStatus(locationInfo, palletType, LocationStatusEnum.Lock, 3); locationCaches_CSJ.Add(new LocationCache { LocationCode = locationInfo.LocationCode, DateTime = DateTime.Now }); return locationInfo; } @@ -113,7 +112,6 @@ Dt_LocationInfo? locationInfo = GetUsableLocation_CSJ(locationInfos, definedTypeEmptyLocation, palletType); if (locationInfo != null) { - UpdateLocationStatus(locationInfo, palletType, LocationStatusEnum.Lock, 3); locationCaches_CSJ.Add(new LocationCache { LocationCode = locationInfo.LocationCode, DateTime = DateTime.Now }); return locationInfo; } @@ -150,6 +148,28 @@ return null; } + private bool LittleDepthLocationIsEmpty_CSJ(Dt_LocationInfo locationInfo, PalletTypeEnum palletType) + { + List<Dt_LocationInfo> locations = GetGroupLocations(locationInfo); + + switch (palletType) + { + case PalletTypeEnum.LargestPallet: + case PalletTypeEnum.LargePallet: + { + List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= locationInfo.Depth).ToList(); + return littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && x.EnableStatus != EnableStatusEnum.OnlyIn.ObjToInt() && x.EnableStatus != EnableStatusEnum.Normal.ObjToInt()) == null; //鏌ヨ灏忎簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓虹┖锛屼笖绂佺敤鐘舵�佷笉涓虹鐢ㄤ互鍙婂彧鍏ョ殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娴呰揣浣嶈浣跨敤鎴栬�呰绂佺敤鐨勬儏鍐� + } + case PalletTypeEnum.MediumPallet: + case PalletTypeEnum.SmallPallet: + { + List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= locationInfo.Depth).ToList(); + return littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && x.EnableStatus != EnableStatusEnum.OnlyIn.ObjToInt() && x.EnableStatus != EnableStatusEnum.Normal.ObjToInt()) == null; //鏌ヨ灏忎簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓虹┖锛屼笖绂佺敤鐘舵�佷笉涓虹鐢ㄤ互鍙婂彧鍏ョ殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娴呰揣浣嶈浣跨敤鎴栬�呰绂佺敤鐨勬儏鍐� + } + } + return false; + } + /// <summary> /// 鍒ゆ柇涓嶅悓娣卞害鐨勫悓缁勮揣浣嶇姸鎬佹槸鍚︿负绌洪棽绌轰綅(娴嬭瘯鏋朵粨) /// </summary> @@ -184,7 +204,7 @@ List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= emptyLocation.Depth).ToList(); littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && x.EnableStatus != EnableStatusEnum.OnlyIn.ObjToInt() && x.EnableStatus != EnableStatusEnum.Normal.ObjToInt()) == null; //鏌ヨ灏忎簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓虹┖锛屼笖绂佺敤鐘舵�佷笉涓虹鐢ㄤ互鍙婂彧鍏ョ殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娴呰揣浣嶈浣跨敤鎴栬�呰绂佺敤鐨勬儏鍐� } - + break; } -- Gitblit v1.9.3