From 9ce6731460179c71f0f2c636b2a1598324d5194e Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期六, 20 九月 2025 15:16:48 +0800
Subject: [PATCH] 最新代码更新

---
 项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs           |   14 
 项目代码/WMS/WMSServices/WIDESEA_BasicService/Service/LocationInfoService.cs                |   16 
 项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService.cs                             |   12 
 项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/原料库/StackerCraneJob_YLSC3.cs                      |   24 
 项目代码/WMS/WMSClient/src/views/basic/locationInfo.vue                                     |   25 
 项目代码/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutMESOrder.cs                    |  122 +++++
 项目代码/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs                          |    3 
 项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs                     |   39 +
 项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs                          |   43 +
 项目代码/WMS/WMSServices/WIDESEA_BasicService/Base/LocationInfoService.cs                   |    6 
 项目代码/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs                           |    8 
 项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/MES/MesController.cs                 |   71 ++
 项目代码/WCS/WCSServices/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs                         |    6 
 项目代码/WMS/WMSServices/WIDESEA_DTO/ERP/BSTOutOrderDTO.cs                                  |    4 
 项目代码/WMS/WMSServices/WIDESEA_StockService/ProStockViewService.cs                        |   34 -
 项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/原料库/StackerCraneJob_YLSC2.cs                      |    5 
 项目代码/WMS/WMSServices/WIDESEA_Common/LocationEnum/LocationStatusEnum.cs                  |    6 
 项目代码/WMS/WMSServices/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs                            |    6 
 项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/原料库/ConveyorLineJob_YLOld.cs                      |  102 ++++
 项目代码/WMS/WMSServices/WIDESEA_Core/Helper/UtilConvert.cs                                 |    4 
 项目代码/WMS/WMSClient/src/views/stock/ProStockView.vue                                     |    4 
 项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Outbound/OutMESOrderController.cs    |   19 
 项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs                    |   64 +-
 项目代码/WMS/WMSServices/WIDESEA_Core/BaseModels/WebResponseContent.cs                      |    5 
 项目代码/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutMESOrderRepository.cs              |   18 
 项目代码/WMS/WMSClient/src/views/stock/stockInfo.vue                                        |    7 
 项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Basic/LocationInfoRowController.cs   |    2 
 项目代码/WMS/WMSServices/WIDESEA_IOutboundService/IOutMESOrderService.cs                    |   23 
 项目代码/WMS/WMSServices/WIDESEA_BasicRepository/LocationInfoRepository.cs                  |    4 
 项目代码/WMS/WMSServices/WIDESEA_External/Model/MESResponse.cs                              |   27 +
 项目代码/WMS/WMSServices/WIDESEA_Model/Models/Basic/Dt_AGVStationInfo.cs                    |    7 
 项目代码/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs                 |    4 
 项目代码/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs                          |    4 
 项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/成品仓/ConveyorLineJob_CPH.cs                        |  114 +++-
 项目代码/WMS/WMSServices/WIDESEA_OutboundService/OutMESOrderService.cs                      |   89 +++
 项目资料/通信协议/原料库输送线通讯协议.xlsx                                                               |    0 
 项目代码/WMS/WMSServices/WIDESEA_Common/StockEnum/StockStatusMenu.cs                        |    3 
 项目代码/WMS/WMSServices/WIDESEA_Core/Const/HtmlElementType.cs                              |    2 
 项目代码/WMS/WMSClient/src/extension/stock/stockInfo.js                                     |   25 +
 项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/ConveyorLineJob/W_CLineCPHDBName.cs               |   15 
 项目代码/WMS/WMSServices/WIDESEA_BasicService/Service/LocationInfoService_Common.cs         |  173 ------
 项目代码/WMS/WMSServices/WIDESEA_OutboundService/OutBSTOrderService.cs                      |    8 
 项目资料/技术协议/AGV作业流程0911.xlsx                                                              |    0 
 项目资料/接口协议/博思通利拓接口.xlsx                                                                  |    0 
 项目代码/WMS/WMSClient/config/buttons.js                                                    |    2 
 项目代码/WMS/WMSServices/WIDESEA_Core/BaseModels/PageDataOptions.cs                         |    4 
 项目代码/WMS/WMSServices/WIDESEA_Model/Models/Basic/Dt_LocationInfo.cs                      |    2 
 项目资料/接口协议/龙利得MES接口.xlsx                                                                 |    0 
 /dev/null                                                                               |   35 -
 项目代码/WMS/WMSServices/WIDESEA_Common/TaskEnum/TaskStatusEnum.cs                          |    6 
 项目代码/WMS/WMSServices/WIDESEA_DTO/MES/MESAutoIssueDTO.cs                                 |   46 +
 项目代码/WMS/WMSServices/WIDESEA_DTO/MES/OutMESOrderDTO.cs                                  |   82 +++
 项目代码/WMS/WMSServices/WIDESEA_External/MESService/InvokeMESService.cs                    |   33 +
 项目代码/WMS/WMSServices/WIDESEA_External/Model/MESDispatchModel.cs                         |   12 
 项目代码/WMS/WMSServices/WIDESEA_OutboundRepository/OutMESOrderRepository.cs                |   21 
 项目代码/WMS/WMSClient/public/webconfig.js                                                  |    1 
 项目代码/WMS/WMSServices/WIDESEA_External/IMESService/IInvokeMESService.cs                  |   17 
 项目代码/WMS/WMSServices/WIDESEA_RecordService/Service/LocationStatusChangeRecordService.cs |    2 
 项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Reloaction.cs                  |    2 
 项目资料/项目图纸/龙利得纸卷库——纸卷库货架——总图——2025-05-20现场更改端部网架出图.dwg                                   |    0 
 60 files changed, 1,054 insertions(+), 378 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs"
index 89dcf49..ef83161 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs"
@@ -112,6 +112,12 @@
         PaperYLBackInbound = 730,
 
         /// <summary>
+        /// 鍘熸枡鑰佸巶閫�搴�
+        /// </summary>
+        [Description("鍘熸枡鑰佸巶閫�搴�")]
+        PaperOldYLBackInbound = 740,
+
+        /// <summary>
         /// 宸烽亾鍐呯Щ搴�
         /// </summary>
         [Description("宸烽亾鍐呯Щ搴�")]
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs"
index 3c93ccd..0628b3d 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs"
@@ -54,6 +54,10 @@
             AgvResponse agvResponse = new AgvResponse();
             try
             {
+                if (secureApplyModel.ReceiveTaskID=="100")
+                {
+                    return agvResponse.OK("鎴愬姛", "0");
+                }
                 var task = _taskRepository.QueryFirst(x => secureApplyModel.ReceiveTaskID.ObjToInt() == x.TaskNum);
                 if (task == null) throw new Exception("鏈壘鍒颁换鍔�");
                 if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs"
index 4e8aac9..e83f2d8 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -320,6 +320,10 @@
                         content = ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO });
                     }
                 }
+                else
+                {
+                    content = responseContent ?? content.Error("缁撴灉閿欒");
+                }
 
             }
             catch (Exception ex)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/ConveyorLineJob/W_CLineCPHDBName.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/ConveyorLineJob/W_CLineCPHDBName.cs"
index 5a5167c..0253eff 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/ConveyorLineJob/W_CLineCPHDBName.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/ConveyorLineJob/W_CLineCPHDBName.cs"
@@ -20,10 +20,23 @@
         /// </summary>
         W_Channel,
         /// <summary>
+        /// 闀�
+        /// </summary>
+        W_Long,
+        /// <summary>
+        /// 瀹�
+        /// </summary>
+        W_Wide,
+        /// <summary>
+        /// 楂�
+        /// </summary>
+        W_High,
+        /// <summary>
         /// 璇锋眰纭<br/>
         /// 1:浠诲姟涓嬪彂<br/>
         /// 2:娓呴櫎纭<br/>
         /// </summary>
-        W_Request
+        W_Request,
+        W_TMID,
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/ConveyorLineJob_YLOld.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/ConveyorLineJob_YLOld.cs"
new file mode 100644
index 0000000..51ddf6a
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/ConveyorLineJob_YLOld.cs"
@@ -0,0 +1,102 @@
+锘縰sing Microsoft.AspNetCore.Components.Routing;
+using Newtonsoft.Json;
+using Quartz;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection.Metadata;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEAWCS_Common;
+using WIDESEAWCS_Common.TaskEnum;
+using WIDESEAWCS_Communicator;
+using WIDESEAWCS_Core;
+using WIDESEAWCS_Core.Helper;
+using WIDESEAWCS_IBasicInfoRepository;
+using WIDESEAWCS_ITaskInfoRepository;
+using WIDESEAWCS_ITaskInfoService;
+using WIDESEAWCS_Model.Models;
+using WIDESEAWCS_QuartzJob;
+using WIDESEAWCS_QuartzJob.DTO;
+using WIDESEAWCS_QuartzJob.Models;
+using WIDESEAWCS_QuartzJob.Repository;
+using WIDESEAWCS_QuartzJob.Service;
+using WIDESEAWCS_Tasks.ConveyorLineJob;
+using ICacheService = WIDESEAWCS_Core.Caches.ICacheService;
+
+namespace WIDESEAWCS_Tasks
+{
+    [DisallowConcurrentExecution]
+    public class ConveyorLineJob_YLOld : JobBase, IJob
+    {
+        private readonly ICacheService _cacheService;
+        private readonly ITaskService _taskService;
+        private readonly ITaskExecuteDetailService _taskExecuteDetailService;
+        private readonly ITaskRepository _taskRepository;
+        private readonly IStationMangerRepository _stationMangerRepository;
+        private readonly IRouterRepository _routerRepository;
+        private readonly IRouterService _routerService;
+        private readonly IRouterExtension _routerExtension;
+        private readonly List<Dt_WarehouseDevice> warehouseDevices;
+
+        public ConveyorLineJob_YLOld(ICacheService cacheService, ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IRouterService routerService, IRouterExtension routerExtension)
+        {
+            _cacheService = cacheService;
+            _taskService = taskService;
+            _taskExecuteDetailService = taskExecuteDetailService;
+            _taskRepository = taskRepository;
+            _stationMangerRepository = stationMangerRepository;
+            _routerRepository = routerRepository;
+            _routerService = routerService;
+            _routerExtension = routerExtension;
+
+            string? warehouseDevicesStr = _cacheService.Get<string>(nameof(Dt_WarehouseDevice));
+            if (!string.IsNullOrEmpty(warehouseDevicesStr))
+            {
+                warehouseDevices = JsonConvert.DeserializeObject<List<Dt_WarehouseDevice>>(warehouseDevicesStr) ?? new List<Dt_WarehouseDevice>();
+            }
+            else
+            {
+                warehouseDevices = new List<Dt_WarehouseDevice>();
+            }
+        }
+
+        public Task Execute(IJobExecutionContext context)
+        {
+            bool flag = context.JobDetail.JobDataMap.TryGetValue("JobParams", out object? value);
+            if (flag && value != null)
+            {
+                OtherDevice device = (OtherDevice)value;
+                //鑾峰彇鎵�鏈夊崗璁殑杈撻�佺嚎绔欏彴
+                List<string> deviceStations = device.DeviceProDTOs.Select(x => x.DeviceChildCode).ToList();
+                List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == device.DeviceCode);
+                foreach (var item in stationMangers.Where(x => deviceStations.Contains(x.StationCode)))
+                {
+                    DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(WR_CLineYLDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
+                    if (deviceProRead != null)
+                    {
+                        R_ConveyorLineYLInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineYLInfo>(deviceProRead.DeviceProAddress);
+                        if (conveyorLineInfoRead != null && item.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt() && conveyorLineInfoRead.WR_ToHode <= 0 && conveyorLineInfoRead.WR_Request == 86 && !string.IsNullOrEmpty(conveyorLineInfoRead.WR_TMID)) //鑰佸巶鐢宠鍏ュ簱
+                        {
+                            WebResponseContent content = _taskService.YLPurchaseBoxing(conveyorLineInfoRead.WR_TMID);
+                            if (content.Status)
+                            {
+                                device.SetValue(WR_CLineYLDB.WR_Reresult, 86, item.StationCode);
+                                WriteInfo(item.StationCode, $"璇锋眰閫�鏂欐潯鐮�:{conveyorLineInfoRead.WR_TMID}");
+                            }
+                            else
+                            {
+                                WriteError(item.StationCode, $"璇锋眰閫�鏂欏け璐ワ細{content.Message}");
+                            }
+                        }
+                    }
+                    else
+                    {
+                        WriteError(item.StationName, $"鏈壘鍒拌澶囧瓙缂栧彿{item.StationCode}鐨勫崗璁俊鎭�");
+                    }
+                }
+            }
+            return Task.CompletedTask;
+        }
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC2.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC2.cs"
index 04b620f..d20a39b 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC2.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC2.cs"
@@ -253,6 +253,11 @@
                         _taskRepository.UpdateData(task);
                         return task;
                     }
+                    else
+                    {
+                        task.ExceptionMessage = "鍑哄簱绔欏彴鏃犳硶涓嬪彂";
+                        _taskRepository.UpdateData(task);
+                    }
                 }
                 else
                 {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC3.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC3.cs"
index d32a03c..53c4a8d 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC3.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC3.cs"
@@ -282,6 +282,11 @@
                             _taskRepository.UpdateData(task);
                             return task;
                         }
+                        else
+                        {
+                            task.ExceptionMessage = "鍑哄簱绔欏彴鏃犳硶涓嬪彂";
+                            _taskRepository.UpdateData(task);
+                        }
                     }
                     else
                     {
@@ -300,6 +305,11 @@
                             task.NextAddress = stationManger.StackerCraneStationCode;
                             _taskRepository.UpdateData(task);
                             return task;
+                        }
+                        else
+                        {
+                            task.ExceptionMessage = "鍑哄簱绔欏彴鏃犳硶涓嬪彂";
+                            _taskRepository.UpdateData(task);
                         }
                     }
                     else
