From 1caea0fdc7ed1788d854a2aba8853984b4494e01 Mon Sep 17 00:00:00 2001 From: wankeda <Administrator@DESKTOP-HAU3ST3> Date: 星期二, 24 六月 2025 09:56:28 +0800 Subject: [PATCH] 代码提交 --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs | 52 +++------------------------------------------------- 1 files changed, 3 insertions(+), 49 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs" index 9158094..22ab05c 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs" @@ -18,53 +18,7 @@ public partial class TaskService { public string url = AppSettings.Configuration["WCS"]; - /// <summary> - /// PDA鐢宠鍏ュ簱--鍫嗗灈鏈虹珛搴撳叆搴� - /// </summary> - /// <param name="stationCode">璧峰鍦板潃</param> - /// <param name="taskType">浠诲姟绫诲瀷--鍏ョ┖锛屽叆鏂�</param> - /// <param name="palletCode">鎵樼洏缂栧彿</param> - /// <returns>杩斿洖澶勭悊缁撴灉</returns> - public WebResponseContent GenerateInboundTask(string stationCode, int taskType, string palletCode) - { - string? name = Enum.GetName(typeof(TaskTypeEnum), taskType); - MethodInfo? methodInfo = GetType().GetMethod(name + "Request"); - if (methodInfo != null) - { - WebResponseContent? responseContent = (WebResponseContent?)methodInfo.Invoke(this, new object[] { stationCode, palletCode }); - if (responseContent != null) - { - return responseContent; - } - } - else - { - return WebResponseContent.Instance.Error("鏈壘鍒拌浠诲姟绫诲瀷涓氬姟"); - } - return WebResponseContent.Instance.Error($"閿欒"); - } - /// <summary> - /// 绌烘墭鐩樺叆搴� - /// </summary> - /// <param name="stationCode">璧峰鍦板潃</param> - /// <param name="palletCode">鎵樼洏缂栧彿</param> - /// <returns>杩斿洖澶勭悊缁撴灉</returns> - public WebResponseContent PalletInboundRequest(string stationCode, string palletCode) - { - WebResponseContent content = new WebResponseContent(); - try - { - (bool, string) result = CheckRequestInbound(stationCode, palletCode, false); - if (!result.Item1) return content = WebResponseContent.Instance.Error(result.Item2); - //content = AssignLocUpdateData(stationCode, TaskTypeEnum.PalletInbound.ObjToInt(), palletCode, false); - } - catch (Exception ex) - { - content = WebResponseContent.Instance.Error($"{ex.Message}"); - } - return content; - } /// <summary> /// 鐗╂枡鍏ュ簱 @@ -246,15 +200,15 @@ { return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鎵爜鏁版嵁涓嶈兘涓虹┖"}"); } - Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode.Contains("鎴愬搧搴�") && x.PointStatus == LocationStatusEnum.Free.ObjToInt()); + Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode.Contains("鎴愬搧搴�") && x.PointStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt().ObjToInt()); if (endCachePoint == null) { return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鏈壘鍒版垚鍝佸簱鍙敤瀛樻斁缂撳瓨鏋�"}"); } - Dt_CachePoint point = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode);//&& x.Materialtype == PalletCode + Dt_CachePoint point = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt());//&& x.Materialtype == PalletCode if (point == null) { - return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鎵爜鏁版嵁寮傚父锛屾湭鎵惧埌姝ょ紦瀛樻灦鎴栫墿鏂欑被鍨嬩笉鍖归厤"}"); + return content = WebResponseContent.Instance.Error($"娣诲姞浠诲姟寮傚父,閿欒淇℃伅:{"鎵爜鏁版嵁寮傚父锛屾湭鎵惧埌姝ょ紦瀛樻灦鎴栧凡绂佺敤"}"); } Dt_CachePoint points = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.PointStatus == LocationStatusEnum.Free.ObjToInt()); if (points == null) -- Gitblit v1.9.3