From 4da42c12efde190b208f18b7dd51d3e89986837d Mon Sep 17 00:00:00 2001 From: wankeda <Administrator@DESKTOP-HAU3ST3> Date: 星期一, 07 四月 2025 11:19:16 +0800 Subject: [PATCH] 代码逻辑优化 --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Emptybound.cs | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Emptybound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Emptybound.cs" index 259a6bf..92b7fe3 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Emptybound.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Emptybound.cs" @@ -33,10 +33,10 @@ { return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鎵爜鏁版嵁涓嶈兘涓虹┖"}"); } - Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode.Contains("绌烘墭RHCK") && x.PointStatus == LocationStatusEnum.Free.ObjToInt()); + Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode.Contains("绌烘墭搴撳叆") && x.PointStatus == LocationStatusEnum.Free.ObjToInt()); if (endCachePoint == null) { - return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鏈壘鍒扮┖鎵樺簱鍑哄簱浣嶅彲鐢ㄧ紦瀛樻灦"}"); + return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鏈壘鍒扮┖鎵樺簱鍏ュ簱浣嶅彲鐢ㄧ紦瀛樻灦"}"); } Dt_CachePoint point = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode); if (point == null) @@ -98,25 +98,25 @@ { string stationcode = saveModel.MainData["stationcode"].ToString(); //string PalletCode = saveModel.MainData["PalletCode"].ToString(); - //string toaddress = saveModel.MainData["toaddress"].ToString(); - if (stationcode == "")//寮傚父杩斿洖銆傘�傘�傘�傘�傘�� + string toaddress = saveModel.MainData["toaddress"].ToString(); + if (stationcode == "" || toaddress == "")//寮傚父杩斿洖銆傘�傘�傘�傘�傘�� { return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鎵爜鏁版嵁涓嶈兘涓虹┖"}"); } - Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode.Contains("绌烘墭CHCK") && x.PointStatus == LocationStatusEnum.Free.ObjToInt()); + Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointName == toaddress && x.PointStatus == LocationStatusEnum.Free.ObjToInt()); if (endCachePoint == null) { - return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鏈壘鍒扮┖鎵樺簱鍏ュ簱浣嶅彲鐢ㄧ紦瀛樻灦"}"); + return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鏈壘鍒扮粓鐐规鍖哄煙绌烘墭搴撲綅鍙敤缂撳瓨鏋�"}"); } Dt_CachePoint point = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode); if (point == null) { return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鎵爜鏁版嵁寮傚父锛屾湭鎵惧埌姝ょ紦瀛樻灦鎴栫墿鏂欑被鍨嬩笉鍖归厤"}"); } - Dt_CachePoint points = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.PointStatus == LocationStatusEnum.Free.ObjToInt()); + Dt_CachePoint points = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.PointStatus == LocationStatusEnum.InStock.ObjToInt()); if (points == null) { - return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鎵爜鏁版嵁寮傚父锛屾缂撳瓨鐐瑰凡琚攣瀹�"}"); + return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鎵爜鏁版嵁寮傚父锛屾缂撳瓨鐐圭姸鎬佷笉鏄湁璐х姸鎬�"}"); } Dt_Task taskcode = BaseDal.QueryFirst(x => x.SourceAddress == stationcode || x.TargetAddress == stationcode); if (taskcode != null) @@ -172,7 +172,7 @@ { return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鎵爜鏁版嵁涓嶈兘涓虹┖"}"); } - Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x =>x.PointName == toaddress && x.PointStatus == LocationStatusEnum.Free.ObjToInt()); + Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointName == toaddress && x.PointStatus == LocationStatusEnum.Free.ObjToInt()); if (endCachePoint == null) { return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鏈壘鍒扮粓鐐瑰尯鍩熷彲鐢ㄧ紦瀛樻灦"}"); -- Gitblit v1.9.3