@@ -327,9 +337,9 @@
         {
             YLStackerCraneTaskCommand stackerCraneTaskCommand = new YLStackerCraneTaskCommand();
 
+            stackerCraneTaskCommand.PalletType = Convert.ToInt16(task.PalletType);
             stackerCraneTaskCommand.TaskNum = task.TaskNum;
             stackerCraneTaskCommand.WorkType = 5;
-            stackerCraneTaskCommand.PalletType = Convert.ToInt16(task.PalletType);
             if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)//鍒ゆ柇鏄惁鏄叆搴撲换鍔�
             {
 
@@ -364,9 +374,9 @@
                 string[] targetCodes = task.NextAddress.Split("-");
                 if (targetCodes.Length == 3)
                 {
-                    stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodes[1]);
-                    stackerCraneTaskCommand.EndColumn = Convert.ToInt16(targetCodes[2]);
-                    stackerCraneTaskCommand.EndLayer = Convert.ToInt16(targetCodes[3]);
+                    stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodes[0]);
+                    stackerCraneTaskCommand.EndColumn = Convert.ToInt16(targetCodes[1]);
+                    stackerCraneTaskCommand.EndLayer = Convert.ToInt16(targetCodes[2]);
                 }
                 else
                 {
@@ -377,9 +387,9 @@
                 string[] sourceCodes = task.CurrentAddress.Split("-");
                 if (sourceCodes.Length == 5)
                 {
-                    stackerCraneTaskCommand.StartRow = Convert.ToInt16(sourceCodes[0]);
-                    stackerCraneTaskCommand.StartColumn = Convert.ToInt16(sourceCodes[1]);
-                    stackerCraneTaskCommand.StartLayer = Convert.ToInt16(sourceCodes[2]);
+                    stackerCraneTaskCommand.StartRow = Convert.ToInt16(sourceCodes[1]);
+                    stackerCraneTaskCommand.StartColumn = Convert.ToInt16(sourceCodes[2]);
+                    stackerCraneTaskCommand.StartLayer = Convert.ToInt16(sourceCodes[3]);
                 }
                 else
                 {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPH.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPH.cs"
index d134c26..bdf7663 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPH.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPH.cs"
@@ -1,6 +1,7 @@
 锘縰sing Microsoft.AspNetCore.Components.Routing;
 using Newtonsoft.Json;
 using OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime;
+using Org.BouncyCastle.Tls;
 using Quartz;
 using SqlSugar.Extensions;
 using System;
@@ -39,6 +40,7 @@
         private readonly IRouterService _routerService;
         private readonly IRouterExtension _routerExtension;
         private readonly List<Dt_WarehouseDevice> warehouseDevices;
+        private static object lockObj = 0;//
 
         public ConveyorLineJob_CPH(ICacheService cacheService, ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IRouterService routerService, IRouterExtension routerExtension)
         {
@@ -64,53 +66,87 @@
 
         public Task Execute(IJobExecutionContext context)
         {
-            bool flag = context.JobDetail.JobDataMap.TryGetValue("JobParams", out object? value);
-            if (flag && value != null)
+            lock (lockObj)
             {
-                //鑾峰彇褰撳墠璁惧
-                OtherDevice device = (OtherDevice)value;
-                List<string> deviceStations = device.DeviceProDTOs.Select(x => x.DeviceChildCode).Distinct().ToList();
-                List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == device.DeviceCode);
-                foreach (var item in stationMangers.Where(x => deviceStations.Contains(x.StationCode)))
+                if (lockObj.ToString()=="0")
                 {
-                    DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(R_CLineCPHDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
-                    DeviceProDTO? deviceProWrite = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(W_CLineCPHDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
-                    if (item.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt() && deviceProRead != null && deviceProWrite != null)
+                    lockObj = 1;
+                    Task task = Task.Run(() =>
                     {
-                        R_CLineCPHInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_CLineCPHInfo>(deviceProRead.DeviceProAddress);
-                        //鐮佸灈鐜嚎璇锋眰浠诲姟 
-                        if (conveyorLineInfoRead != null && (conveyorLineInfoRead.R_State == 2 || conveyorLineInfoRead.R_State == 3) && conveyorLineInfoRead.R_TaskNo <= 0 && !string.IsNullOrEmpty(conveyorLineInfoRead.R_BoxCode) && conveyorLineInfoRead.R_Request==1)
+                        try
                         {
-                            //WebResponseContent content = _taskService.RequestWMSTaskSimple(conveyorLineInfoRead.R_BoxCode, item.StationCode);
-                            ////鍚慦MS璇锋眰浠诲姟
-                            //if (true)
-                            //{
-
-                            //}
-                            
-                        }
-                    }
-                    else if(item.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt() && deviceProRead != null)
-                    {
-                        R_CLineCPHInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_CLineCPHInfo>(deviceProRead.DeviceProAddress);
-                        //鑾峰彇鐮佸灈鍙d换鍔℃洿鏂颁换鍔$姸鎬�
-                        if (conveyorLineInfoRead != null && (conveyorLineInfoRead.R_State == 2 || conveyorLineInfoRead.R_State == 3) && conveyorLineInfoRead.R_TaskNo > 0)
-                        {
-                            Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.R_TaskNo && x.NextAddress==item.StationCode && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt());
-                            if (task != null)
+                            while (true)
                             {
-                                task.CurrentAddress = item.StationCode;
-                                task.NextAddress = task.TargetAddress;
-                                task.DeviceCode = item.StackerCraneCode;
-                                _taskService.UpdateTask(task, TaskStatusEnum.MD_Executing);
+                                bool flag = context.JobDetail.JobDataMap.TryGetValue("JobParams", out object? value);
+                                if (flag && value != null)
+                                {
+                                    //鑾峰彇褰撳墠璁惧
+                                    OtherDevice device = (OtherDevice)value;
+                                    List<string> deviceStations = device.DeviceProDTOs.Select(x => x.DeviceChildCode).Distinct().ToList();
+                                    List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == device.DeviceCode);
+                                    foreach (var item in stationMangers.Where(x => deviceStations.Contains(x.StationCode)))
+                                    {
+                                        DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(R_CLineCPHDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
+                                        DeviceProDTO? deviceProWrite = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(W_CLineCPHDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
+                                        if (item.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt() && deviceProRead != null && deviceProWrite != null)
+                                        {
+                                            R_CLineCPHInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_CLineCPHInfo>(deviceProRead.DeviceProAddress);
+                                            //鐮佸灈鐜嚎璇锋眰浠诲姟 
+                                            if (conveyorLineInfoRead != null && (conveyorLineInfoRead.R_State == 2 || conveyorLineInfoRead.R_State == 3) && conveyorLineInfoRead.R_TaskNo <= 0 && !string.IsNullOrEmpty(conveyorLineInfoRead.R_BoxCode) && conveyorLineInfoRead.R_Request == 1)
+                                            {
+                                                //WebResponseContent content = _taskService.RequestWMSTaskSimple(conveyorLineInfoRead.R_BoxCode, item.StationCode);
+                                                ////鍚慦MS璇锋眰浠诲姟
+                                                //if (true)
+                                                //{
+
+                                                //}
+                                                //鍐欏叆鎵ц鏁版嵁
+                                                device.SetValue(W_CLineCPHDB.W_TaskNo, 1002, item.StationCode);
+                                                device.SetValue(W_CLineCPHDB.W_Channel, 5, item.StationCode);
+                                                device.SetValue(W_CLineCPHDB.W_Long, 400, item.StationCode);
+                                                device.SetValue(W_CLineCPHDB.W_Wide, 370, item.StationCode);
+                                                device.SetValue(W_CLineCPHDB.W_High, 300, item.StationCode);
+                                                device.SetValue(W_CLineCPHDB.W_TMID, conveyorLineInfoRead.R_BoxCode, item.StationCode);
+                                                device.SetValue(W_CLineCPHDB.W_Request, 1, item.StationCode);
+
+                                            }
+                                        }
+                                        else if (item.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt() && deviceProRead != null)
+                                        {
+                                            R_CLineCPHInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_CLineCPHInfo>(deviceProRead.DeviceProAddress);
+                                            //鑾峰彇鐮佸灈鍙d换鍔℃洿鏂颁换鍔$姸鎬�
+                                            if (conveyorLineInfoRead != null && (conveyorLineInfoRead.R_State == 2 || conveyorLineInfoRead.R_State == 3) && conveyorLineInfoRead.R_TaskNo > 0)
+                                            {
+                                                Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.R_TaskNo && x.NextAddress == item.StationCode && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt());
+                                                if (task != null)
+                                                {
+                                                    task.CurrentAddress = item.StationCode;
+                                                    task.NextAddress = task.TargetAddress;
+                                                    task.DeviceCode = item.StackerCraneCode;
+                                                    _taskService.UpdateTask(task, TaskStatusEnum.MD_Executing);
+                                                }
+                                            }
+                                        }
+                                        else
+                                        {
+                                            WriteError(item.StationName, $"鏈壘鍒拌澶囧瓙缂栧彿{item.StationCode}鐨勫崗璁俊鎭�");
+                                        }
+                                    }
+                                }
+                                Thread.Sleep(100);
+                                
                             }
                         }
-                    }
-                    else
-                    {
-                        WriteError(item.StationName, $"鏈壘鍒拌澶囧瓙缂栧彿{item.StationCode}鐨勫崗璁俊鎭�");
-                    }
+                        catch (Exception ex)
+                        {
+
+                            lockObj = 0;
+                            WriteError(nameof(ConveyorLineJob_CPH), $"閿欒淇℃伅锛歿ex.Message}");
+                        }
+                        
+                    });
                 }
+                
             }
             return Task.CompletedTask;
         }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/config/buttons.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/config/buttons.js"
index 5950582..3dc0f7f 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/config/buttons.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/config/buttons.js"
@@ -174,7 +174,7 @@
     }
 },
 {
-    name: "鎸� 瀹� 搴� 瀛� 鍑� 搴�",
+    name: "鎸� 瀹� 鑰� 鍘� 搴� 瀛� 鍑� 搴�",
     icon: '',
     class: '',
     value: 'StockOutbound',
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/public/webconfig.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/public/webconfig.js"
index d84677c..8d88f68 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/public/webconfig.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/public/webconfig.js"
@@ -1,4 +1,5 @@
 window.webConfig = {
+    // "webApiBaseUrl": "http://192.168.35.3:9283/",
     "webApiBaseUrl": "http://127.0.0.1:9293/",
     "webApiProduction":"http://192.168.35.3:9283/"
 }
\ No newline at end of file
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/stock/stockInfo.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/stock/stockInfo.js"
index 6292426..7fa2011 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/stock/stockInfo.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/stock/stockInfo.js"
@@ -17,7 +17,30 @@
     methods: {
        //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
       onInit() {  
-        
+        //鎸囧畾鍑哄簱
+        let OutOrder = this.buttons.find(x => x.value == 'StockOutbound');
+        if (OutOrder) {
+          
+          OutOrder.onClick = function () {
+            let rows = this.$refs.table.getSelected();
+            if (rows.length == 0) return this.$error("璇烽�夋嫨鏁版嵁!");
+            this.$confirm("纭瑕侀�夋嫨鐨勬暟鎹嚭搴撳槢鍚�?", "璀﹀憡", {
+              confirmButtonText: "纭畾",
+              cancelButtonText: "鍙栨秷",
+              type: "warning",
+              center: true,
+            }).then(() => {
+              var keys = rows.map((x) => x.id);
+              this.http
+                .post("api/Task/OldYLOutbound?", keys, "鏁版嵁澶勭悊涓�")
+                .then((x) => {
+                  if (!x.status) return this.$message.error(x.message);
+                  this.$message.success("鎿嶄綔鎴愬姛");
+                  this.refresh();
+                });
+            });
+          }
+        }
       },
       onInited() {
         //妗嗘灦鍒濆鍖栭厤缃悗
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/basic/locationInfo.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/basic/locationInfo.vue"
index b6a588f..d7f13fe 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/basic/locationInfo.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/basic/locationInfo.vue"
@@ -41,20 +41,20 @@
       enableStatus: "",
       locationStatus: "",
       row: "",
-      column: "",
+      columns: "",
       layer: "",
     });
     const searchFormOptions = ref([
       [
         { title: "璐т綅缂栧彿", field: "locationCode", type: "like" },
-        { title: "宸烽亾缂栧彿", field: "roadwayNo",type:"like" },
+        { title: "宸烽亾缂栧彿", field: "roadwayNo",type: "select",dataKey: "Roadways" },
         { title: "璐т綅绫诲瀷", field: "locationType",type: "select",dataKey: "locationTypeEnum",data: [], },
         { title: "绂佺敤鐘舵��", field: "enableStatus" ,type: "select",dataKey: "enableStatusEnum",data: [],},
       ],
       [
         { title: "璐т綅鐘舵��", field: "locationStatus" ,type: "selectList",dataKey: "locationStatusEnum",data: [],},
         { title: "琛�", field: "row" ,type: "int"},
-        { title: "鍒�", field: "column" ,type: "int"},
+        { title: "鍒�", field: "columns" ,type: "int"},
         { title: "灞�", field: "layer" ,type: "int"}
       ],
     ]);
@@ -81,21 +81,21 @@
         field: "locationCode",
         title: "璐т綅缂栧彿",
         type: "string",
-        width: 200,
+        width: 240,
         align: "left",
       },
       {
         field: "locationName",
         title: "璐т綅鍚嶇О",
         type: "string",
-        width: 280,
+        width: 300,
         align: "left",
       },
       {
         field: "roadwayNo",
         title: "宸烽亾缂栧彿",
         type: "decimal",
-        width: 100,
+        width: 110,
         align: "left",
       },
       {
@@ -104,23 +104,20 @@
         type: "string",
         width: 90,
         align: "left",
-        hidden: true,
       },
       {
-        field: "column",
+        field: "columns",
         title: "璐т綅鍒�",
-        type: "int",
-        width: 120,
+        type: "string",
+        width: 90,
         align: "left",
-        hidden: true,
       },
       {
         field: "layer",
         title: "璐т綅灞�",
         type: "string",
-        width: 200,
+        width: 90,
         align: "left",
-        hidden: true,
       },
       {
         field: "depth",
@@ -177,6 +174,7 @@
         type: "string",
         width: 100,
         align: "left",
+        hidden: true
       },
       {
         field: "modifyDate",
@@ -185,6 +183,7 @@
         width: 160,
         align: "left",
         sort: true,
+        hidden: true
       },
       {
         field: "remark",
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/stock/ProStockView.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/stock/ProStockView.vue"
index 6543683..87290ce 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/stock/ProStockView.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/stock/ProStockView.vue"
@@ -47,6 +47,10 @@
           { title: "璐т綅鐘舵��", field: "locationStatus" ,type: "selectList",dataKey: "locationStatusEnum",data: [],},
           { title: "搴撳瓨鐘舵��", field: "stockStatus",type: "selectList",dataKey: "stockStatusEmun",data: [],},
         ],
+        [
+          { title: "鎵�灞炰粨搴�", field: "warehouseId",type: "select",dataKey: "warehouses",data: []},
+          { title: "搴撳瓨灞炴��", field: "proStockAttribute" ,type: "selectList",dataKey: "proStockAttributeEnum",data: [],},
+        ],
       ]);
       const columns = ref([
         {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/stock/stockInfo.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/stock/stockInfo.vue"
index 6aaff96..595d77d 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/stock/stockInfo.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/stock/stockInfo.vue"
@@ -45,6 +45,8 @@
       const searchFormFields = ref({
         palletCode: "",
         locationCode: "",
+        materielCode: "",
+        materielWide: "",
       });
       const searchFormOptions = ref([
         [
@@ -53,6 +55,11 @@
           {title: "搴撳瓨缁勭粐", field:"materielInvOrgId",type:"select",dataKey:"materielInvOrgEnum",data:[]},
           {title: "鐗╂枡缂栧彿", field:"materielCode",type:"like"},
         ],
+        [
+          {title: "鐗╂枡骞呭", field:"materielWide",type:"int"},
+          {title: "搴撳瓨鐘舵��", field:"stockStatus",type:"select",dataKey:"stockStatusEmun",data:[]},
+          { title: "鍒涘缓鏃堕棿", field: "createDate", type: "datetime" },
+        ],
       ]);
       const columns = ref([
         {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicRepository/LocationInfoRepository.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicRepository/LocationInfoRepository.cs"
index 0338b2f..3bb7103 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicRepository/LocationInfoRepository.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicRepository/LocationInfoRepository.cs"
@@ -31,7 +31,7 @@
         /// <returns></returns>
         public List<LocationGroupDTO> GetAllLocationGroups(string roadway)
         {
-            return QueryTabs<Dt_LocationInfo, Dt_LocationInfo, LocationGroupDTO>((a, b) => a.Column == b.Column && a.Layer == b.Layer && a.Row != b.Row && SqlFunc.Abs(a.Row - b.Row) == 1, (a, b) => new LocationGroupDTO { DepthA = a.Depth, DepthB = b.Depth, EnableStatusA = a.EnableStatus, EnableStatusB = b.EnableStatus, IdA = a.Id, IdB = b.Id, LocationCodeA = a.LocationCode, LocationCodeB = b.LocationCode, LocationStatusA = a.LocationStatus, LocationStatusB = b.LocationStatus, LocationTypeA = a.LocationType, LocationTypeB = b.LocationType }, a => a.Depth == 1 && a.RoadwayNo == roadway, b => b.Depth == 2 && b.RoadwayNo == roadway, x => true);
+            return QueryTabs<Dt_LocationInfo, Dt_LocationInfo, LocationGroupDTO>((a, b) => a.Columns == b.Columns && a.Layer == b.Layer && a.Row != b.Row && SqlFunc.Abs(a.Row - b.Row) == 1, (a, b) => new LocationGroupDTO { DepthA = a.Depth, DepthB = b.Depth, EnableStatusA = a.EnableStatus, EnableStatusB = b.EnableStatus, IdA = a.Id, IdB = b.Id, LocationCodeA = a.LocationCode, LocationCodeB = b.LocationCode, LocationStatusA = a.LocationStatus, LocationStatusB = b.LocationStatus, LocationTypeA = a.LocationType, LocationTypeB = b.LocationType }, a => a.Depth == 1 && a.RoadwayNo == roadway, b => b.Depth == 2 && b.RoadwayNo == roadway, x => true);
         }
 
         /// <summary>
@@ -44,7 +44,7 @@
         public List<LocationGroupDTO> GetLocationGroups(string roadway, LocationStatusEnum locationAStatus, LocationStatusEnum locationBStatus)
         {
             return QueryTabs<Dt_LocationInfo, Dt_LocationInfo, LocationGroupDTO>(
-                (a, b) => a.Column == b.Column && a.Layer == b.Layer && a.Row != b.Row && SqlFunc.Abs(a.Row - b.Row) == 1,
+                (a, b) => a.Columns == b.Columns && a.Layer == b.Layer && a.Row != b.Row && SqlFunc.Abs(a.Row - b.Row) == 1,
                 (a, b) => new LocationGroupDTO { DepthA = a.Depth, DepthB = b.Depth, EnableStatusA = a.EnableStatus, EnableStatusB = b.EnableStatus, IdA = a.Id, IdB = b.Id, LocationCodeA = a.LocationCode, LocationCodeB = b.LocationCode, LocationStatusA = a.LocationStatus, LocationStatusB = b.LocationStatus, LocationTypeA = a.LocationType, LocationTypeB = b.LocationType },
                 a => a.Depth == 1 && a.RoadwayNo == roadway && a.LocationStatus == locationAStatus.ObjToInt(),
                 b => b.Depth == 2 && b.RoadwayNo == roadway && b.LocationStatus == locationBStatus.ObjToInt(),
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicService/Base/LocationInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicService/Base/LocationInfoService.cs"
index b3f1bf3..7ff15b5 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicService/Base/LocationInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicService/Base/LocationInfoService.cs"
@@ -133,7 +133,7 @@
                             Dt_LocationInfo locationInfo = new Dt_LocationInfo()
                             {
                                 WarehouseId = 0,
-                                Column = j + 1,
+                                Columns = j + 1,
                                 EnableStatus = EnableStatusEnum.Normal.ObjToInt(),
                                 Layer = k + 1,
                                 LocationStatus = LocationStatusEnum.Free.ObjToInt(),
@@ -142,8 +142,8 @@
                                 Row = i + 1,
                                 Depth = depth,
                             };
-                            locationInfo.LocationCode = $"{locationInfo.RoadwayNo}-{locationInfo.Row.ToString().PadLeft(3, '0')}-{locationInfo.Column.ToString().PadLeft(3, '0')}-{locationInfo.Layer.ToString().PadLeft(3, '0')}-{locationInfo.Depth.ToString().PadLeft(2, '0')}";
-                            locationInfo.LocationName = $"{locationInfo.RoadwayNo}宸烽亾{locationInfo.Row.ToString().PadLeft(3, '0')}琛寋locationInfo.Column.ToString().PadLeft(3, '0')}鍒梴locationInfo.Layer.ToString().PadLeft(3, '0')}灞倇locationInfo.Depth.ToString().PadLeft(2, '0')}娣�";
+                            locationInfo.LocationCode = $"{locationInfo.RoadwayNo}-{locationInfo.Row.ToString().PadLeft(3, '0')}-{locationInfo.Columns.ToString().PadLeft(3, '0')}-{locationInfo.Layer.ToString().PadLeft(3, '0')}-{locationInfo.Depth.ToString().PadLeft(2, '0')}";
+                            locationInfo.LocationName = $"{locationInfo.RoadwayNo}宸烽亾{locationInfo.Row.ToString().PadLeft(3, '0')}琛寋locationInfo.Columns.ToString().PadLeft(3, '0')}鍒梴locationInfo.Layer.ToString().PadLeft(3, '0')}灞倇locationInfo.Depth.ToString().PadLeft(2, '0')}娣�";
                             locationInfos.Add(locationInfo);
                         }
                     }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicService/Service/LocationInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicService/Service/LocationInfoService.cs"
index bdba1c5..a9a13df 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicService/Service/LocationInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicService/Service/LocationInfoService.cs"
@@ -60,13 +60,13 @@
                 List<Dt_LocationInfo> definedTypeLocations = locationInfos.Where(x => x.LocationType == palletType.ObjToInt()).ToList();
 
                 //鏈畾涔夌被鍨嬬殑绌鸿揣浣�
-                List<Dt_LocationInfo> undefinedTypeEmptyLocations = locationInfos.Where(x => (x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() || x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == LocationTypeEnum.Undefined.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode)).OrderByDescending(x => x.Depth).ThenBy(x => x.Layer).ThenBy(x => x.Row).ThenBy(x => x.Column).ToList();
+                List<Dt_LocationInfo> undefinedTypeEmptyLocations = locationInfos.Where(x => (x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() || x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == LocationTypeEnum.Undefined.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode)).OrderByDescending(x => x.Depth).ThenBy(x => x.Layer).ThenBy(x => x.Row).ThenBy(x => x.Columns).ToList();
 
                 if (locationInfos.Count * weightValue >= definedTypeLocations.Count && undefinedTypeEmptyLocations.Count > 0)//濡傛灉宸插畾涔夌被鍨嬭揣浣嶆湭瓒呰繃姣斾緥锛屼笖鏈夋湭瀹氫箟绫诲瀷鐨勮揣浣�
                 {
                     if (palletType == PalletTypeEnum.LargePallet)
                     {
-                        undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Column % 2 == 1).ToList();
+                        undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Columns % 2 == 1).ToList();
                     }
                     for (int i = 0; i < undefinedTypeEmptyLocations.Count; i++)
                     {
@@ -82,7 +82,7 @@
                 }
                 else
                 {
-                    List<Dt_LocationInfo> definedTypeEmptyLocations = locationInfos.Where(x => (x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() || x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == palletType.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode)).OrderByDescending(x => x.Depth).ThenBy(x => x.Layer).ThenBy(x => x.Row).ThenBy(x => x.Column).ToList();
+                    List<Dt_LocationInfo> definedTypeEmptyLocations = locationInfos.Where(x => (x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() || x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == palletType.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode)).OrderByDescending(x => x.Depth).ThenBy(x => x.Layer).ThenBy(x => x.Row).ThenBy(x => x.Columns).ToList();
 
                     for (int i = 0; i < definedTypeEmptyLocations.Count; i++)
                     {
@@ -106,7 +106,7 @@
             {
                 case PalletTypeEnum.LargePallet:
                     {
-                        Dt_LocationInfo? nearLocation = locationInfos.FirstOrDefault(x => x.Row == undefinedTypeEmptyLocation.Row && x.Layer == undefinedTypeEmptyLocation.Layer && x.Depth == undefinedTypeEmptyLocation.Depth && x.Column == undefinedTypeEmptyLocation.Column + 1);
+                        Dt_LocationInfo? nearLocation = locationInfos.FirstOrDefault(x => x.Row == undefinedTypeEmptyLocation.Row && x.Layer == undefinedTypeEmptyLocation.Layer && x.Depth == undefinedTypeEmptyLocation.Depth && x.Columns == undefinedTypeEmptyLocation.Columns + 1);
                         if (nearLocation != null && nearLocation.LocationStatus == LocationStatusEnum.Free.ObjToInt() && DepthLocationIsEmpty(locationInfos, undefinedTypeEmptyLocation) != null)
                         {
                             Dt_LocationInfo? locationInfo = DepthLocationIsEmpty(locationInfos, undefinedTypeEmptyLocation);
@@ -175,7 +175,7 @@
                     locations[i].LocationType = palletType.ObjToInt();
                 }
 
-                Dt_LocationInfo? nearLocation = locationInfos.FirstOrDefault(x => x.Row == location.Row && x.Layer == location.Layer && x.Depth == location.Depth && x.Column == location.Column + 1);
+                Dt_LocationInfo? nearLocation = locationInfos.FirstOrDefault(x => x.Row == location.Row && x.Layer == location.Layer && x.Depth == location.Depth && x.Columns == location.Columns + 1);
                 if (nearLocation != null)
                 {
                     List<Dt_LocationInfo> nearLocations = GetGroupLocations(locationInfos, nearLocation);
@@ -220,7 +220,7 @@
                     locations[i].LocationType = palletType.ObjToInt();
                 }
 
-                Dt_LocationInfo? nearLocation = locationInfos.FirstOrDefault(x => x.Row == location.Row && x.Layer == location.Layer && x.Depth == location.Depth && x.Column == location.Column + 1);
+                Dt_LocationInfo? nearLocation = locationInfos.FirstOrDefault(x => x.Row == location.Row && x.Layer == location.Layer && x.Depth == location.Depth && x.Columns == location.Columns + 1);
                 if (nearLocation != null)
                 {
                     List<Dt_LocationInfo> nearLocations = GetGroupLocations(locationInfos, nearLocation);
@@ -252,7 +252,7 @@
             int maxDepth = locationInfos.Max(x => x.Depth);
             for (int j = location.Depth + 1; j <= maxDepth; j++)
             {
-                Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer);
+                Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Columns == location.Columns && x.Layer == location.Layer);
                 if (locationInfo != null)
                 {
                     groupLocations.Add(locationInfo);
@@ -261,7 +261,7 @@
 
             for (int j = location.Depth - 1; j >= 1; j--)
             {
-                Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer);
+                Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Columns == location.Columns && x.Layer == location.Layer);
                 if (locationInfo != null)
                 {
                     groupLocations.Add(locationInfo);
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicService/Service/LocationInfoService_Common.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicService/Service/LocationInfoService_Common.cs"
index beb22ff..f0a60d1 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicService/Service/LocationInfoService_Common.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicService/Service/LocationInfoService_Common.cs"
@@ -76,7 +76,7 @@
 
                 Dictionary<string, OrderByType> orderBy = new Dictionary<string, OrderByType>()
                 {
-                    { nameof(Dt_LocationInfo.Column),OrderByType.Desc },
+                    { nameof(Dt_LocationInfo.Columns),OrderByType.Desc },
                     { nameof(Dt_LocationInfo.Layer),OrderByType.Asc },
                     { nameof(Dt_LocationInfo.Depth),OrderByType.Desc },
                     { nameof(Dt_LocationInfo.Row),OrderByType.Asc }
@@ -106,7 +106,7 @@
                 
                 Dictionary<string, OrderByType> orderBy = new Dictionary<string, OrderByType>()
                 {
-                    { nameof(Dt_LocationInfo.Column),OrderByType.Desc },
+                    { nameof(Dt_LocationInfo.Columns),OrderByType.Desc },
                     { nameof(Dt_LocationInfo.Layer),OrderByType.Asc },
                     { nameof(Dt_LocationInfo.Depth),OrderByType.Desc },
                     { nameof(Dt_LocationInfo.Row),OrderByType.Asc }
@@ -128,8 +128,8 @@
                             Dt_LocationInfo? nearLocation1;
                             Dt_LocationInfo? nearLocation2;
 
-                            nearLocation1 = locationInfos.FirstOrDefault(x => x.LocationType == LocationTypeEnum.SmallPallet.ObjToInt() && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.Row == item.Row && x.Layer == item.Layer && x.Depth == item.Depth && x.Column == item.Column - 1);
-                            nearLocation2 = locationInfos.FirstOrDefault(x => x.LocationType == LocationTypeEnum.SmallPallet.ObjToInt() && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.Row == item.Row && x.Layer == item.Layer && x.Depth == item.Depth && x.Column == item.Column + 1);
+                            nearLocation1 = locationInfos.FirstOrDefault(x => x.LocationType == LocationTypeEnum.SmallPallet.ObjToInt() && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.Row == item.Row && x.Layer == item.Layer && x.Depth == item.Depth && x.Columns == item.Columns - 1);
+                            nearLocation2 = locationInfos.FirstOrDefault(x => x.LocationType == LocationTypeEnum.SmallPallet.ObjToInt() && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.Row == item.Row && x.Layer == item.Layer && x.Depth == item.Depth && x.Columns == item.Columns + 1);
                             if (nearLocation1!=null && nearLocation2!=null)
                             {
                                 locationInfo = item;
@@ -162,159 +162,6 @@
             UpdateLocationStatus(location, palletType, locationStatus, warehousId);
         }
 
-        /// <summary>
-        /// 淇敼璐т綅鐘舵�佸強绫诲瀷
-        /// </summary>
-        /// <param name="location">璐т綅瀵硅薄</param>
-        /// <param name="palletType">鎵樼洏绫诲瀷</param>
-        /// <param name="locationStatus">璐т綅鐘舵��</param>
-        //public void UpdateLocationStatus2(Dt_LocationInfo location, int palletType, LocationStatusEnum locationStatus, int warehousId)
-        //{
-        //    List<Dt_LocationInfo> locationInfos = Repository.QueryData(x => x.RoadwayNo == location.RoadwayNo);
-
-        //    List<Dt_LocationInfo> locations = GetGroupLocations(locationInfos, location);
-        //    if (locationInfos.Max(x => x.Depth) < 3)
-        //    {
-        //        for (int i = 0; i < locations.Count; i++)
-        //        {
-        //            if (locations[i].LocationType != palletType.ObjToInt())
-        //            {
-        //                locations[i].LocationType = palletType.ObjToInt();
-        //            }
-
-        //            if (locations[i].LocationCode == location.LocationCode)
-        //            {
-        //                locations[i].LocationStatus = locationStatus.ObjToInt();
-        //            }
-        //            else
-        //            {
-        //                if (locationStatus == LocationStatusEnum.Lock)
-        //                {
-        //                    if (locations[i].LocationStatus == LocationStatusEnum.InStock.ObjToInt())
-        //                    {
-        //                        locations[i].LocationStatus = LocationStatusEnum.InStockLock.ObjToInt();
-        //                    }
-        //                    else if (locations[i].LocationStatus == LocationStatusEnum.Free.ObjToInt())
-        //                    {
-        //                        locations[i].LocationStatus = LocationStatusEnum.FreeLock.ObjToInt();
-        //                    }
-        //                }
-        //                else if (locationStatus == LocationStatusEnum.Free || locationStatus == LocationStatusEnum.InStock)
-        //                {
-        //                    if (locations[i].LocationStatus == LocationStatusEnum.InStockLock.ObjToInt())
-        //                    {
-        //                        locations[i].LocationStatus = LocationStatusEnum.InStock.ObjToInt();
-        //                    }
-        //                    else if (locations[i].LocationStatus == LocationStatusEnum.FreeLock.ObjToInt())
-        //                    {
-        //                        locations[i].LocationStatus = LocationStatusEnum.Free.ObjToInt();
-        //                    }
-        //                }
-        //            }
-        //        }
-
-        //        Dt_LocationInfo? nearLocation = locationInfos.FirstOrDefault(x => x.Row == location.Row && x.Layer == location.Layer && x.Depth == location.Depth && x.Column == location.Column + 1);
-        //        if(location.RoadwayNo == "SC01_BC")
-        //        {
-        //            nearLocation = locationInfos.FirstOrDefault(x => x.Row == location.Row && x.Layer == location.Layer && x.Depth == location.Depth && x.Column == location.Column + 1);
-        //        }
-        //        if (nearLocation != null)
-        //        {
-        //            List<Dt_LocationInfo> nearLocations = GetGroupLocations(locationInfos, nearLocation);
-        //            for (int i = 0; i < nearLocations.Count; i++)
-        //            {
-        //                if (nearLocations[i].LocationType != palletType.ObjToInt())
-        //                {
-        //                    nearLocations[i].LocationType = palletType.ObjToInt();
-        //                }
-
-        //                if (palletType.ObjToInt() >= PalletTypeEnum.LargePallet.ObjToInt())
-        //                {
-        //                    if (nearLocations[i].LocationCode == nearLocation.LocationCode)
-        //                    {
-        //                        nearLocations[i].LocationStatus = locationStatus.ObjToInt();
-        //                    }
-        //                    else
-        //                    {
-        //                        if (locationStatus == LocationStatusEnum.Lock)
-        //                        {
-        //                            if (nearLocations[i].LocationStatus == LocationStatusEnum.InStock.ObjToInt())
-        //                            {
-        //                                nearLocations[i].LocationStatus = LocationStatusEnum.InStockLock.ObjToInt();
-        //                            }
-        //                            else if (nearLocations[i].LocationStatus == LocationStatusEnum.Free.ObjToInt())
-        //                            {
-        //                                nearLocations[i].LocationStatus = LocationStatusEnum.FreeLock.ObjToInt();
-        //                            }
-        //                        }
-        //                        else if (locationStatus == LocationStatusEnum.InStock)
-        //                        {
-        //                            if (nearLocations[i].LocationStatus == LocationStatusEnum.InStockLock.ObjToInt())
-        //                            {
-        //                                nearLocations[i].LocationStatus = LocationStatusEnum.InStock.ObjToInt();
-        //                            }
-        //                            else if (nearLocations[i].LocationStatus == LocationStatusEnum.FreeLock.ObjToInt())
-        //                            {
-        //                                nearLocations[i].LocationStatus = LocationStatusEnum.Free.ObjToInt();
-        //                            }
-        //                        }
-        //                    }
-        //                }
-
-        //            }
-        //            locations.AddRange(nearLocations);
-        //        }
-        //    }
-        //    else
-        //    {
-        //        for (int i = 0; i < locations.Count; i++)
-        //        {
-        //            if (locations[i].LocationCode == location.LocationCode)
-        //            {
-        //                locations[i].LocationStatus = locationStatus.ObjToInt();
-        //            }
-        //            else
-        //            {
-        //                if (locationStatus == LocationStatusEnum.Lock)
-        //                {
-        //                    if (locations[i].LocationStatus == LocationStatusEnum.InStock.ObjToInt())
-        //                    {
-        //                        locations[i].LocationStatus = LocationStatusEnum.InStockLock.ObjToInt();
-        //                    }
-        //                    else if (locations[i].LocationStatus == LocationStatusEnum.Free.ObjToInt())
-        //                    {
-        //                        locations[i].LocationStatus = LocationStatusEnum.FreeLock.ObjToInt();
-        //                    }
-        //                }
-        //                else if (locationStatus == LocationStatusEnum.Free || locationStatus == LocationStatusEnum.InStock)
-        //                {
-        //                    if (locations[i].LocationStatus == LocationStatusEnum.InStockLock.ObjToInt())
-        //                    {
-        //                        locations[i].LocationStatus = LocationStatusEnum.InStock.ObjToInt();
-        //                    }
-        //                    else if (locations[i].LocationStatus == LocationStatusEnum.FreeLock.ObjToInt())
-        //                    {
-        //                        locations[i].LocationStatus = LocationStatusEnum.Free.ObjToInt();
-        //                    }
-        //                }
-        //            }
-        //            if (locations[i].LocationType != palletType.ObjToInt())
-        //            {
-        //                locations[i].LocationType = palletType.ObjToInt();
-        //            }
-        //        }
-        //    }
-
-        //    if (locations.Where(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt()).Count() == locations.Count && locationStatus == LocationStatusEnum.Free)
-        //    {
-        //        locations.ForEach(x =>
-        //        {
-        //            x.LocationType = 0;
-        //        });
-        //    }
-
-        //    Repository.UpdateData(locations);
-        //}
 
         public void UpdateLocationStatus(Dt_LocationInfo location, int palletType, LocationStatusEnum locationStatus, int warehouseId)
         {
@@ -378,8 +225,8 @@
                     Dt_LocationInfo? nearLocation1;
                     Dt_LocationInfo? nearLocation2;
 
-                    nearLocation1 = locationInfos.FirstOrDefault(x => x.LocationType == LocationTypeEnum.SmallPallet.ObjToInt() && x.Row == location.Row && x.Layer == location.Layer && x.Depth == location.Depth && x.Column == location.Column - 1);
-                    nearLocation2 = locationInfos.FirstOrDefault(x => x.LocationType == LocationTypeEnum.SmallPallet.ObjToInt() && x.Row == location.Row && x.Layer == location.Layer && x.Depth == location.Depth && x.Column == location.Column + 1);
+                    nearLocation1 = locationInfos.FirstOrDefault(x => x.LocationType == LocationTypeEnum.SmallPallet.ObjToInt() && x.Row == location.Row && x.Layer == location.Layer && x.Depth == location.Depth && x.Columns == location.Columns - 1);
+                    nearLocation2 = locationInfos.FirstOrDefault(x => x.LocationType == LocationTypeEnum.SmallPallet.ObjToInt() && x.Row == location.Row && x.Layer == location.Layer && x.Depth == location.Depth && x.Columns == location.Columns + 1);
 
 
                     if (nearLocation1 != null && nearLocation2 != null)
@@ -467,7 +314,7 @@
             for (int j = location.Depth + 1; j <= maxDepth; j++)
             {
                 row += 1;
-                Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row);
+                Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Columns == location.Columns && x.Layer == location.Layer && x.Row == row);
                 if (locationInfo != null)
                 {
                     groupLocations.Add(locationInfo);
@@ -477,7 +324,7 @@
             for (int j = location.Depth - 1; j >= 1; j--)
             {
                 row -= 1;
-                Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row);
+                Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Columns == location.Columns && x.Layer == location.Layer && x.Row == row);
                 if (locationInfo != null)
                 {
                     groupLocations.Add(locationInfo);
@@ -500,7 +347,7 @@
             int row = location.Row;
             for (int j = location.Depth + 1; j <= maxDepth; j++)
             {
-                Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && (x.Row == row + 1 || x.Row == row - 1));
+                Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Columns == location.Columns && x.Layer == location.Layer && (x.Row == row + 1 || x.Row == row - 1));
                 if (locationInfo != null)
                 {
                     groupLocations.Add(locationInfo);
@@ -509,7 +356,7 @@
 
             for (int j = location.Depth - 1; j >= 1; j--)
             {
-                Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && (x.Row == row + 1 || x.Row == row - 1));
+                Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Columns == location.Columns && x.Layer == location.Layer && (x.Row == row + 1 || x.Row == row - 1));
                 if (locationInfo != null)
                 {
                     groupLocations.Add(locationInfo);
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/LocationEnum/LocationStatusEnum.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/LocationEnum/LocationStatusEnum.cs"
index d0c2417..e2ba306 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/LocationEnum/LocationStatusEnum.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/LocationEnum/LocationStatusEnum.cs"
@@ -40,11 +40,5 @@
         /// </summary>
         [Description("鏈夎揣")]
         InStock = 100,
-
-        /// <summary>
-        /// 鎵樼洏閿佸畾
-        /// </summary>
-        [Description("鎵樼洏閿佸畾")]
-        PalletLock = 99
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/StockEnum/StockStatusMenu.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/StockEnum/StockStatusMenu.cs"
index 6dd8f37..ce0c0b4 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/StockEnum/StockStatusMenu.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/StockEnum/StockStatusMenu.cs"
@@ -47,6 +47,9 @@
         [Description("鎷i�夊畬鎴�")]
         鎷i�夊畬鎴� =14,
 
+        [Description("鑰佸巶閫�搴�")]
+        鑰佸巶閫�搴� = 15,
+
         [Description("MES浣欐枡閫�搴�")]
         MES浣欐枡閫�搴� = 21,
 
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/TaskEnum/TaskStatusEnum.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/TaskEnum/TaskStatusEnum.cs"
index e4f5347..aba7a06 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/TaskEnum/TaskStatusEnum.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/TaskEnum/TaskStatusEnum.cs"
@@ -107,6 +107,12 @@
         MD_Executing = 520,
 
         /// <summary>
+        /// 绛夊緟閰嶉�佸懠鍙�
+        /// </summary>
+        [Description("绛夊緟閰嶉�佸懠鍙�")]
+        CallPending = 610,
+
+        /// <summary>
         /// 浠诲姟瀹屾垚
         /// </summary>
         [Description("浠诲姟瀹屾垚")]
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs"
index 97ebc76..8c87aca 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs"
@@ -112,6 +112,12 @@
         PaperYLBackInbound = 730,
 
         /// <summary>
+        /// 鍘熸枡鑰佸巶閫�搴�
+        /// </summary>
+        [Description("鍘熸枡鑰佸巶閫�搴�")]
+        PaperOldYLBackInbound = 740,
+
+        /// <summary>
         /// 宸烽亾鍐呯Щ搴�
         /// </summary>
         [Description("宸烽亾鍐呯Щ搴�")]
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/BaseModels/PageDataOptions.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/BaseModels/PageDataOptions.cs"
index 8838eeb..2ef09ae 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/BaseModels/PageDataOptions.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/BaseModels/PageDataOptions.cs"
@@ -79,11 +79,11 @@
                     }
                     else if (expressionType == LinqExpressionType.ThanOrEqual)
                     {
-                        where += $"{searchParametersList[i].Name} {HtmlElementType.thanorequal} '{searchParametersList[i].Value}'";
+                        where += $"{searchParametersList[i].Name} {HtmlElementType.thanOrEqual} '{searchParametersList[i].Value}'";
                     }
                     else if (expressionType == LinqExpressionType.LessThanOrEqual)
                     {
-                        where += $"{searchParametersList[i].Name} {HtmlElementType.lessOrequal} '{searchParametersList[i].Value}'";
+                        where += $"{searchParametersList[i].Name} {HtmlElementType.lessOrEqual} '{searchParametersList[i].Value}'";
                     }
                     else if (expressionType == LinqExpressionType.GreaterThan)
                     {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/BaseModels/WebResponseContent.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/BaseModels/WebResponseContent.cs"
index 66feb1b..3aec98d 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/BaseModels/WebResponseContent.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/BaseModels/WebResponseContent.cs"
@@ -25,9 +25,12 @@
 
         public string DevMessage { get; set; }
 
+        public string Datetime { get; set; }
+
         public WebResponseContent OK()
         {
             Status = true;
+            Datetime = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");
             return this;
         }
 
@@ -40,6 +43,7 @@
             Status = true;
             Message = message;
             Data = data;
+            Datetime = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");
             return this;
         }
 
@@ -47,6 +51,7 @@
         {
             Status = false;
             Message = message;
+            Datetime= DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");
             return this;
         }
     }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/Const/HtmlElementType.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/Const/HtmlElementType.cs"
index 9d19bfb..ab219b8 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/Const/HtmlElementType.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/Const/HtmlElementType.cs"
@@ -25,7 +25,7 @@
         public const string like = "like";
 
         public const string thanOrEqual = ">=";
-        public const string lessOrequal = "<=";
+        public const string lessOrEqual = "<=";
         public const string Contains = "in";
         public const string Equal = "=";
     }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/Helper/UtilConvert.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/Helper/UtilConvert.cs"
index 856f823..6acca7c 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/Helper/UtilConvert.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/Helper/UtilConvert.cs"
@@ -958,10 +958,10 @@
                 case HtmlElementType.Contains:
                     linqExpression = LinqExpressionType.In;
                     break;
-                case HtmlElementType.thanOrEqual:
+                case HtmlElementType.thanorequal:
                     linqExpression = LinqExpressionType.ThanOrEqual;
                     break;
-                case HtmlElementType.lessOrequal:
+                case HtmlElementType.lessorequal:
                     linqExpression = LinqExpressionType.LessThanOrEqual;
                     break;
                 case HtmlElementType.GT:
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/ERP/BSTOutOrderDTO.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/ERP/BSTOutOrderDTO.cs"
index fe16398..37d1ded 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/ERP/BSTOutOrderDTO.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/ERP/BSTOutOrderDTO.cs"
@@ -9,7 +9,7 @@
 namespace WIDESEA_DTO.ERP
 {
     /// <summary>
-    /// 鍗氭�濋�氶噰璐叆搴撳崟鎺ユ敹瀹炰綋
+    /// 鍗氭�濋�氱敓浜ф帓绋嬫帴鏀跺疄浣�
     /// </summary>
     [ModelValidate]
     public class BSTOutOrderDTO
@@ -45,7 +45,7 @@
         public List<BstBoardMpsDetailItem> BstBoardMpsDetails { get; set; }
     }
     /// <summary>
-    /// 閲囪喘鏀惰揣鏄庣粏
+    /// 鐢熶骇鎺掔▼鏄庣粏
     /// </summary>
     public class BstBoardMpsDetailItem
     {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/MES/MESAutoIssueDTO.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/MES/MESAutoIssueDTO.cs"
new file mode 100644
index 0000000..890ba2e
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/MES/MESAutoIssueDTO.cs"
@@ -0,0 +1,46 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core.Attributes;
+
+namespace WIDESEA_DTO.MES
+{
+    /// <summary>
+    /// MES棰嗘枡鑷姩鍙枡鎺ユ敹瀹炰綋
+    /// </summary>
+    [ModelValidate]
+    public class MESAutoIssueDTO
+    {
+        /// <summary>
+        /// 鍑哄簱鏉ユ簮鏄庣粏ID
+        /// </summary>
+        [PropertyValidate("鍑哄簱鏉ユ簮鏄庣粏ID", NotNullAndEmpty = true)]
+        public int OutDetailId { get; set; }
+
+        /// <summary>
+        /// 鏈哄彴浣欐枡鍙敤鏃堕暱
+        /// </summary>
+        [PropertyValidate("鏈哄彴浣欐枡鍙敤鏃堕暱", NotNullAndEmpty = true)]
+        public int OddsTime { get; set; }
+
+        /// <summary>
+        /// 涓婃枡鍛ㄨ浆浣嶄綑鏂欐暟閲�
+        /// </summary>
+        [PropertyValidate("涓婃枡鍛ㄨ浆浣嶄綑鏂欐暟閲�", NotNullAndEmpty = true)]
+        public decimal OddsQuantity { get; set; }
+
+        /// <summary>
+        /// 鍛ㄨ浆浣嶇疆缂栧彿
+        /// </summary>
+        [PropertyValidate("鍛ㄨ浆浣嶇疆缂栧彿", NotNullAndEmpty = true)]
+        public string PointCode { get; set; }
+
+        /// <summary>
+        /// 鍛ㄨ浆浣嶆槸鍚﹀瓨鍦ㄧ┖鎵�
+        /// </summary>
+        [PropertyValidate("鍛ㄨ浆浣嶆槸鍚﹀瓨鍦ㄧ┖鎵�", NotNullAndEmpty = true)]
+        public int IsEmptyPallet { get; set; }
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/MES/OutMESOrderDTO.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/MES/OutMESOrderDTO.cs"
new file mode 100644
index 0000000..8df49a8
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/MES/OutMESOrderDTO.cs"
@@ -0,0 +1,82 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core.Attributes;
+
+namespace WIDESEA_DTO.MES
+{
+    /// <summary>
+    /// MES棰嗘枡璁″垝鎺ユ敹瀹炰綋
+    /// </summary>
+    [ModelValidate]
+    public class OutMESOrderDTO
+    {
+        /// <summary>
+        /// 鍑哄簱鏉ユ簮鏄庣粏ID
+        /// </summary>
+        [PropertyValidate("鍑哄簱鏉ユ簮鏄庣粏ID", NotNullAndEmpty = true)]
+        public int OutDetailId { get; set; }
+
+        /// <summary>
+        /// 浠撳簱浠e彿
+        /// </summary>
+        [PropertyValidate("绾歌川鏀惰揣鍗曚富琛↖D", NotNullAndEmpty = false)]
+        public string WarehouseCode { get; set; }
+
+        /// <summary>
+        /// 鐢熶骇璁㈠崟缂栫爜
+        /// </summary>
+        [PropertyValidate("鐢熶骇璁㈠崟缂栫爜", NotNullAndEmpty = true)]
+        public string ProductOrderNo { get; set; }
+
+        /// <summary>
+        /// 娲惧崟宸ュ崟缂栫爜
+        /// </summary>
+        [PropertyValidate("娲惧崟宸ュ崟缂栫爜", NotNullAndEmpty = true)]
+        public string SendOrderNo { get; set; }
+
+        /// <summary>
+        /// 鐗╂枡缂栫爜
+        /// </summary>
+        [PropertyValidate("鐗╂枡缂栫爜", NotNullAndEmpty = true)]
+        public string MaterialCode { get; set; }
+
+        /// <summary>
+        /// 鐗╂枡鎵规
+        /// </summary>
+        [PropertyValidate("鐗╂枡鎵规", NotNullAndEmpty = false)]
+        public string MaterialLot { get; set; }
+
+        /// <summary>
+        /// 鐗╂枡绛夌骇
+        /// </summary>
+        [PropertyValidate("鐗╂枡绛夌骇", NotNullAndEmpty = false)]
+        public string GradeCode { get; set; }
+
+        /// <summary>
+        /// 鐗╂枡闇�姹傛暟閲�
+        /// </summary>
+        [PropertyValidate("鐗╂枡闇�姹傛暟閲�", NotNullAndEmpty = true)]
+        public decimal ReqQuantity { get; set; }
+
+        /// <summary>
+        /// 鍔犲伐涓績缂栫爜(鏈哄彴)
+        /// </summary>
+        [PropertyValidate("鍔犲伐涓績缂栫爜(鏈哄彴)", NotNullAndEmpty = true)]
+        public string MakeCode { get; set; }
+
+        /// <summary>
+        /// 璁″垝棰嗘枡鏃堕棿
+        /// </summary>
+        [PropertyValidate("璁″垝棰嗘枡鏃堕棿", NotNullAndEmpty = true)]
+        public DateTime PlanDate { get; set; }
+
+        /// <summary>
+        /// 缁撴潫鏃堕棿
+        /// </summary>
+        [PropertyValidate("缁撴潫鏃堕棿", NotNullAndEmpty = true)]
+        public DateTime EndDate { get; set; }
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/IMESService/IInvokeMESService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/IMESService/IInvokeMESService.cs"
new file mode 100644
index 0000000..3288af9
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/IMESService/IInvokeMESService.cs"
@@ -0,0 +1,17 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core;
+using WIDESEA_External.Model;
+
+namespace WIDESEA_External.MESService
+{
+    /// <summary>
+    /// 璋冪敤MES鎺ュ彛
+    /// </summary>
+    public interface IInvokeMESService : IDependency
+    {
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/MESService/InvokeMESService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/MESService/InvokeMESService.cs"
new file mode 100644
index 0000000..e7c3177
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/MESService/InvokeMESService.cs"
@@ -0,0 +1,33 @@
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Serialization;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Common.APIEnum;
+using WIDESEA_Core.Helper;
+using WIDESEA_External.Model;
+using WIDESEA_IBasicRepository;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_External.MESService
+{
+    /// <summary>
+    /// 璋冪敤MES鎺ュ彛
+    /// </summary>
+    public class InvokeMESService : IInvokeMESService
+    {
+        private readonly IApiInfoRepository _apiInfoRepository;
+        public InvokeMESService(IApiInfoRepository apiInfoRepository)
+        {
+            _apiInfoRepository = apiInfoRepository;
+        }
+        // 鍒涘缓涓�涓娇鐢ㄥ皬椹煎嘲鍛藉悕娉曠殑搴忓垪鍖栬缃�
+        JsonSerializerSettings settings = new JsonSerializerSettings
+        {
+            ContractResolver = new CamelCasePropertyNamesContractResolver()
+        };
+        
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/Model/ERPBaseModel.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/Model/ERPBaseModel.cs"
deleted file mode 100644
index ec462f3..0000000
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/Model/ERPBaseModel.cs"
+++ /dev/null
@@ -1,35 +0,0 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WIDESEA_External.Model
-{
-    /// <summary>
-    /// ERP鎺ュ彛璋冪敤鍩虹妯″瀷
-    /// </summary>
-    /// <typeparam name="T"></typeparam>
-    public class ERPBaseModel<T>
-    {
-        /// <summary>
-        /// 鍗曟嵁绫诲瀷
-        /// </summary>
-        public string Type { get; set; }
-
-        /// <summary>
-        /// 璇存槑
-        /// </summary>
-        public string Desc { get; set; }
-
-        /// <summary>
-        /// ERP瀹夊叏鐮�
-        /// </summary>
-        public string SecurityCode { get; set; }
-
-        /// <summary>
-        /// 鏁版嵁瀵硅薄
-        /// </summary>
-        public T Data { get; set; }
-    }
-}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/Model/MESDispatchModel.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/Model/MESDispatchModel.cs"
new file mode 100644
index 0000000..7a5107e
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/Model/MESDispatchModel.cs"
@@ -0,0 +1,12 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEA_External.Model
+{
+    internal class MESDispatchModel
+    {
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/Model/MESResponse.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/Model/MESResponse.cs"
new file mode 100644
index 0000000..e6901aa
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/Model/MESResponse.cs"
@@ -0,0 +1,27 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEA_External.Model
+{
+    /// <summary>
+    /// MES杩斿洖
+    /// </summary>
+    public class MESResponse
+    {
+        /// <summary>
+        /// 鎴愬姛缁撴灉
+        /// </summary>
+        public bool Result { get; set; }
+        /// <summary>
+        /// 杩斿洖淇℃伅
+        /// </summary>
+        public string Msg { get; set; }
+        /// <summary>
+        /// 杩斿洖瀵硅薄
+        /// </summary>
+        public object Obj { get; set; }
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutMESOrderRepository.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutMESOrderRepository.cs"
new file mode 100644
index 0000000..1c7f15b
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutMESOrderRepository.cs"
@@ -0,0 +1,18 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core.BaseRepository;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_IOutboundRepository
+{
+    /// <summary>
+    /// MES棰嗘枡璁″垝鍗曚粨鍌ㄦ帴鍙e眰
+    /// </summary>
+    public interface IOutMESOrderRepository : IRepository<Dt_OutMESOrder>
+    {
+
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutMESOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutMESOrderService.cs"
new file mode 100644
index 0000000..1a5cb93
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutMESOrderService.cs"
@@ -0,0 +1,23 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Common.LocationEnum;
+using WIDESEA_Core.BaseServices;
+using WIDESEA_Core;
+using WIDESEA_IOutboundRepository;
+using WIDESEA_Model.Models;
+using WIDESEA_DTO.MES;
+
+namespace WIDESEA_IOutboundService
+{
+    public interface IOutMESOrderService : IService<Dt_OutMESOrder>
+    {
+        IOutMESOrderRepository Repository { get; }
+        /// <summary>
+        /// 鎺ユ敹MES棰嗘枡璁″垝
+        /// </summary>
+        WebResponseContent ReceiveOutBound(OutMESOrderDTO outMESOrderDTO);
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs"
index d6667fd..4da871c 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs"
@@ -29,6 +29,7 @@
 using WIDESEA_Core.Enums;
 using WIDESEA_DTO;
 using WIDESEA_DTO.ERP;
+using WIDESEA_DTO.MES;
 using WIDESEA_DTO.Stock;
 using WIDESEA_DTO.Task;
 using WIDESEA_ITaskInfoRepository;
@@ -113,7 +114,7 @@
         /// </summary>
         /// <param name="id"></param>
         /// <returns></returns>
-        WebResponseContent Outbound(int id);
+        WebResponseContent Outbound(List<int> ids);
 
         /// <summary>
         /// 淇敼浠诲姟鐘舵��
@@ -195,5 +196,10 @@
         /// <param name="keys"></param>
         /// <returns></returns>
         WebResponseContent CreateBSTOutboundTasks(int[] keys);
+        /// <summary>
+        /// MES鑷姩鍙枡鎺ュ彛
+        /// </summary>
+        /// <returns></returns>
+        WebResponseContent ReceiveAutoIssue(MESAutoIssueDTO autoIssueDTO);
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Basic/Dt_AGVStationInfo.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Basic/Dt_AGVStationInfo.cs"
index dfa5d87..d0e4a36 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Basic/Dt_AGVStationInfo.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Basic/Dt_AGVStationInfo.cs"
@@ -37,9 +37,14 @@
         /// <summary>
         /// 鍖哄煙
         /// </summary>
-        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "鍖哄煙")]
+        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍖哄煙")]
         public int StationArea { get; set; }
         /// <summary>
+        /// MES瀵瑰簲鍛ㄨ浆浣�
+        /// </summary>
+        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "MES瀵瑰簲鍛ㄨ浆浣�")]
+        public string MESPointCode { get; set; }
+        /// <summary>
         /// 鏄惁鍗犵敤
         /// </summary>
         [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "鏄惁鍗犵敤")]
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Basic/Dt_LocationInfo.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Basic/Dt_LocationInfo.cs"
index d47c6b7..2133968 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Basic/Dt_LocationInfo.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Basic/Dt_LocationInfo.cs"
@@ -54,7 +54,7 @@
         /// 璐т綅鍒�
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDescription = "璐т綅鍒�")]
-        public int Column { get; set; }
+        public int Columns { get; set; }
 
         /// <summary>
         /// 璐т綅灞�
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutMESOrder.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutMESOrder.cs"
new file mode 100644
index 0000000..ad501fb
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutMESOrder.cs"
@@ -0,0 +1,122 @@
+锘縰sing SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core.Attributes;
+using WIDESEA_Core.CodeConfigEnum;
+using WIDESEA_Core.DB.Models;
+
+namespace WIDESEA_Model.Models
+{
+    /// <summary>
+    /// MES棰嗘枡璁″垝鍗�
+    /// </summary>
+    [SugarTable(nameof(Dt_OutMESOrder), "MES棰嗘枡璁″垝鍗�"), ModelValidate]
+    public class Dt_OutMESOrder : BaseEntity
+    {
+        /// <summary>
+        /// 涓婚敭
+        /// </summary>
+        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")]
+        public int Id { get; set; }
+
+        ///// <summary>
+        ///// 浠撳簱涓婚敭
+        ///// </summary>
+        //[SugarColumn(IsNullable = false, ColumnDescription = "浠撳簱涓婚敭")]
+        //public int WarehouseId { get; set; }
+
+        /// <summary>
+        /// 鍑哄簱鏉ユ簮鏄庣粏ID
+        /// </summary>
+        [SugarColumn(IsNullable = false, ColumnDescription = "鍑哄簱鏉ユ簮鏄庣粏ID")]
+        public int OutDetailId { get; set; }
+
+        /// <summary>
+        /// WMS鍗曟嵁缂栧彿
+        /// </summary>
+        [CodeRule(RuleCodeEnum.OutboundOrderRule)]
+        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "WMS鍗曟嵁缂栧彿", IsOnlyIgnoreUpdate = true)]
+        public string OutMESOrderNo { get; set; }
+
+        /// <summary>
+        /// 鐢熶骇璁㈠崟缂栫爜(涓婃父)
+        /// </summary>
+        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鐢熶骇璁㈠崟缂栫爜(涓婃父)")]
+        public string ProductOrderNo { get; set; }
+
+        /// <summary>
+        /// 娲惧崟宸ュ崟缂栫爜
+        /// </summary>
+        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "娲惧崟宸ュ崟缂栫爜")]
+        public string SendOrderNo { get; set; }
+
+        /// <summary>
+        /// 鐗╂枡缂栫爜
+        /// </summary>
+        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鐗╂枡缂栫爜")]
+        public string MaterialCode { get; set; }
+
+        /// <summary>
+        /// 鐗╂枡鎵规
+        /// </summary>
+        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "鐗╂枡鎵规")]
+        public string MaterialLot { get; set; }
+
+        /// <summary>
+        /// 鐗╂枡绛夌骇
+        /// </summary>
+        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "鐗╂枡绛夌骇")]
+        public string GradeCode { get; set; }
+
+        /// <summary>
+        /// 鐗╂枡闇�姹傛暟閲�
+        /// </summary>
+        [SugarColumn(IsNullable = false, ColumnDescription = "鐗╂枡闇�姹傛暟閲�")]
+        public decimal ReqQuantity { get; set; }
+
+        /// <summary>
+        /// 鍔犲伐涓績缂栫爜(鏈哄彴)
+        /// </summary>
+        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "鍔犲伐涓績缂栫爜(鏈哄彴)")]
+        public string MakeCode { get; set; }
+
+        /// <summary>
+        /// 鐢熶骇璁㈠崟鐘舵��
+        /// </summary>
+        [SugarColumn(IsNullable = false, ColumnDescription = "鐢熶骇璁㈠崟鐘舵��")]
+        public int OutMESOrderStatus { get; set; }
+
+        /// <summary>
+        /// 璁″垝棰嗘枡鏃堕棿
+        /// </summary>
+        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "璁″垝棰嗘枡鏃堕棿")]
+        public DateTime PlanDate { get; set; }
+
+        /// <summary>
+        /// 缁撴潫鏃堕棿
+        /// </summary>
+        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "缁撴潫鏃堕棿")]
+        public DateTime EndDate { get; set; }
+
+        /// <summary>
+        /// 鍒嗛厤闇�姹傛暟閲�
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDescription = "鍒嗛厤闇�姹傛暟閲�")]
+        public decimal AssignTotalUsage { get; set; }
+
+        /// <summary>
+        /// 宸插嚭闇�姹傛暟閲�
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDescription = "宸插嚭闇�姹傛暟閲�")]
+        public decimal OutTotalUsage { get; set; }
+
+        /// <summary>
+        /// 澶囨敞
+        /// </summary>
+        [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "澶囨敞")]
+        public string Remark { get; set; }
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundRepository/OutMESOrderRepository.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundRepository/OutMESOrderRepository.cs"
new file mode 100644
index 0000000..656691a
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundRepository/OutMESOrderRepository.cs"
@@ -0,0 +1,21 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core.BaseRepository;
+using WIDESEA_IOutboundRepository;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_OutboundRepository
+{
+    /// <summary>
+    /// MES棰嗘枡璁″垝鍗曚粨鍌ㄥ疄鐜板眰
+    /// </summary>
+    public class OutMESOrderRepository : RepositoryBase<Dt_OutMESOrder>, IOutMESOrderRepository
+    {
+        public OutMESOrderRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
+        {
+        }
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutBSTOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutBSTOrderService.cs"
index 988d3c5..3d8336d 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutBSTOrderService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutBSTOrderService.cs"
@@ -42,14 +42,18 @@
             WebResponseContent content = new WebResponseContent();
             try
             {
-                //鑾峰彇鎵�鏈夊嚭搴撳崟
-                List<Dt_OutBSTOrder> OldoutBSTOrders = BaseDal.Db.Queryable<Dt_OutBSTOrder>().Includes(x => x.Details).ToList();
                 //鏂板
                 List<BSTOutOrderDTO> outOrderDTOsAdd = bSTOutOrderDTOs.Where(x => x.Way == 1).ToList();
                 //淇敼
                 List<BSTOutOrderDTO> outOrderDTOsUpdate = bSTOutOrderDTOs.Where(x => x.Way == 2).ToList();
                 //鍒犻櫎
                 List<BSTOutOrderDTO> outOrderDTOsDel = bSTOutOrderDTOs.Where(x => x.Way == 3).ToList();
+                if (outOrderDTOsAdd.Count==0 && outOrderDTOsUpdate.Count==0 && outOrderDTOsDel.Count==0)
+                {
+                    return content.Error($"鍑哄簱鎺掔▼淇℃伅浼犲叆涓虹┖");
+                }
+                //鑾峰彇鎵�鏈夊嚭搴撳崟
+                List<Dt_OutBSTOrder> OldoutBSTOrders = BaseDal.Db.Queryable<Dt_OutBSTOrder>().Includes(x => x.Details).ToList();
                 //鑾峰彇鎵�鏈夌墿鏂� 
                 List<Dt_MaterielInfo> materielInfos = _basicRepository.MaterielInfoRepository.QueryData(x => x.WarehouseId == WarehouseEnum.LLDYL.ObjToInt() && x.MaterielInvOrgId == MaterielInvOrgEnum.鑰佸巶.ObjToInt() && x.MaterialSourceId != 0);
 
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutMESOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutMESOrderService.cs"
new file mode 100644
index 0000000..466fd52
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutMESOrderService.cs"
@@ -0,0 +1,89 @@
+锘縰sing AutoMapper;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Common.MaterielEnum;
+using WIDESEA_Core;
+using WIDESEA_Core.BaseServices;
+using WIDESEA_Core.Helper;
+using WIDESEA_DTO.MES;
+using WIDESEA_IBasicRepository;
+using WIDESEA_IBasicService;
+using WIDESEA_IOutboundRepository;
+using WIDESEA_IOutboundService;
+using WIDESEA_IRecordService;
+using WIDESEA_IStockService;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_OutboundService
+{
+    public class OutMESOrderService : ServiceBase<Dt_OutMESOrder, IOutMESOrderRepository>, IOutMESOrderService
+    {
+        public IOutMESOrderRepository Repository => BaseDal;
+        private IBasicRepository _basicRepository;
+        private IStockService _stockService;
+        private IOutStockLockInfoService _outStockLockInfoService;
+        private IBasicService _basicService;
+        private ILocationStatusChangeRecordService _locationStatusChangeRecordService;
+        private readonly IMapper _mapper;
+
+        public OutMESOrderService(IOutMESOrderRepository BaseDal,IBasicRepository basicRepository, IStockService stockService, IOutStockLockInfoService outStockLockInfoService, IBasicService basicService, ILocationStatusChangeRecordService locationStatusChangeRecordService,IMapper mapper) : base(BaseDal)
+        {
+            _basicRepository = basicRepository;
+            _stockService = stockService;
+            _outStockLockInfoService = outStockLockInfoService;
+            _basicService = basicService;
+            _locationStatusChangeRecordService = locationStatusChangeRecordService;
+            _mapper = mapper;
+        }
+        /// <summary>
+        /// 鎺ユ敹MES棰嗘枡璁″垝
+        /// </summary>
+        /// <returns></returns>
+        public WebResponseContent ReceiveOutBound(OutMESOrderDTO outMESOrderDTO)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                if (outMESOrderDTO==null)
+                {
+                    return content.Error("棰嗘枡璁″垝浼犲叆淇℃伅涓虹┖");
+                }
+                if (outMESOrderDTO.OutDetailId <= 0)
+                {
+                    return content.Error($"棰嗘枡璁″垝{nameof(OutMESOrderDTO.OutDetailId)}:{outMESOrderDTO.OutDetailId}闇�瑕佸ぇ浜�0");
+                }
+                if (outMESOrderDTO.ReqQuantity <= 0)
+                {
+                    return content.Error($"棰嗘枡璁″垝{nameof(OutMESOrderDTO.ReqQuantity)}:{outMESOrderDTO.ReqQuantity}闇�瑕佸ぇ浜�0");
+                }
+                //鑾峰彇鎵�鏈夌墿鏂欎俊鎭�
+                List<Dt_MaterielInfo> materielInfos = _basicRepository.MaterielInfoRepository.QueryData(x=>x.MaterielInvOrgId==MaterielInvOrgEnum.鏂板巶.ObjToInt());
+                //鑾峰彇鎵�鏈変复鏂欒鍒�
+                List<Dt_OutMESOrder> outMESOrders = BaseDal.QueryData();
+                Dt_MaterielInfo? ExistmaterielInfo = materielInfos.FirstOrDefault(x=>x.MaterielCode== outMESOrderDTO.MaterialCode);
+                if (ExistmaterielInfo == null)
+                {
+                    return content.Error($"鐗╂枡缂栫爜{nameof(OutMESOrderDTO.MaterialCode)}:{outMESOrderDTO.MaterialCode}淇℃伅涓嶅瓨鍦�");
+                }
+                Dt_OutMESOrder? OldoutMESOrder = outMESOrders.FirstOrDefault(x=>x.OutDetailId==outMESOrderDTO.OutDetailId);
+                if (OldoutMESOrder!=null)
+                {
+                    return content.Error($"棰嗘枡璁″垝{nameof(OutMESOrderDTO.OutDetailId)}:{outMESOrderDTO.OutDetailId}淇℃伅宸插瓨鍦�");
+                }
+                return content.Error($"棰嗘枡璁″垝{nameof(OutMESOrderDTO.ProductOrderNo)}:{outMESOrderDTO.ProductOrderNo},鐗╂枡{outMESOrderDTO.MaterialCode}鏃犲彲鍒嗛厤搴撳瓨");
+
+                Dt_OutMESOrder outMESOrder = _mapper.Map<Dt_OutMESOrder>(outMESOrderDTO);
+                BaseDal.AddData(outMESOrder);
+                return content.OK("鎺ユ敹鎴愬姛");
+            }
+            catch (Exception ex)
+            {
+                content.Error(ex.Message);
+            }
+            return content;
+        }
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_RecordService/Service/LocationStatusChangeRecordService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_RecordService/Service/LocationStatusChangeRecordService.cs"
index e55c598..3f38a6f 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_RecordService/Service/LocationStatusChangeRecordService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_RecordService/Service/LocationStatusChangeRecordService.cs"
@@ -43,7 +43,7 @@
                 throw new Exception($"{ex.Message}");
             }
         }
-
+        //璐т綅鍙樺姩璁板綍娣诲姞
         public void AddLocationStatusChangeRecord(List<Dt_LocationInfo> locationInfos, LocationStatusEnum newStatus, LocationChangeType changeType, string? orderNo = null, List<int>? taskNums = null)
         {
             try
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/ProStockViewService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/ProStockViewService.cs"
index 963efed..c10586d 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/ProStockViewService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/ProStockViewService.cs"
@@ -54,14 +54,11 @@
                         List<SearchParameters> searchParametersList = options.Wheres.DeserializeObject<List<SearchParameters>>();
                         if (searchParametersList.Count > 0)
                         {
+                            SearchParameters? searchParameters1 = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_ProStockInfoDetail.ProductCode).FirstLetterToLower());
+                            if (searchParameters1 != null)
                             {
-                                SearchParameters? searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_ProStockInfoDetail.ProductCode).FirstLetterToLower());
-                                if (searchParameters != null)
-                                {
-                                    sugarQueryable1 = sugarQueryable1.Where(x => x.proStockInfoDetails.Any(v => v.ProductCode.Contains(searchParameters.Value)));
-                                }
+                                sugarQueryable1 = sugarQueryable1.Where(x => x.proStockInfoDetails.Any(v => v.ProductCode.Contains(searchParameters1.Value)));
                             }
-
                         }
 
                     }
@@ -81,7 +78,7 @@
                     {
                         ProStockAttribute=b.ProStockAttribute,
                         LocationCode = b.LocationCode,
-                        Column = a.Column,
+                        Column = a.Columns,
                         WarehouseId = b.WarehouseId,
                         CreateDate = b.CreateDate,
                         Creater = b.Creater,
@@ -100,29 +97,10 @@
                         SumStocks=b.proStockInfoDetails.Sum(x=>x.StockQty)
                     });
 
-                var pklist = sugarQueryable1.Where(b => b.LocationCode == "鎴愬搧寰呭彂璐у尯" || b.LocationCode == "鎴愬搧鍖呰鎷h揣鍖�").Select(b => new ProStockViewDTO
-                {
-                    ProStockAttribute = b.ProStockAttribute,
-                    LocationCode = b.LocationCode,
-                    WarehouseId = b.WarehouseId,
-                    CreateDate = b.CreateDate,
-                    Creater = b.Creater,
-                    LocationName = b.LocationCode,
-                    Modifier = b.Modifier,
-                    ModifyDate = b.ModifyDate,
-                    PalletCode = b.PalletCode,
-                    StockRemark = b.Remark,
-                    ProStockId = b.Id,
-                    StockStatus = b.StockStatus,
-                    Details = b.proStockInfoDetails,
-                    SumStocks = b.proStockInfoDetails.Sum(x => x.StockQty)
-                });
-
                 int totalCount = 0;
                 int pktotalCount = 0;
 
                 stockViewDTOs = list.ToPageList(options.Page, options.Rows, ref totalCount);
-                stockViewDTOs.AddRange(pklist.ToPageList(options.Page, options.Rows, ref pktotalCount));
 
                 stockViewDTOs.ForEach(x =>
                     {
@@ -214,7 +192,7 @@
                     {
                         ProStockAttribute = b.ProStockAttribute,
                         LocationCode = b.LocationCode,
-                        Column = a.Column,
+                        Column = a.Columns,
                         WarehouseId = b.WarehouseId,
                         CreateDate = b.CreateDate,
                         Creater = b.Creater,
@@ -294,7 +272,7 @@
                 {
                     if (userRole.WarehouseIds.Count > 0)
                     {
-                        return $"{nameof(BaseWarehouseEntity.WarehouseId)} in ({userRole.WarehouseIds.Serialize().Replace("[", "").Replace("]", "")})";
+                        return $"{nameof(BaseWarehouseEntity.WarehouseId)} in ({userRole.WarehouseIds.OrderBy(x=>x).Serialize().Replace("[", "").Replace("]", "")})";
                     }
 
                     else
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs"
index 92d5ee5..f45c567 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs"
@@ -29,11 +29,54 @@
 using WIDESEA_DTO.Stock;
 using SqlSugar;
 using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup;
+using WIDESEA_DTO.MES;
 
 namespace WIDESEA_TaskInfoService
 {
     public partial class TaskService
     {
         static object lock_out = new object();
+        /// <summary>
+        /// MES鑷姩鍙枡鎺ュ彛
+        /// </summary>
+        /// <returns></returns>
+        public WebResponseContent ReceiveAutoIssue(MESAutoIssueDTO autoIssueDTO)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                //鑾峰彇瀵瑰簲鍗曟嵁
+                Dt_OutMESOrder? outMESOrder = _outMESOrderRepository.QueryFirst(x=>x.OutDetailId==autoIssueDTO.OutDetailId);
+                if (outMESOrder==null)
+                {
+                    return content.Error($"棰嗘枡璁″垝{nameof(MESAutoIssueDTO.OutDetailId)}{autoIssueDTO.OutDetailId}涓嶅瓨鍦�");
+                }
+                //鑾峰彇鍛ㄨ浆浣嶇疆缂栧彿
+                Dt_AGVStationInfo? stationInfo = _agvStationInfoRepository.QueryFirst(x=>x.MESPointCode==autoIssueDTO.PointCode);
+                if (stationInfo == null)
+                {
+                    return content.Error($"棰嗘枡璁″垝鍛ㄨ浆浣峽nameof(MESAutoIssueDTO.PointCode)}{autoIssueDTO.PointCode}涓嶅瓨鍦�");
+                }
+                if (autoIssueDTO.IsEmptyPallet>0)
+                {
+                    return content.Error($"棰嗘枡璁″垝鍛ㄨ浆浣峽nameof(MESAutoIssueDTO.PointCode)}{autoIssueDTO.PointCode}瀛樺湪绌烘墭");
+                }
+                Dt_Task? task = BaseDal.QueryData(x => x.OrderNo == outMESOrder.OutMESOrderNo && x.TaskStatus==TaskStatusEnum.CallPending.ObjToInt()).OrderByDescending(x=>x.Grade).ThenBy(x=>x.TaskNum).FirstOrDefault();
+                //鑾峰彇浠诲姟
+                if (task==null)
+                {
+                    return content.Error($"鏈壘鍒伴鏂欒鍒掔紪鍙穥outMESOrder.ProductOrderNo}鍙厤閫佷换鍔�");
+                }
+                task.TaskStatus = TaskStatusEnum.New.ObjToInt();
+                task.TargetAddress= stationInfo.AGVStationCode;
+                PushTasksToWCS(new List<Dt_Task> { task });
+                return content.OK("鍙枡鎴愬姛");
+            }
+            catch (Exception ex)
+            {
+                content.Error(ex.Message);
+            }
+            return content;
+        }
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService.cs"
index 05becf4..835dd6a 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService.cs"
@@ -72,6 +72,8 @@
         private readonly IOutBSTOrderDetailRepository _outBSTOrderDetailRepository;
         private readonly IOutBSTOrderRepository _outBSTOrderRepository;
         private readonly IOutBSTOrderDetailService _outBSTOrderDetailService;
+        private readonly IOutMESOrderService _outMESOrderService;
+        private readonly IOutMESOrderRepository _outMESOrderRepository;
         public ITaskRepository Repository => BaseDal;
 
         private Dictionary<string, OrderByType> _taskOrderBy = new()
@@ -84,7 +86,7 @@
 
         public List<int> TaskOutboundTypes => typeof(TaskTypeEnum).GetEnumIndexList().Where(x => x >= 100 && x < 500).ToList();
 
-        public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IStockRepository stockRepository, IBasicService basicService, IRecordService recordService, IStockService stockService, IBasicRepository basicRepository, IApiInfoRepository apiInfoRepository, IInvokeERPService invokeERPService, IPalletTypeInfoRepository palletTypeInfoRepository, IAGVStationInfoRepository agvStationInfoRepository, IPurchaseBSTOrderRepository purchaseBSTOrderRepository, IPurchaseBSTOrderDetailRepository purchaseBSTOrderDetailRepository, IOutBSTOrderDetailRepository outBSTOrderDetailRepository, IOutBSTOrderRepository outBSTOrderRepository,IOutBSTOrderDetailService outBSTOrderDetailService) : base(BaseDal)
+        public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IStockRepository stockRepository, IBasicService basicService, IRecordService recordService, IStockService stockService, IBasicRepository basicRepository, IApiInfoRepository apiInfoRepository, IInvokeERPService invokeERPService, IPalletTypeInfoRepository palletTypeInfoRepository, IAGVStationInfoRepository agvStationInfoRepository, IPurchaseBSTOrderRepository purchaseBSTOrderRepository, IPurchaseBSTOrderDetailRepository purchaseBSTOrderDetailRepository, IOutBSTOrderDetailRepository outBSTOrderDetailRepository, IOutBSTOrderRepository outBSTOrderRepository,IOutBSTOrderDetailService outBSTOrderDetailService, IOutMESOrderService outMESOrderService, IOutMESOrderRepository outMESOrderRepository) : base(BaseDal)
         {
             _mapper = mapper;
             _unitOfWorkManage = unitOfWorkManage;
@@ -99,9 +101,11 @@
             _agvStationInfoRepository = agvStationInfoRepository;
             _purchaseBSTOrderRepository = purchaseBSTOrderRepository;
             _purchaseBSTOrderDetailRepository = purchaseBSTOrderDetailRepository;
-            _outBSTOrderRepository= outBSTOrderRepository;
-            _outBSTOrderDetailRepository= outBSTOrderDetailRepository;
-            _outBSTOrderDetailService= outBSTOrderDetailService;
+            _outBSTOrderRepository = outBSTOrderRepository;
+            _outBSTOrderDetailRepository = outBSTOrderDetailRepository;
+            _outBSTOrderDetailService = outBSTOrderDetailService;
+            _outMESOrderService = outMESOrderService;
+            _outMESOrderRepository = outMESOrderRepository;
         }
 
         /// <summary>
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
index 4b35f88..5490b32 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
@@ -132,10 +132,11 @@
                 {
                     return content.Error($"鏈壘鍒扮粍鐩樹俊鎭�");
                 }
-                if (stockInfo.StockStatus != StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt())
+                if (stockInfo.StockStatus != StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鑰佸巶閫�搴�.ObjToInt())
                 {
                     return content.Error($"璇ユ墭鐩樼姸鎬佷笉姝g‘,涓嶅彲鐢宠鍏ュ簱");
                 }
+                //鍒嗛厤宸烽亾
                 string rowWay = AssignYLRoadwayNo(stockInfo.PalletCode);
                 if (string.IsNullOrEmpty(rowWay))
                 {
@@ -151,13 +152,13 @@
                     Roadway = rowWay,
                     SourceAddress = stationCode,
                     TargetAddress = "",
-                    TaskType = TaskTypeEnum.Inbound.ObjToInt(),
+                    TaskType = stationCode=="307" ? TaskTypeEnum.PaperOldYLBackInbound.ObjToInt() : TaskTypeEnum.Inbound.ObjToInt(),
                     TaskStatus = TaskStatusEnum.New.ObjToInt(),
                     WarehouseId = stockInfo.WarehouseId,
                     PalletType = stockInfo.PalletType,
                     TaskLength = (int)stockInfo.MaterielWide
                 };
-
+                //鏇存柊鐘舵��
                 if (stockInfo.StockStatus == StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt())
                 {
                     stockInfo.StockStatus = StockStatusEmun.鎵嬪姩缁勭洏鍏ュ簱纭.ObjToInt();
@@ -166,6 +167,7 @@
                 {
                     stockInfo.StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt();
                 }
+                //鏁版嵁鏇存柊
                 _unitOfWorkManage.BeginTran();
                 int taskId = BaseDal.AddData(newTask);
                 newTask.TaskId = taskId;
@@ -196,10 +198,15 @@
                 {
                     return content.OK($"鏂板巶涓存椂鍏ュ簱{stockInfoOld.PalletCode}");
                 }
+                else if (stockInfoOld != null && stockInfoOld.MaterielInvOrgId==MaterielInvOrgEnum.鑰佸巶.ObjToInt() && stockInfoOld.StockStatus == StockStatusEmun.鑰佸巶閫�搴�.ObjToInt())
+                {
+                    return content.OK($"鑰佸巶涓存椂閫�搴搟stockInfoOld.PalletCode}");
+                }
                 else if (stockInfoOld != null)
                 {
                     return content.Error($"鏉$爜{stockInfoOld.PalletCode}淇℃伅宸插瓨鍦�");
                 }
+                
                 //鑾峰彇閲囪喘淇℃伅
                 Dt_PurchaseBSTOrderDetail purchaseBSTOrderDetail = _purchaseBSTOrderDetailRepository.QueryFirst(x=>x.Barcode== palletCode);
                 if (purchaseBSTOrderDetail == null)
@@ -283,8 +290,13 @@
                 if (stockInfo.MaterielInvOrgId==MaterielInvOrgEnum.鏂板巶.ObjToInt())
                 {
                     //闄愬埗鐩村緞
-                    if (stockInfo.MaterielThickness <= 1250)
+                    if (stockInfo.MaterielThickness >= 300 && stockInfo.MaterielThickness <= 1300 && stockInfo.MaterielWide >= 700 && stockInfo.MaterielWide <= 2700)
                     {
+                        bool LayerLimit = false;
+                        if (stockInfo.MaterielThickness >= 800)
+                        {
+                            LayerLimit = true;
+                        }
                         //鑾峰彇鍒嗛厤
                         List<LocationCount> locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => x.WarehouseId == warehouse.WarehouseId && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && x.RoadwayNo.Contains("YLDual")).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).ToList();
 
@@ -293,14 +305,19 @@
                 }
                 else
                 {
-                    //闄愬埗鐩村緞
-                    if (stockInfo.MaterielThickness >= 800 && stockInfo.MaterielThickness <= 1450)
+                    //闄愬埗
+                    if (stockInfo.MaterielThickness >= 800 && stockInfo.MaterielThickness <= 1500 && stockInfo.MaterielWide >= 700 && stockInfo.MaterielWide <= 2500)
                     {
+                        bool LayerLimit = false;
+                        if (stockInfo.MaterielThickness>1300)
+                        {
+                            LayerLimit = true;
+                        }
                         //鑾峰彇鍒嗛厤
-                        List<LocationCount> locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => x.WarehouseId == warehouse.WarehouseId && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && x.RoadwayNo.Contains("YL") && !x.RoadwayNo.Contains("YLDual")).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).ToList();
+                        List<LocationCount> locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => x.WarehouseId == warehouse.WarehouseId && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && x.RoadwayNo.Contains("YL") && !x.RoadwayNo.Contains("YLDual") && (LayerLimit ? x.Columns>=56 : x.Columns<=55)).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).ToList();
                         if (stockInfo.MaterielWide > 2200)
                         {
-                            locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => x.WarehouseId == warehouse.WarehouseId && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && x.RoadwayNo == "SC02_YL").GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).ToList();
+                            locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => x.WarehouseId == warehouse.WarehouseId && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && x.RoadwayNo == "SC02_YL" && (LayerLimit ? x.Columns >= 56 : x.Columns <= 55)).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).ToList();
                         }
 
                         roadwayNo = HandleRoadway(locationCounts, warehouse);
@@ -330,7 +347,7 @@
                     item.Count -= count.Count;
                 }
             }
-            return locationCounts.OrderByDescending(x => x.Count).FirstOrDefault()?.RoadwayNo ?? "";
+            return locationCounts.Where(x => x.Count > 0).OrderByDescending(x => x.Count).FirstOrDefault()?.RoadwayNo ?? "";
         }
         /// <summary>
         /// 鍏ュ簱瀹屾垚
@@ -462,7 +479,7 @@
                 List<LocationCount> locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => x.WarehouseId == WarehouseEnum.LLDCP.ObjToInt() && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && x.RoadwayNo.Contains("CP")).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).ToList();
                 //绛涢�夊綋鍓嶅叆搴撲换鍔′腑宸插垎閰嶅贩閬撲换鍔℃暟閲�
                 List<LocationCount> useLocationCounts = Db.Queryable<Dt_Task>().Where(x => (x.WarehouseId == WarehouseEnum.LLDCP.ObjToInt()|| x.WarehouseId == WarehouseEnum.LLDFL.ObjToInt())
-                && locationCounts.Select(j=>j.RoadwayNo).Contains(x.Roadway)
+                && locationCounts.Select(j=>j.RoadwayNo).Distinct().Contains(x.Roadway)
                 && TaskInboundTypes.Contains(x.TaskType)).GroupBy(x => x.Roadway).Select(x => new LocationCount { RoadwayNo = x.Roadway, Count = SqlFunc.AggregateCount(x) }).ToList();
                 foreach (var item in locationCounts)
                 {
@@ -473,7 +490,7 @@
                     }
                 }
                 //閫氳繃鍙敤璐т綅鏁伴噺鎺掑簭锛屾渶澶氱殑浼樺厛鍒嗛厤
-                roadwayNo = locationCounts.OrderByDescending(x => x.Count).FirstOrDefault()?.RoadwayNo ?? "";
+                roadwayNo = locationCounts.Where(x=>x.Count>0).OrderByDescending(x => x.Count).FirstOrDefault()?.RoadwayNo ?? "";
                 return !string.IsNullOrEmpty(roadwayNo) ? (roadwayNo) : throw new Exception("鏈壘鍒板彲鍒嗛厤宸烽亾");
             }
             catch (Exception ex)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
index 23241b2..cc38fa8 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
@@ -32,46 +32,45 @@
         /// </summary>
         /// <param name="id"></param>
         /// <returns></returns>
-        public WebResponseContent Outbound(int id)
+        public WebResponseContent Outbound(List<int> ids)
         {
             WebResponseContent content = new WebResponseContent();
             try
             {
-                Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.Id == id).First();
-                if (stockInfo == null)
+                //鑾峰彇閫夊畾搴撳瓨
+                List<Dt_StockInfo> stockInfos = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => ids.Contains(x.Id) && x.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt() && x.MaterielInvOrgId == MaterielInvOrgEnum.鑰佸巶.ObjToInt()).ToList();
+                if (stockInfos == null || stockInfos.Count != ids.Count)
                 {
                     return content.Error($"鏈壘鍒板簱瀛�");
                 }
-                Dt_LocationInfo locationInfo = _basicRepository.LocationInfoRepository.QueryFirst(x => x.LocationCode == stockInfo.LocationCode);
-                if (locationInfo != null && (locationInfo.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || locationInfo.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && locationInfo.LocationStatus == LocationStatusEnum.InStock.ObjToInt() && stockInfo.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt())
+                //鑾峰彇搴撳瓨璐т綅
+                List<Dt_LocationInfo> locationInfos = _basicRepository.LocationInfoRepository.QueryData(x =>x.WarehouseId == WarehouseEnum.LLDYL.ObjToInt() && stockInfos.Select(x=>x.LocationCode).Contains(x.LocationCode) && x.LocationStatus == LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()));
+                if (locationInfos == null || locationInfos.Count != stockInfos.Count)
                 {
-                    List<Dt_Task> tasks = GetTasks(new List<Dt_StockInfo>() { stockInfo }, TaskTypeEnum.Outbound);
-                    if (tasks == null || tasks.Count <= 0)
-                    {
-                        return content.Error($"鐢熸垚浠诲姟澶辫触");
-                    }
-                    //澶勭悊搴撳瓨鏁版嵁
-                    stockInfo.StockStatus = (int)StockStatusEmun.鍑哄簱閿佸畾;
-                    LocationStatusEnum locationStatus = (LocationStatusEnum)locationInfo.LocationStatus;
-                    locationInfo.LocationStatus = (int)LocationStatusEnum.Lock;
-                    //鍒ゆ柇鏄惁鏈夊嚭搴撳崟淇℃伅
-                    _unitOfWorkManage.BeginTran();
-                    //鏇存柊搴撳瓨鐘舵��
-                    _stockRepository.StockInfoRepository.UpdateData(stockInfo);
-                    //鏇存柊璐т綅鐘舵��
-                    _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, stockInfo.PalletType, LocationStatusEnum.Lock, stockInfo.WarehouseId);
-                    //鏂板缓浠诲姟
-                    BaseDal.AddData(tasks);
-                    //鍔犲叆璐т綅鍙樺姩璁板綍
-                    _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, locationStatus, LocationStatusEnum.Lock, LocationChangeType.OutboundAssignLocation, stockInfo.OrderNo ?? "", tasks[0].TaskNum);
-                    _unitOfWorkManage.CommitTran();
-                    PushTasksToWCS(tasks);
-                    content.OK();
+                    return content.Error($"璐т綅鍑哄簱鏉′欢涓嶆弧瓒�");
                 }
-                else
+                //浠诲姟鐢熸垚
+                List<Dt_Task> tasks = GetTasks(stockInfos, TaskTypeEnum.OldYLOutbound);
+                if (tasks == null || tasks.Count <= 0)
                 {
-                    content.Error($"璐т綅鍑哄簱鏉′欢涓嶆弧瓒�");
+                    return content.Error($"鐢熸垚浠诲姟澶辫触");
                 }
+                stockInfos.ForEach(x =>
+                {
+                    x.StockStatus = StockStatusEmun.鍑哄簱閿佸畾.ObjToInt();
+                });
+                _unitOfWorkManage.BeginTran();
+                //鏇存柊搴撳瓨鐘舵��
+                _stockRepository.StockInfoRepository.UpdateData(stockInfos);
+                //鏇存柊璐т綅鐘舵��
+                _basicRepository.LocationInfoRepository.UpdateLocationStatus(locationInfos, LocationStatusEnum.Lock);
+                //鍔犲叆璐т綅鍙樺姩璁板綍
+                _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfos, LocationStatusEnum.Lock, LocationChangeType.OutboundAssignLocation, taskNums: tasks.Select(x => x.TaskNum).ToList());
+                //鏂板缓浠诲姟
+                BaseDal.AddData(tasks);
+                _unitOfWorkManage.CommitTran();
+                PushTasksToWCS(tasks);
+                content.OK();
             }
             catch (Exception ex)
             {
@@ -146,7 +145,7 @@
             }
         }
         /// <summary>
-        /// 搴撳瓨鏁版嵁杞嚭搴撲换鍔�
+        /// 搴撳瓨鏁版嵁杞嚭搴撲换鍔�(鍘熸枡/鍗婃垚鍝�)
         /// </summary>
         /// <param name="stockInfos"></param>
         /// <returns></returns>
@@ -189,6 +188,9 @@
             }
             return tasks;
         }
+        /// <summary>
+        /// 搴撳瓨鏁版嵁杞嚭搴撲换鍔�(杈呮枡/鎴愬搧)
+        /// </summary>
         public List<Dt_Task> GetTasks(List<Dt_ProStockInfo> stockInfos, TaskTypeEnum taskType,List<Dt_LocationInfo> locationInfos)
         {
             List<Dt_Task> tasks = new List<Dt_Task>();
@@ -245,7 +247,7 @@
                 .Where(x => x.proStockInfoDetails
                 .Any(v =>
                     v.ProductCode == materialCode)
-                ).ToList();
+                ).Take(Count).ToList();
 
                 if (stockInfos.Count!=Count)
                 {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Reloaction.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Reloaction.cs"
index 7968781..ac1e206 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Reloaction.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Reloaction.cs"
@@ -45,7 +45,7 @@
 
                 List<Dt_LocationInfo> littleDepthLocations = _basicService.LocationInfoService.GetGroupLocations(locationInfo);
 
-                Dt_LocationInfo? needRelocationItem = littleDepthLocations.Where(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && x.LocationStatus != LocationStatusEnum.PalletLock.ObjToInt() && x.LocationStatus != LocationStatusEnum.FreeLock.ObjToInt() && x.Depth < locationInfo.Depth).OrderBy(x => x.Depth).FirstOrDefault();
+                Dt_LocationInfo? needRelocationItem = littleDepthLocations.Where(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && x.LocationStatus != LocationStatusEnum.FreeLock.ObjToInt() && x.Depth < locationInfo.Depth).OrderBy(x => x.Depth).FirstOrDefault();
 
                 if (needRelocationItem == null)
                 {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Basic/LocationInfoRowController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Basic/LocationInfoRowController.cs"
index 6e016f9..25949c9 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Basic/LocationInfoRowController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Basic/LocationInfoRowController.cs"
@@ -81,7 +81,7 @@
                             //鍒�
                             row = data_col.Row,
                             layer = data_col.Layer,
-                            index = data_col.Column,
+                            index = data_col.Columns,
                             locationCode = data_col.LocationCode,
                             location_state = data_col.LocationStatus,
                             location_lock = data_col.EnableStatus,
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/MES/MesController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/MES/MesController.cs"
index 5686b22..9f70627 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/MES/MesController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/MES/MesController.cs"
@@ -10,6 +10,10 @@
 using WIDESEA_Core.Helper;
 using Autofac.Core;
 using WIDESEA_DTO.Stock;
+using WIDESEA_BasicService;
+using WIDESEA_DTO.Basic;
+using WIDESEA_DTO.MES;
+using WIDESEA_IOutboundService;
 
 namespace WIDESEA_WMSServer.Controllers.MES
 {
@@ -21,11 +25,76 @@
     public class MesController : ControllerBase
     {
         private readonly ITaskService _taskService;
+        private readonly IOutMESOrderService _outMESOrderService;
 
-        public MesController(ITaskService taskService)
+        public MesController(ITaskService taskService,IOutMESOrderService outMESOrderService)
         {
             _taskService = taskService;
+            _outMESOrderService = outMESOrderService;
+        }
+        /// <summary>
+        /// 鎺ユ敹MES棰嗘枡璁″垝
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost, HttpGet, Route("ReceiveOutBound"), AllowAnonymous]
+
+        public WebResponseContent ReceiveOutBound([FromBody] OutMESOrderDTO outMESOrderDTO)
+        {
+            return _outMESOrderService.ReceiveOutBound(outMESOrderDTO);
+        }
+        /// <summary>
+        /// MES鑷姩鍙枡鎺ュ彛
+        /// </summary>
+        /// <returns></returns>
+        /// <summary>
+        [HttpPost, HttpGet, Route("ReceiveAutoIssue"), AllowAnonymous]
+        public WebResponseContent ReceiveAutoIssue([FromBody] MESAutoIssueDTO autoIssueDTO)
+        {
+            return _taskService.ReceiveAutoIssue(autoIssueDTO);
         }
 
+        /// <summary>
+        /// MES鎵嬪姩鍙枡鎺ュ彛
+        /// </summary>
+        /// <returns></returns>
+        /// <summary>
+        [HttpPost, HttpGet, Route("ReceiveManualIssue"), AllowAnonymous]
+        public WebResponseContent ReceiveManualIssue([FromBody] MESAutoIssueDTO autoIssueDTO)
+        {
+            return _taskService.ReceiveAutoIssue(autoIssueDTO);
+        }
+
+        /// <summary>
+        /// MES绌烘墭/浣欐枡鍛煎彨鎺ュ彛
+        /// </summary>
+        /// <returns></returns>
+        /// <summary>
+        [HttpPost, HttpGet, Route("ReceiveReturnIssue"), AllowAnonymous]
+        public WebResponseContent ReceiveReturnIssue([FromBody] MESAutoIssueDTO autoIssueDTO)
+        {
+            return _taskService.ReceiveAutoIssue(autoIssueDTO);
+        }
+
+        /// <summary>
+        /// 鎴愬搧/鍗婃垚鍝佷俊鎭悓姝ユ帴鍙�
+        /// </summary>
+        /// <returns></returns>
+        /// <summary>
+        [HttpPost, HttpGet, Route("ReceiveProCodeInfo"), AllowAnonymous]
+        public WebResponseContent ReceiveProCodeInfo([FromBody] MESAutoIssueDTO autoIssueDTO)
+        {
+            return _taskService.ReceiveAutoIssue(autoIssueDTO);
+        }
+
+        /// <summary>
+        /// MES宸ュ崟鍋滄鎺ュ彛
+        /// </summary>
+        /// <returns></returns>
+        /// <summary>
+        [HttpPost, HttpGet, Route("ReceiveProOrderStop"), AllowAnonymous]
+        public WebResponseContent ReceiveProOrderStop([FromBody] MESAutoIssueDTO autoIssueDTO)
+        {
+            return _taskService.ReceiveAutoIssue(autoIssueDTO);
+        }
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Outbound/OutMESOrderController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Outbound/OutMESOrderController.cs"
new file mode 100644
index 0000000..c48a510
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Outbound/OutMESOrderController.cs"
@@ -0,0 +1,19 @@
+锘縰sing Microsoft.AspNetCore.Mvc;
+using WIDESEA_Core.BaseController;
+using WIDESEA_IOutboundService;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_WMSServer.Controllers.Outbound
+{
+    /// <summary>
+    /// MES棰嗘枡璁″垝鍗�
+    /// </summary>
+    [Route("api/OutMESOrder")]
+    [ApiController]
+    public class OutMESOrderController : ApiBaseController<IOutMESOrderService, Dt_OutMESOrder>
+    {
+        public OutMESOrderController(IOutMESOrderService service) : base(service)
+        {
+        }
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
index fa01688..10b936b 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
@@ -45,7 +45,7 @@
         {
             return Service.AssignInboundTaskLocation(taskNum, roadwayNo);
         }
-        
+
         /// <summary>
         /// 鎴愬搧绌烘鍥炲簱
         /// </summary>
@@ -104,14 +104,13 @@
         }
 
         /// <summary>
-        /// 閫夋嫨搴撳瓨鐢熸垚鍑哄簱浠诲姟
+        /// 閫夋嫨搴撳瓨鐢熸垚鑰佸巶鍑哄簱浠诲姟
         /// </summary>
-        /// <param name="id"></param>
         /// <returns></returns>
-        [HttpPost, Route("Outbound"), AllowAnonymous]
-        public WebResponseContent Outbound(int id)
+        [HttpPost, Route("OldYLOutbound"), AllowAnonymous]
+        public WebResponseContent Outbound([FromBody] List<int> ids)
         {
-            return Service.Outbound(id);
+            return Service.Outbound(ids);
         }
 
         /// <summary>
@@ -203,9 +202,6 @@
         /// <summary>
         /// 鍘熸枡绉诲簱浠诲姟
         /// </summary>
-        /// <param name="startAddress"></param>
-        /// <param name="endAddress"></param>
-        /// <param name="roadWay"></param>
         /// <returns></returns>
         [HttpPost, HttpGet, Route("Relocation"), AllowAnonymous]
         public WebResponseContent IsRelocation(string startAddress, string endAddress, string roadWay)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs"
index 1d34367..a6ce9d9 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs"
@@ -15,6 +15,7 @@
 using WIDESEA_DTO.Basic;
 using WIDESEA_DTO.ERP;
 using WIDESEA_DTO.Inbound;
+using WIDESEA_DTO.MES;
 using WIDESEA_DTO.System;
 using WIDESEA_DTO.Task;
 using WIDESEA_Model.Models;
@@ -43,6 +44,8 @@
             //BST閫�鏂欏崟瀹炰綋杞崲
             CreateMap<BSTReturnOrderDTO, Dt_ReturnBSTOrder>().ForMember(x => x.ReturnOrderStatus, b => b.MapFrom(b => InOrderStatusEnum.鏈紑濮�.ObjToInt())).ForMember(x => x.WreturnDate, b => b.MapFrom(b => DateTimeOffset.FromUnixTimeMilliseconds(b.WreturnDate).DateTime)).ForMember(x => x.WarehouseId, b => b.MapFrom(b => WarehouseEnum.LLDYL.ObjToInt()));
             CreateMap<BSTReturnOrderDTOItem, Dt_ReturnBSTOrderDetail>().ForMember(x => x.ReturnBSTOrderDetailStatus, b => b.MapFrom(b => OutOrderStatusEnum.鏈紑濮�.ObjToInt())).ForMember(x => x.MaterialWide, b => b.MapFrom(b => b.W)).ForMember(x => x.MaterialThick, b => b.MapFrom(b => b.Thick));
+            //MES棰嗘枡璁″垝瀹炰綋杞崲
+            CreateMap<OutMESOrderDTO, Dt_OutMESOrder>().ForMember(x => x.OutMESOrderStatus, b => b.MapFrom(b => OutOrderStatusEnum.鏈紑濮�.ObjToInt()));
         }
     }
 }
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\212\200\346\234\257\345\215\217\350\256\256/AGV\344\275\234\344\270\232\346\265\201\347\250\2130911.xlsx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\212\200\346\234\257\345\215\217\350\256\256/AGV\344\275\234\344\270\232\346\265\201\347\250\2130911.xlsx"
new file mode 100644
index 0000000..972eeae
--- /dev/null
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\212\200\346\234\257\345\215\217\350\256\256/AGV\344\275\234\344\270\232\346\265\201\347\250\2130911.xlsx"
Binary files differ
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\345\215\232\346\200\235\351\200\232\345\210\251\346\213\223\346\216\245\345\217\243.xlsx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\345\215\232\346\200\235\351\200\232\345\210\251\346\213\223\346\216\245\345\217\243.xlsx"
index 24d8651..9eb088d 100644
--- "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\345\215\232\346\200\235\351\200\232\345\210\251\346\213\223\346\216\245\345\217\243.xlsx"
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\345\215\232\346\200\235\351\200\232\345\210\251\346\213\223\346\216\245\345\217\243.xlsx"
Binary files differ
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\351\276\231\345\210\251\345\276\227MES\346\216\245\345\217\243.xlsx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\351\276\231\345\210\251\345\276\227MES\346\216\245\345\217\243.xlsx"
index e2cb09c..c47d8a2 100644
--- "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\351\276\231\345\210\251\345\276\227MES\346\216\245\345\217\243.xlsx"
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\351\276\231\345\210\251\345\276\227MES\346\216\245\345\217\243.xlsx"
Binary files differ
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\345\216\237\346\226\231\345\272\223\350\276\223\351\200\201\347\272\277\351\200\232\350\256\257\345\215\217\350\256\256.xlsx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\345\216\237\346\226\231\345\272\223\350\276\223\351\200\201\347\272\277\351\200\232\350\256\257\345\215\217\350\256\256.xlsx"
index c33b99a..aec002a 100644
--- "a/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\345\216\237\346\226\231\345\272\223\350\276\223\351\200\201\347\272\277\351\200\232\350\256\257\345\215\217\350\256\256.xlsx"
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\345\216\237\346\226\231\345\272\223\350\276\223\351\200\201\347\272\277\351\200\232\350\256\257\345\215\217\350\256\256.xlsx"
Binary files differ
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\351\241\271\347\233\256\345\233\276\347\272\270/\351\276\231\345\210\251\345\276\227\347\272\270\345\215\267\345\272\223\342\200\224\342\200\224\347\272\270\345\215\267\345\272\223\350\264\247\346\236\266\342\200\224\342\200\224\346\200\273\345\233\276\342\200\224\342\200\2242025-05-20\347\216\260\345\234\272\346\233\264\346\224\271\347\253\257\351\203\250\347\275\221\346\236\266\345\207\272\345\233\276.dwg" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\241\271\347\233\256\345\233\276\347\272\270/\351\276\231\345\210\251\345\276\227\347\272\270\345\215\267\345\272\223\342\200\224\342\200\224\347\272\270\345\215\267\345\272\223\350\264\247\346\236\266\342\200\224\342\200\224\346\200\273\345\233\276\342\200\224\342\200\2242025-05-20\347\216\260\345\234\272\346\233\264\346\224\271\347\253\257\351\203\250\347\275\221\346\236\266\345\207\272\345\233\276.dwg"
new file mode 100644
index 0000000..02b9801
--- /dev/null
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\241\271\347\233\256\345\233\276\347\272\270/\351\276\231\345\210\251\345\276\227\347\272\270\345\215\267\345\272\223\342\200\224\342\200\224\347\272\270\345\215\267\345\272\223\350\264\247\346\236\266\342\200\224\342\200\224\346\200\273\345\233\276\342\200\224\342\200\2242025-05-20\347\216\260\345\234\272\346\233\264\346\224\271\347\253\257\351\203\250\347\275\221\346\236\266\345\207\272\345\233\276.dwg"
Binary files differ

--
Gitblit v1.9.3