From efaf0b8aeb26aca6536a4b384c912cc3cac4d070 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期六, 15 三月 2025 16:07:45 +0800
Subject: [PATCH] 成品代码,其他仓优化,前端优化界面增加

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs                           |   31 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Config/Dt_CodeRuleConfig.cs                                  |    2 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/OutProStockInfoRepository.cs                           |   18 
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs                                       |    4 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutProStockInfo.cs                               |    5 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs                                   |    4 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs                                         |    4 
 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/c0c07971-a8e8-48ed-85a6-a9d507a9fa79.vsidx |    0 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs                                    |    6 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutStockLockInfoController.cs              |   12 
 代码管理/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue                                                       |    7 
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/InvokeAGVService.cs                                    |   28 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_ReceiveOrder.cs                                   |    6 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/ErpRequestContent.cs                                              |   12 
 代码管理/WMS/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue                                              |    1 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IProStockInfoRepository.cs                               |    4 
 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/698304e2-84c8-4568-8d00-fafc24f90fa6.vsidx |    0 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs                                          |    8 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs                              |    6 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IProOutOrderDetailService.cs                             |   10 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockService.cs                                            |    4 
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/成品仓/AGV_CPJob.cs                                                 |    3 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Filter/CustomProfile.cs                                         |    2 
 代码管理/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue                                                   |    7 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs                                     |   67 ++
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs                                |    4 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Common/OrderEnum/ReceiveOrderEnum.cs                                      |   13 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Common/OrderEnum/OutProTypeEnum.cs                                        |   23 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs                                   |    8 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs                          |   11 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IOutProStockInfoRepository.cs                         |   14 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_ProOutOrderDetail.cs                             |   10 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/HttpMesHelper.cs                                              |   14 
 代码管理/WMS/WIDESEA_WMSClient/src/extension/outbound/mesOutboundOrder.js                                        |    7 
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/干膜仓/StackerCraneJob_GM.cs                                        |    3 
 代码管理/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/SelectedStock.vue                                   |    6 
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/StackerCraneJob_BC.cs                                        |    2 
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/阻焊仓/StackerCraneJob_ZH.cs                                        |    2 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockInfoService.cs                                       |   99 +++
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/成品仓/AGV_CPExtend.cs                                              |  113 +++
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json                                                |    2 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/PurchaseOrderService.cs                                    |    9 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReturnOrderService.cs                                      |   10 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_ProStockInfoDetail.cs                               |    4 
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/油墨仓/StackerCraneJob_YM.cs                                        |    2 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutProStockInfoService.cs                                 |   53 +
 代码管理/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue                                                     |    7 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_External/ERPService/InvokeERPService.cs                                   |    2 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs                                   |  160 +++++
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs                   |   11 
 代码管理/WMS/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue                                                |    1 
 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/4097eb55-e5cd-477d-a304-2ebfbecb7877.vsidx |    0 
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/油墨仓/CommonHoisterJob.cs                                          |   15 
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs                                         |   10 
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP仓/StackerCraneJob_PP.cs                                        |    3 
 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d47d14a8-1bd7-49ce-b62d-ff8267c57e45.vsidx |    0 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderService.cs                                     |  124 ++-
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/干膜仓/ConveyorLineJob_GM.cs                                        |   31 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ProOutOrderDetailService.cs                               |  151 +++++
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json                                                |    1 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs                                           |    6 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs                                            |   79 ++
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Common/OrderEnum/PurchaseOrderEnum.cs                                     |   14 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderDetailService.cs                               |   85 ++
 代码管理/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/MesOutOrderDetail.vue                               |  247 ++++++++
 /dev/null                                                                                                    |    0 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockSerivce.cs                                              |   10 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutProStockInfoService.cs                               |   17 
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/ConveyorLineJob_BC.cs                                        |    9 
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/APIEnum/APIEnum.cs                                              |    7 
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs                                        |    5 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IProStockInfoService.cs                                     |    8 
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/Agv/AGVBoxApplyPassDTO.cs                                          |   40 +
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/测试架仓/StackerCraneJob_CSJ.cs                                      |    2 
 代码管理/WMS/WIDESEA_WMSClient/src/views/inbound/receiveOrder.vue                                                |    3 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_CheckService/CheckOrderService.cs                                         |    2 
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/ProStockInfoRepository.cs                                 |   23 
 77 files changed, 1,586 insertions(+), 147 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/APIEnum/APIEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/APIEnum/APIEnum.cs"
index 2c5696f..219d1da 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/APIEnum/APIEnum.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/APIEnum/APIEnum.cs"
@@ -65,6 +65,11 @@
         /// AGV鍌ㄤ綅缁戝畾鏌ヨ
         /// </summary>
         [Description("AGV鍌ㄤ綅缁戝畾鏌ヨ")]
-        Agv_CSJPodBerthAndMat
+        Agv_CSJPodBerthAndMat,
+        /// <summary>
+        /// 鎴愬搧鏂欑鍙栨斁璐ч�氱煡鍥炶皟
+        /// </summary>
+        [Description("鎴愬搧鏂欑鍙栨斁璐ч�氱煡鍥炶皟")]
+        AGV_CPBoxApplyPass
     }
 }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs"
index 9f175d4..091a4cb 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs"
@@ -62,6 +62,11 @@
         [Description("鎴愬搧鍑哄簱")]
         OutProduct = 230,
         /// <summary>
+        /// 鎴愬搧瀵勫敭杞粨
+        /// </summary>
+        [Description("鎴愬搧瀵勫敭杞粨")]
+        OutSendProduct = 240,
+        /// <summary>
         /// 閲囪喘鍏ュ簱
         /// </summary>
         [Description("閲囪喘鍏ュ簱")]
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/Agv/AGVBoxApplyPassDTO.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/Agv/AGVBoxApplyPassDTO.cs"
new file mode 100644
index 0000000..bd3f08d
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/Agv/AGVBoxApplyPassDTO.cs"
@@ -0,0 +1,40 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEAWCS_DTO.Agv
+{
+    /// <summary>
+    /// 鏂欑鍥炶皟
+    /// </summary>
+    public class AGVBoxApplyPassDTO
+    {
+        /// <summary>
+        /// 璇锋眰缂栧彿
+        /// </summary>
+        public string ReqCode { get; set; }
+        /// <summary>
+        /// 璇锋眰鏃堕棿
+        /// </summary>
+        public string ReqTime { get; set; }
+        /// <summary>
+        /// 
+        /// </summary>
+        public string? ClientCode { get; set; }
+        /// <summary>
+        /// 浠ょ墝鍙�
+        /// </summary>
+        public string? TokenCode { get; set; }
+        /// <summary>
+        /// 浠诲姟鍗曞彿
+        /// </summary>
+        public string TaskCode { get; set; }
+        /// <summary>
+        ///  1.鍙栫敵璇烽�氳繃<br/>
+        ///  2.鏀剧敵璇烽�氳繃<br/>
+        /// </summary>
+        public string Type { get; set; }
+    }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
index cb4391f..0387b4f 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
@@ -264,5 +264,9 @@
         /// //鍒ゆ柇绉诲簱璐т綅浠诲姟鏄惁宸插瓨鍦紝濡傚瓨鍦ㄥ厛鎵ц
         /// </summary>
         Dt_Task QueryStackerExistTask(string PalletCode,string locationCode);
+        /// <summary>
+        /// AGV鎴愬搧鍙栨斁璐ч�氱煡
+        /// </summary>
+        WebResponseContent AgvBoxApplyPass(AGVBoxApplyPassDTO applyPassDTO, APIEnum SecureReply = APIEnum.AGV_CPBoxApplyPass);
     }
 }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs"
index 8b17b85..0a5c229 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs"
@@ -107,10 +107,35 @@
                 var task = _taskRepository.QueryFirst(x => agvUpdateModel.TaskCode == x.AgvTaskNum);
                 if (task == null) throw new Exception($"鏈壘鍒颁换鍔�,浠诲姟鍙枫�恵agvUpdateModel.TaskCode}銆�");
 
-                if (agvUpdateModel.Method == "end")
+                switch (agvUpdateModel.Method)
                 {
-                    if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt() || task.TaskType == TaskTypeEnum.OutEmpty.ObjToInt() || task.TaskType == TaskTypeEnum.OutAllocate.ObjToInt()) PutFinish(task.NextAddress);
-                    _taskService.TaskCompleted(task.TaskNum);
+                    case "end":
+                        if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt() || task.TaskType == TaskTypeEnum.OutEmpty.ObjToInt() || task.TaskType == TaskTypeEnum.OutAllocate.ObjToInt() || task.TaskType == TaskTypeEnum.OutProduct.ObjToInt())
+                            PutFinish(task.NextAddress);
+                        _taskService.TaskCompleted(task.TaskNum);
+                        break;
+                    case "applyToAgv":
+                        //鏇存敼鎴愬搧鍏ュ簱AGV鍙栬揣浠诲姟鐘舵��
+                        if (task.TaskType == TaskTypeEnum.InProduct.ObjToInt())
+                        {
+                            _taskService.UpdateTask(task,TaskStatusEnum.AGV_WaitToExecute);
+                        }
+                        break;
+                    case "applyFromAgv":
+                        //鏇存敼鎴愬搧鍑篈GV鏀捐揣浠诲姟鐘舵��
+                        if (task.TaskType == TaskTypeEnum.OutProduct.ObjToInt())
+                        {
+                            _taskService.UpdateTask(task, TaskStatusEnum.AGV_WaitToExecute);
+                        }
+                        break;
+                    case "outbin":
+                        if (task.TaskType == TaskTypeEnum.OutProduct.ObjToInt())
+                        {
+                            TakeFinish(task.CurrentAddress);
+                        }
+                        break;
+                    default:
+                        break;
                 }
                 agvResponseContent.Code = "0";
                 agvResponseContent.Message = "鎴愬姛";
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json"
index 406edb3..862fba7 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json"
@@ -14,7 +14,9 @@
   //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=",
   "ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWCS_HUAIAN;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
   //"ConnectionString": "Data Source=10.30.4.92;Initial Catalog=TestWCS_TC;User ID=sa;Password=duo123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+  //"ConnectionString": "Data Source=10.30.4.92;Initial Catalog=TESTWCSCP_WCS;User ID=sa;Password=duo123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
   "WMSConnectionStrings": "Data Source=.;Initial Catalog=WIDESEAWMS_HUAIAN;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+  //"WMSConnectionStrings": "Data Source=10.30.4.92;Initial Catalog=TESTWMSCP_WMS;User ID=sa;Password=duo123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
   //璺ㄥ煙
   "Cors": {
     "PolicyName": "CorsIpAccess", //绛栫暐鍚嶇О
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/InvokeAGVService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/InvokeAGVService.cs"
index feaaf20..5990c06 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/InvokeAGVService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/InvokeAGVService.cs"
@@ -83,6 +83,34 @@
             return content;
         }
         /// <summary>
+        /// AGV鎴愬搧鍙栨斁璐ч�氱煡
+        /// </summary>
+        public WebResponseContent AgvBoxApplyPass(AGVBoxApplyPassDTO applyPassDTO, APIEnum SecureReply = APIEnum.AGV_CPBoxApplyPass)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                string? apiAddress = apiInfos.FirstOrDefault(x => x.ApiCode == SecureReply.ToString())?.ApiAddress;
+                if (string.IsNullOrEmpty(apiAddress))
+                    return WebResponseContent.Instance.Error($"鏈壘鍒板彂閫丄GV浠诲姟鎺ュ彛,璇锋鏌ユ帴鍙i厤缃�");
+                string response = HttpHelper.Post(apiAddress, applyPassDTO.Serialize());
+                AgvResponseContent agvContent = response.DeserializeObject<AgvResponseContent>();
+                if (agvContent.Code == "0")
+                {
+                    content.OK(agvContent.Message);
+                }
+                else
+                {
+                    content.Error(agvContent.Message);
+                }
+            }
+            catch (Exception ex)
+            {
+                content.Error(ex.Message);
+            }
+            return content;
+        }
+        /// <summary>
         /// AGV浠诲姟鐘舵�佸埛鏂�/AGV浠诲姟瀹屾垚
         /// </summary>
         /// <param name="agvUpdateModel"></param>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
index 5be0087..c5ab563 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -182,7 +182,7 @@
                         }
                         else
                         {
-                            stationManger = _stationMangerRepository.QueryFirst(x => x.StackerCraneCode == item.RoadWay);
+                            stationManger = _stationMangerRepository.QueryFirst(x => x.StackerCraneCode == item.RoadWay || x.Remark==item.RoadWay);
                         }
                         if (stationManger == null)
                         {
@@ -228,12 +228,12 @@
                             else
                             {
                                 task.NextAddress = taskTypeGroup == TaskTypeGroup.InboundGroup ? task.TargetAddress : router.NextPosi;
-                                if (item.RoadWay.Contains("AGV_FL"))
+                                if (item.RoadWay.Contains("AGV_FL")|| (item.RoadWay.Contains("AGV_CP") && taskTypeGroup == TaskTypeGroup.OutbondGroup))
                                 {
                                     task.DeviceCode = item.RoadWay;
-                                    task.AgvTaskNum = task.DeviceCode + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum;
+                                    task.AgvTaskNum = item.RoadWay + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum;
                                 }
-                                else if(item.RoadWay.Contains("AGV_FL"))
+                                else if(item.RoadWay.Contains("AGV_CP") && taskTypeGroup == TaskTypeGroup.InboundGroup)
                                 {
                                     task.DeviceCode = stationManger.StationDeviceCode;
                                     task.AgvTaskNum = task.DeviceCode + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum;
@@ -842,7 +842,7 @@
         /// </summary>
         public Dt_Task QueryStackerExistTask(string PalletCode, string locationCode)
         {
-            return BaseDal.QueryFirst(x => x.PalletCode == PalletCode && x.SourceAddress == locationCode && x.TaskState == (int)TaskStatusEnum.SC_Execute);
+            return BaseDal.QueryFirst(x => x.PalletCode == PalletCode && x.SourceAddress == locationCode && (x.TaskState == (int)TaskStatusEnum.SC_Execute || x.TaskState == (int)TaskStatusEnum.SC_Executing));
         }
     }
 }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/StackerCraneJob_PP.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/StackerCraneJob_PP.cs"
index 3d4c6dc..ddfcdab 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/StackerCraneJob_PP.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/StackerCraneJob_PP.cs"
@@ -75,8 +75,9 @@
                                         task.Dispatchertime = DateTime.Now;
                                         task.ExceptionMessage = "";
                                         _taskService.UpdateTask(task, TaskStatusEnum.SC_Executing);
-
                                         commonStackerCrane.Communicator.Write("DB105.54", (short)1);
+                                        //寤舵椂1s
+                                        Thread.Sleep(1000);
                                     }
                                 }
                             }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/ConveyorLineJob_GM.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/ConveyorLineJob_GM.cs"
index 5346746..6e61683 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/ConveyorLineJob_GM.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/ConveyorLineJob_GM.cs"
@@ -1,4 +1,5 @@
-锘縰sing Quartz;
+锘縰sing Newtonsoft.Json;
+using Quartz;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -8,6 +9,7 @@
 using WIDESEAWCS_Common.Helper;
 using WIDESEAWCS_Common.TaskEnum;
 using WIDESEAWCS_Core;
+using WIDESEAWCS_Core.Caches;
 using WIDESEAWCS_Core.Helper;
 using WIDESEAWCS_IBasicInfoRepository;
 using WIDESEAWCS_ITaskInfoRepository;
@@ -24,20 +26,33 @@
     [DisallowConcurrentExecution]
     public class ConveyorLineJob_GM : 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 List<Dt_WarehouseDevice> warehouseDevices;
 
-        public ConveyorLineJob_GM(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository)
+        public ConveyorLineJob_GM(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, ICacheService
+            cacheService)
         {
+            _cacheService = cacheService;
             _taskService = taskService;
             _taskExecuteDetailService = taskExecuteDetailService;
             _taskRepository = taskRepository;
             _stationMangerRepository = stationMangerRepository;
             _routerRepository = routerRepository;
+
+            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)
@@ -46,6 +61,12 @@
             if (flag && value != null)
             {
                 OtherDevice device = (OtherDevice)value;
+                Dt_WarehouseDevice? warehouseDevice = warehouseDevices.FirstOrDefault(x => x.DeviceCode == device.DeviceCode);
+                if (warehouseDevice == null)
+                {
+                    WriteError(device.DeviceName, $"璇烽厤缃粨搴撹澶囦俊鎭�");
+                    return Task.CompletedTask;
+                }
                 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)))
@@ -75,6 +96,7 @@
                             {
                                 if (!string.IsNullOrEmpty(conveyorLineInfoRead.Barcode))
                                 {
+                                    //鍏ュ簱鐢宠浠诲姟
                                     WebResponseContent content = _taskService.RequestWMSTask(conveyorLineInfoRead.Barcode, item.StationCode);
                                     if (content.Status)
                                     {
@@ -98,7 +120,7 @@
                         {
                             if (!conveyorLineSignalRead.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Online && !conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.STB && !conveyorLineSignalWrite.ACK)
                             {
-                                Dt_Task task = _taskRepository.QueryFirst(x => _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.New.ObjToInt() && string.IsNullOrEmpty(x.TargetAddress) && !string.IsNullOrEmpty(x.NextAddress));
+                                Dt_Task task = _taskRepository.QueryFirst(x => x.WarehouseId== warehouseDevice.WarehouseId && _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.New.ObjToInt() && string.IsNullOrEmpty(x.TargetAddress) && !string.IsNullOrEmpty(x.NextAddress));
                                 if (task != null)
                                 {
                                     _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, nextAddress: item.StationCode, deviceCode: item.StackerCraneCode, targetAddress: item.StationCode);
@@ -116,6 +138,7 @@
                                         WriteError(item.StationName, $"鏈壘鍒板搴旂珯鍙颁俊鎭�,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
                                         continue;
                                     }
+                                    //鍏ュ簱鐢宠鍒嗛厤璐т綅
                                     string? locationCode = _taskService.RequestAssignLocation(task.TaskNum, stationManger.StackerCraneCode);
                                     if (string.IsNullOrEmpty(locationCode))
                                     {
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/StackerCraneJob_GM.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/StackerCraneJob_GM.cs"
index a520b73..97880f7 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/StackerCraneJob_GM.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/StackerCraneJob_GM.cs"
@@ -93,8 +93,9 @@
                                     task.Dispatchertime = DateTime.Now;
                                     task.ExceptionMessage = "";
                                     _taskService.UpdateTask(task, TaskStatusEnum.SC_Executing);
-
                                     commonStackerCrane.Communicator.Write("DB105.54", (short)1);
+                                    //寤舵椂1s
+                                    Thread.Sleep(1000);
                                 }
                             }
                         }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPExtend.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPExtend.cs"
index 1e451d5..c446cbb 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPExtend.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPExtend.cs"
@@ -1,4 +1,5 @@
-锘縰sing System;
+锘縰sing OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
@@ -8,7 +9,9 @@
 using WIDESEAWCS_Common.TaskEnum;
 using WIDESEAWCS_Core;
 using WIDESEAWCS_Core.Helper;
+using WIDESEAWCS_DTO.Agv;
 using WIDESEAWCS_Model.Models;
+using WIDESEAWCS_QuartzJob;
 
 namespace WIDESEAWCS_Tasks
 {
@@ -18,7 +21,7 @@
         {
             try
             {
-                var newTasks = _taskService.Db.Queryable<Dt_Task>().Where(x => x.TaskState == TaskStatusEnum.AGV_Execute.ObjToInt() && nameof(AGV_CPJob).Contains(x.DeviceCode) && !string.IsNullOrEmpty(x.DeviceCode)).ToList().OrderBy(x => x.Grade).ThenBy(x => x.CreateDate).ToList();
+                var newTasks = _taskService.Db.Queryable<Dt_Task>().Where(x => (x.TaskState == TaskStatusEnum.AGV_Execute.ObjToInt()|| x.TaskState == TaskStatusEnum.New.ObjToInt()) && nameof(AGV_CPJob).Contains(x.DeviceCode) && !string.IsNullOrEmpty(x.DeviceCode)).ToList().OrderBy(x => x.Grade).ThenBy(x => x.CreateDate).ToList();
                 foreach (var task in newTasks)
                 {
                     try
@@ -47,11 +50,11 @@
                             }
                         },
                         };
+                        //鍙戦�丄GV浠诲姟
                         WebResponseContent content = _taskService.AgvSendTask(taskDTO, APIEnum.Agv_CPSendTask);
-                        if (!content.Status) throw new Exception(content.Message);
-
+                        if (!content.Status)
+                            throw new Exception(content.Message);
                         task.TaskState = TaskStatusEnum.AGV_Executing.ObjToInt();
-
                     }
                     catch (Exception ex)
                     {
@@ -62,6 +65,96 @@
                 if (newTasks.Count>0)
                 {
                     _taskService.UpdateData(newTasks);
+                }
+            }
+            catch (Exception ex)
+            {
+                WriteError(nameof(AGV_CPJob), ex.Message, ex);
+            }
+        }
+        /// <summary>
+        /// AGV鍙栨斁璐у洖璋�
+        /// </summary>
+        public void ContinueAGVTask()
+        {
+            try
+            {
+                //鑾峰彇鏄惁鏈夊畨鍏ㄧ敵璇蜂腑鐨勪换鍔�
+                var continueTask = _taskService.Db.Queryable<Dt_Task>().Where(x => (x.TaskState == TaskStatusEnum.AGV_WaitToExecute.ObjToInt()) && nameof(AGV_CPJob).Contains(x.DeviceCode) && !string.IsNullOrEmpty(x.DeviceCode)).ToList().OrderBy(x => x.Grade).ThenBy(x => x.CreateDate).FirstOrDefault();
+                if (continueTask!=null)
+                {
+                    //鍙栬揣鍥炶皟
+                    if (continueTask.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)
+                    {
+                        Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.AGVStationCode == continueTask.CurrentAddress);
+                        if (stationManger == null)
+                        {
+                            throw new Exception($"鏈壘鍒扮珯鍙皗continueTask.CurrentAddress}淇℃伅");
+                        }
+                        IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode);
+                        if (device == null)
+                        {
+                            throw new Exception($"鏈壘鍒拌澶噞stationManger.StationDeviceCode}淇℃伅");
+                        }
+                        OtherDevice otherDevice = (OtherDevice)device;
+                        short canTake = otherDevice.GetValue<GroundStationDBName, short>(GroundStationDBName.R_IsCanTake, stationManger.StationCode);
+                        if (canTake != 1)
+                        {
+                            return;
+                        }
+                    }
+                    else//鏀捐揣鍥炶皟
+                    {
+                        Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.AGVStationCode == continueTask.NextAddress);
+                        if (stationManger == null)
+                        {
+                            throw new Exception($"鏈壘鍒扮珯鍙皗continueTask.NextAddress}淇℃伅");
+                        }
+                        IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode);
+                        if (device == null)
+                        {
+                            throw new Exception($"鏈壘鍒拌澶噞stationManger.StationDeviceCode}淇℃伅");
+                        }
+                        OtherDevice otherDevice = (OtherDevice)device;
+                        short canPut = otherDevice.GetValue<GroundStationDBName, short>(GroundStationDBName.R_IsCanPut, stationManger.StationCode);
+                        if (canPut != 1)
+                        {
+                            return;
+                        }
+                    }
+                    //鑾峰彇璋冨叆鍙傛暟
+                    AGVBoxApplyPassDTO boxApplyPassDTO = new AGVBoxApplyPassDTO()
+                    {
+                        ReqCode = Guid.NewGuid().ToString().Replace("-", ""),
+                        ReqTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
+                        TaskCode = continueTask.AgvTaskNum
+                    };
+                    if (continueTask.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)
+                    {
+                        boxApplyPassDTO.Type = "1";
+                    }
+                    else
+                    {
+                        boxApplyPassDTO.Type = "2";
+                    }
+                    //璇锋眰鏂欑鍥炶皟鎺ュ彛
+                    WebResponseContent content = _taskService.AgvBoxApplyPass(boxApplyPassDTO);
+                    if (content.Status && continueTask.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)
+                    {
+                        continueTask.TaskState = TaskStatusEnum.AGV_Executing.ObjToInt();
+                        _taskService.UpdateTask(continueTask, TaskStatusEnum.AGV_Executing);
+                    }
+                    else if (content.Status && continueTask.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
+                    {
+                        continueTask.TaskState = TaskStatusEnum.AGV_Puting.ObjToInt();
+                        _taskService.UpdateTask(continueTask, TaskStatusEnum.AGV_Puting);
+                    }
+                    else
+                    {
+                        continueTask.TaskState = TaskStatusEnum.Exception.ObjToInt();
+                        continueTask.ExceptionMessage = content.Message;
+                        _taskService.UpdateTask(continueTask, TaskStatusEnum.Exception);
+                    }
                 }
             }
             catch (Exception ex)
@@ -84,11 +177,11 @@
                 var Layer = Convert.ToInt16(targetCodes[3]);
                 var a = Row switch
                 {
-                    1 => "A1",
-                    2 => "B1",
-                    3 => "C1",
-                    4 => "D1",
-                    5 => "E1",
+                    1 => "A",
+                    2 => "B",
+                    3 => "C",
+                    4 => "D",
+                    5 => "E",
                     _ => throw new Exception($"鏈畾涔夌殑鎺�,鍦板潃:銆恵Address}銆�"),
                 };
                 var b = Layer > 9 ? "" + Layer : "0" + Layer;
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPJob.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPJob.cs"
index 92930b9..fba253f 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPJob.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPJob.cs"
@@ -33,7 +33,10 @@
         {
             try
             {
+                //浠诲姟鍙戦��
                 SendAGVTask();
+                //缁х画鎵ц
+                ContinueAGVTask();
             }
             catch (Exception ex)
             {
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/ConveyorLineJob_BC.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/ConveyorLineJob_BC.cs"
index 160aaee..ede1df3 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/ConveyorLineJob_BC.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/ConveyorLineJob_BC.cs"
@@ -256,6 +256,7 @@
                                                     deviceCode = item.StackerCraneCode;
                                                     roadwayNo = responseContent.Data.ToString();
                                                     device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress, item.StationCode);
+                                                    device.SetValue(W_ConveyorLineDB.StartPos, task.CurrentAddress, item.StationCode);
                                                 }
                                                 else
                                                 {
@@ -266,10 +267,14 @@
                                             else
                                             {
                                                 //task.NextAddress鍙兘鏄痳outer.NextPosi
-                                                device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress, item.StationCode);
+                                                roadwayNo = responseContent.Data.ToString();
+                                                deviceCode = router.ChildPosiDeviceCode;
+                                                currentAddress = router.StartPosi;
+                                                nextAddress= router.NextPosi;
+                                                device.SetValue(W_ConveyorLineDB.EndPos, router.NextPosi, item.StationCode);
+                                                device.SetValue(W_ConveyorLineDB.StartPos, router.StartPosi, item.StationCode);
                                             }
                                             device.SetValue(W_ConveyorLineDB.TaskNum, task.TaskNum, item.StationCode);
-                                            device.SetValue(W_ConveyorLineDB.StartPos, task.CurrentAddress, item.StationCode);
                                             device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Outbound.ObjToInt(), item.StationCode);
                                             device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
                                             _taskService.UpdateTask(task, taskState, currentAddress: currentAddress, nextAddress: nextAddress, targetAddress: targetAddress, deviceCode: deviceCode, roadwayNo: roadwayNo,heightType: conveyorLineInfoRead.Spare2);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/StackerCraneJob_BC.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/StackerCraneJob_BC.cs"
index 8fb228b..4056894 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/StackerCraneJob_BC.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/StackerCraneJob_BC.cs"
@@ -120,6 +120,8 @@
                                     task.Dispatchertime = DateTime.Now;
                                     task.ExceptionMessage = "";
                                     _taskService.UpdateTask(task, TaskStatusEnum.SC_Executing);
+                                    //寤舵椂1s
+                                    Thread.Sleep(1000);
                                 }
                             }
                         }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/CommonHoisterJob.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/CommonHoisterJob.cs"
index fa169f0..f98a066 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/CommonHoisterJob.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/CommonHoisterJob.cs"
@@ -93,8 +93,11 @@
                                 task.NextAddress = locationCode;
                                 task.DeviceCode = stationManger.StackerCraneCode;
                                 task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt();
-                                _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, deviceCode: task.DeviceCode, targetAddress: task.TargetAddress, currentAddress: task.CurrentAddress, nextAddress: task.NextAddress);
                                 bool isWrite = hoister.SetValue(HoisterDBName.RequestIn, false, deviceChildCode);
+                                if (isWrite)
+                                {
+                                    _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, deviceCode: task.DeviceCode, targetAddress: task.TargetAddress, currentAddress: task.CurrentAddress, nextAddress: task.NextAddress);
+                                }
                             }
                             else
                             {
@@ -113,8 +116,11 @@
                             if (task != null)
                             {
                                 task.TaskState=TaskStatusEnum.HT_Executing.ObjToInt();
-                                _taskService.UpdateTask(task, TaskStatusEnum.HT_Executing);
                                 bool isWrite = hoister.SetValue(HoisterDBName.RequestOut, true, deviceChildCode);
+                                if (isWrite)
+                                {
+                                    _taskService.UpdateTask(task, TaskStatusEnum.HT_Executing);
+                                }
                                 WriteError(hoister.DeviceName, $"璇锋眰鍑哄簱,璁惧缂栧彿:{deviceChildCode},浠诲姟鍙�:{task.TaskNum}");
                             }
                         }
@@ -134,8 +140,11 @@
                                 task.NextAddress = stationManger.StackerCraneStationCode; ;
                                 task.DeviceCode = stationManger.StackerCraneCode;
                                 task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt();
-                                _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, deviceCode: task.DeviceCode, targetAddress: task.TargetAddress, nextAddress: task.NextAddress);
                                 bool isWrite = hoister.SetValue(HoisterDBName.RequestOut, false, deviceChildCode);
+                                if (isWrite)
+                                {
+                                    _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, deviceCode: task.DeviceCode, targetAddress: task.TargetAddress, nextAddress: task.NextAddress);
+                                }
                             }
                             else
                             {
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/StackerCraneJob_YM.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/StackerCraneJob_YM.cs"
index 888e499..f2f0ed3 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/StackerCraneJob_YM.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/StackerCraneJob_YM.cs"
@@ -80,6 +80,8 @@
                                         task.Dispatchertime = DateTime.Now;
                                         task.ExceptionMessage = "";
                                         _taskService.UpdateTask(task, TaskStatusEnum.SC_Executing);
+                                        //寤舵椂1s
+                                        Thread.Sleep(1000);
                                     }
                                 }
                             }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\265\213\350\257\225\346\236\266\344\273\223/StackerCraneJob_CSJ.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\265\213\350\257\225\346\236\266\344\273\223/StackerCraneJob_CSJ.cs"
index 8f364d1..1740fcd 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\265\213\350\257\225\346\236\266\344\273\223/StackerCraneJob_CSJ.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\265\213\350\257\225\346\236\266\344\273\223/StackerCraneJob_CSJ.cs"
@@ -94,6 +94,8 @@
                                     task.Dispatchertime = DateTime.Now;
                                     task.ExceptionMessage = "";
                                     _taskService.UpdateTask(task, TaskStatusEnum.SC_Executing);
+                                    //寤舵椂1s
+                                    Thread.Sleep(1000);
                                 }
                             }
                         }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs"
index 537052a..ea01bc0 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs"
@@ -73,6 +73,8 @@
                                         task.Dispatchertime = DateTime.Now;
                                         task.ExceptionMessage = "";
                                         _taskService.UpdateTask(task, TaskStatusEnum.SC_Executing);
+                                        //寤舵椂1s
+                                        Thread.Sleep(1000);
                                     }
                                 }
                             }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/MesOutOrderDetail.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/MesOutOrderDetail.vue"
new file mode 100644
index 0000000..9556fb4
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/MesOutOrderDetail.vue"
@@ -0,0 +1,247 @@
+<template>
+  <div>
+    <vol-box
+      v-model="showDetialBox"
+      :lazy="true"
+      width="75%"
+      :padding="15"
+      title="鍑哄簱璇︽儏"
+    >
+      <div class="box-head">
+        <el-alert :closable="false" style="width: 100%">
+          <el-row>
+            <el-col :span="24">
+              <span class="less-style">鐗╂枡鍚嶇О锛� {{ row.materialName }} </span>
+              <el-divider direction="vertical"></el-divider>
+              <span class="less-style">鐗╂枡缂栧彿锛� {{ row.materialCode }} </span>
+              <el-divider direction="vertical"></el-divider>
+              <span class="less-style"
+                >闇�姹傛暟閲忥細 {{ row.orderQuantity }}
+              </span>
+              <el-divider direction="vertical"></el-divider>
+              <span class="less-style"
+                >宸插垎閰嶆暟閲忥細 {{ row.lockQuantity }}
+              </span>
+            </el-col>
+          </el-row>
+        </el-alert>
+      </div>
+      <div class="box-table" style="margin-top: 1%">
+        <el-table
+          ref="singleTable"
+          :data="tableData"
+          style="width: 100%; height: 100%"
+          highlight-current-row
+          height="500px"
+        >
+          >
+          <el-table-column
+            label="搴忓彿"
+            type="index"
+            fixed="left"
+            width="55"
+            align="center"
+          ></el-table-column>
+          <el-table-column
+            v-for="(item, index) in tableColumns.filter((x) => !x.hidden)"
+            :key="index"
+            :prop="item.prop"
+            :label="item.title"
+            :width="item.width"
+            align="center"
+          >
+            <template #default="scoped" v-if="item.type == 'icon'">
+              <el-tooltip
+                class="item"
+                effect="dark"
+                :content="item.title"
+                placement="bottom"
+                ><el-button
+                  type="text"
+                  @click="tableButtonClick(scoped.row, item)"
+                  ><i :class="item.icon" style="font-size: 22px"></i></el-button
+              ></el-tooltip>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <template #footer>
+        <!-- <el-button type="primary" size="small" @click="submit">纭</el-button> -->
+        <el-button type="danger" size="small" @click="showDetialBox = false"
+          >鍏抽棴</el-button
+        >
+      </template>
+    </vol-box>
+  </div>
+</template>
+    <script>
+import VolBox from "@/components/basic/VolBox.vue";
+export default {
+  components: { VolBox },
+  data() {
+    return {
+      row: null,
+      showDetialBox: false,
+      tableData: [],
+      tableColumns: [
+        {
+          prop: "id",
+          title: "涓婚敭",
+          type: "string",
+          width: 150,
+          hidden: true,
+        },
+        {
+          prop: "orderNo",
+          title: "鍗曟嵁缂栧彿",
+          type: "string",
+          width: 150,
+        },
+        {
+          prop: "orderDetailId",
+          title: "鍗曟嵁鏄庣粏涓婚敭",
+          type: "string",
+          width: 150,
+          hidden: true,
+        },
+        {
+          prop: "orderType",
+          title: "鍗曟嵁绫诲瀷",
+          type: "string",
+          width: 90,
+        },
+        {
+          prop: "batchNo",
+          title: "鎵规鍙�",
+          type: "string",
+          width: 120,
+        },
+        {
+          prop: "materielCode",
+          title: "鐗╂枡缂栧彿",
+          type: "string",
+          width: 150,
+        },
+        {
+          prop: "materielName",
+          title: "鐗╂枡鍚嶇О",
+          type: "string",
+          width: 150,
+        },
+        {
+          prop: "stockId",
+          title: "搴撳瓨涓婚敭",
+          type: "string",
+          width: 150,
+          hidden: true,
+        },
+        {
+          prop: "originalQuantity",
+          title: "鍘熷搴撳瓨閲�",
+          type: "string",
+          width: 100,
+        },
+        // {
+        //   prop: "assignQuantity",
+        //   title: "鍒嗛厤鍑哄簱閲�",
+        //   type: "string",
+        //   width: 100,
+        // },
+        {
+          prop: "taskNum",
+          title: "鍑哄簱浠诲姟鍙�",
+          type: "string",
+          width: 100,
+        },
+        {
+          prop: "palletCode",
+          title: "鎵樼洏缂栧彿",
+          type: "string",
+          width: 150,
+        },
+        {
+          prop: "locationCode",
+          title: "璐т綅缂栧彿",
+          type: "string",
+          width: 180,
+        },
+        {
+          prop: "status",
+          title: "鐘舵��",
+          type: "string",
+        },
+      ],
+    };
+  },
+  methods: {
+    open(row) {
+      this.row = row;
+      this.showDetialBox = true;
+      this.getData();
+    },
+    getData() {
+      this.http
+        .post(
+          "api/OutStockLockInfo/GetByMesOrderDetail?taskNo=" +
+            this.row.taskNo,
+          null,
+          "鏌ヨ涓�"
+        )
+        .then((x) => {
+          
+          var label=[
+              { label: '宸插垎閰�', value: 0 },
+              { label: '鍑哄簱涓�', value: 1 },
+              { label: '鍑哄簱瀹屾垚', value: 2 },
+              { label: '鎷i�夊畬鎴�', value: 3 },
+              { label: '鎾ら攢', value: 99 }
+          ]
+          this.tableData=x.map((i) => ({
+            ...i,
+            status:label.find((j) => j.value === i.status).label
+          }))
+        });
+    },
+  },
+};
+</script>
+  <style scoped>
+.less-style {
+  color: black;
+}
+.equle-style {
+  color: green;
+}
+.more-style {
+  color: red;
+}
+</style>
+  
+  <style>
+.text-button:hover {
+  background-color: #f0f9eb !important;
+}
+.el-table .warning-row {
+  background: oldlace;
+}
+.box-table .el-table tbody tr:hover > td {
+  background-color: #d8e0d4 !important;
+  /* color: #ffffff; */
+}
+
+.box-table .el-table tbody tr.current-row > td {
+  background-color: #f0f9eb !important;
+  /* color: #ffffff; */
+}
+
+.el-table .success-row {
+  background: #f0f9eb;
+}
+
+.box-table .el-table {
+  border: 1px solid #ebeef5;
+}
+.box-head .el-alert__content {
+  width: 100%;
+}
+</style>
\ No newline at end of file
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/SelectedStock.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/SelectedStock.vue"
index acfbc12..9dcd95e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/SelectedStock.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/SelectedStock.vue"
@@ -148,6 +148,12 @@
           width: 100,
         },
         {
+          prop: "taskNum",
+          title: "鍑哄簱浠诲姟鍙�",
+          type: "string",
+          width: 100,
+        },
+        {
           prop: "palletCode",
           title: "鎵樼洏缂栧彿",
           type: "string",
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/mesOutboundOrder.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/mesOutboundOrder.js"
index 1c3066e..67a03bf 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/mesOutboundOrder.js"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/mesOutboundOrder.js"
@@ -1,10 +1,11 @@
 
 //姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
-import gridBody from './extend/addMesOutOrder.vue'
+import gridBody from './extend/MesOutOrderDetail.vue'
+import gridHeader from './extend/addMesOutOrder.vue'
 let extension = {
   components: {
     //鏌ヨ鐣岄潰鎵╁睍缁勪欢
-    gridHeader: '',
+    gridHeader: gridHeader,
     gridBody: gridBody,
     gridFooter: '',
     //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
@@ -21,7 +22,7 @@
       let addButton = this.buttons.find(item => item.value == 'Add');
       if (addButton) {
         addButton.onClick = () => {
-          this.$refs.gridBody.open();
+          this.$refs.gridHeader.open();
         }
       }
 
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue"
index 55659d0..0e1d17a 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue"
@@ -97,6 +97,7 @@
         },
         { title: "鍒涘缓鑰�", field: "creater", type: "like" },
         { title: "鍒涘缓鏃堕棿", field: "createDate", type: "datetime" },
+        { title: "鎵�灞炰粨搴�", field: "warehouseId",type: "selectList",dataKey: "warehouses",data: [],}
       ],
     ]);
     const columns = ref([
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/receiveOrder.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/receiveOrder.vue"
index 2bc7943..275fdaf 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/receiveOrder.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/receiveOrder.vue"
@@ -53,7 +53,8 @@
       ],
       [
         { title: "渚涘簲鍟�", field: "suppliersId", type: "select",dataKey:"suppliers",data:[]},
-        { title: "鍒涘缓鑰�", field: "creater", type: "like" }
+        { title: "鍒涘缓鑰�", field: "creater", type: "like" },
+        { title: "鎵�灞炰粨搴�", field: "warehouseId",type: "selectList",dataKey: "warehouses",data: [],}
       ],
     ]);
 
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue"
index 0fe8eda..6b61d28 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue"
@@ -116,6 +116,7 @@
         },
         { title: "鍒涘缓鑰�", field: "creater", type: "like" },
         { title: "鍒涘缓鏃堕棿", field: "createDate", type: "datetime" },
+        { title: "鎵�灞炰粨搴�", field: "warehouseId",type: "selectList",dataKey: "warehouses",data: [],}
       ],
     ]);
     const columns = ref([
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue"
index 73bdbb7..59be617 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue"
@@ -282,6 +282,13 @@
           align: "left",
         },
         {
+          field: "materielSpec",
+          title: "瑙勬牸鍨嬪彿",
+          type: "string",
+          width: 180,
+          align: "left",
+        },
+        {
           field: "serialNumber",
           title: "搴忓垪鍙�",
           type: "int",
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue"
index f8fed3d..a9e595a 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue"
@@ -120,6 +120,13 @@
         width: 220,
         align: "left",
       },
+      {
+        field: "orderNo",
+        title: "鍗曟嵁缂栧彿",
+        type: "string",
+        width: 150,
+        align: "left",
+      },
       // {
       //   field: "currentAddress",
       //   title: "褰撳墠浣嶇疆",
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue"
index c0ade98..c4538b3 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue"
@@ -120,6 +120,13 @@
         width: 220,
         align: "left",
       },
+      {
+        field: "orderNo",
+        title: "鍗曟嵁缂栧彿",
+        type: "string",
+        width: 150,
+        align: "left",
+      },
       // {
       //   field: "currentAddress",
       //   title: "褰撳墠浣嶇疆",
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/1ceb7491-cd63-4a60-ba30-ad6b8388e302.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/1ceb7491-cd63-4a60-ba30-ad6b8388e302.vsidx"
deleted file mode 100644
index a0f3fff..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/1ceb7491-cd63-4a60-ba30-ad6b8388e302.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/2750f5ae-5ba3-4a71-bf69-75c17db76907.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/2750f5ae-5ba3-4a71-bf69-75c17db76907.vsidx"
deleted file mode 100644
index a9a7e35..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/2750f5ae-5ba3-4a71-bf69-75c17db76907.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/4097eb55-e5cd-477d-a304-2ebfbecb7877.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/4097eb55-e5cd-477d-a304-2ebfbecb7877.vsidx"
new file mode 100644
index 0000000..006a14c
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/4097eb55-e5cd-477d-a304-2ebfbecb7877.vsidx"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/416fe101-249f-41a5-9c55-755eb49bfad0.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/416fe101-249f-41a5-9c55-755eb49bfad0.vsidx"
deleted file mode 100644
index 8972118..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/416fe101-249f-41a5-9c55-755eb49bfad0.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5172d2fd-775d-4922-be09-1cba741a2211.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5172d2fd-775d-4922-be09-1cba741a2211.vsidx"
deleted file mode 100644
index 7a21cf1..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5172d2fd-775d-4922-be09-1cba741a2211.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5d7aaa65-610a-4a4f-9e08-ac924f0dace4.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5d7aaa65-610a-4a4f-9e08-ac924f0dace4.vsidx"
deleted file mode 100644
index 981c64c..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5d7aaa65-610a-4a4f-9e08-ac924f0dace4.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/698304e2-84c8-4568-8d00-fafc24f90fa6.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/698304e2-84c8-4568-8d00-fafc24f90fa6.vsidx"
new file mode 100644
index 0000000..9a610ed
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/698304e2-84c8-4568-8d00-fafc24f90fa6.vsidx"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/c0c07971-a8e8-48ed-85a6-a9d507a9fa79.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/c0c07971-a8e8-48ed-85a6-a9d507a9fa79.vsidx"
new file mode 100644
index 0000000..25062a7
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/c0c07971-a8e8-48ed-85a6-a9d507a9fa79.vsidx"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d47d14a8-1bd7-49ce-b62d-ff8267c57e45.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d47d14a8-1bd7-49ce-b62d-ff8267c57e45.vsidx"
new file mode 100644
index 0000000..c7983b0
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d47d14a8-1bd7-49ce-b62d-ff8267c57e45.vsidx"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/e5636152-b0c4-43fd-9e1c-ef8dceb4183d.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/e5636152-b0c4-43fd-9e1c-ef8dceb4183d.vsidx"
deleted file mode 100644
index 37e4729..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/e5636152-b0c4-43fd-9e1c-ef8dceb4183d.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_CheckService/CheckOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_CheckService/CheckOrderService.cs"
index eccb5e8..c32f484 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_CheckService/CheckOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_CheckService/CheckOrderService.cs"
@@ -163,7 +163,7 @@
                     Code = checkOrder.CheckOrderNo,
                     CompanyId = "HATC",
                     Result = checkOrder.Result,
-                    CreatorCode = "TC20082",//娴嬭瘯
+                    CreatorCode = checkOrder.Creater,//娴嬭瘯
                     DefectedNote = checkOrder.DefectedNote,
                     MaterialsCode = checkOrder.MaterielCode,
                     PlantsId = "HA02",
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/OrderEnum/OutProTypeEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/OrderEnum/OutProTypeEnum.cs"
new file mode 100644
index 0000000..1b76f01
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/OrderEnum/OutProTypeEnum.cs"
@@ -0,0 +1,23 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEA_Common.OrderEnum
+{
+    public enum OutProTypeEnum
+    {
+        /// <summary>
+        /// 鎴愬搧鍑哄簱鍗�
+        /// </summary>
+        [Description("鎴愬搧鍑哄簱鍗�")]
+        ProOut=1,
+        /// <summary>
+        /// 瀵勫敭璁㈠崟杞粨
+        /// </summary>
+        [Description("瀵勫敭璁㈠崟杞粨")]
+        SendProOut=2
+    }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/OrderEnum/PurchaseOrderEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/OrderEnum/PurchaseOrderEnum.cs"
index 22e5586..a43dd7e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/OrderEnum/PurchaseOrderEnum.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/OrderEnum/PurchaseOrderEnum.cs"
@@ -25,7 +25,12 @@
         /// 鏀惰揣瀹屾垚
         /// </summary>
         [Description("鏀惰揣瀹屾垚")]
-        Received = 2
+        Received = 2,
+        /// <summary>
+        /// 璁㈠崟鍏抽棴
+        /// </summary>
+        [Description("璁㈠崟鍏抽棴")]
+        Closed = 3
     }
 
     public enum PurchaseOrderDetailStatusEnum
@@ -44,7 +49,12 @@
         /// 鏀惰揣瀹屾垚
         /// </summary>
         [Description("鏀惰揣瀹屾垚")]
-        Received = 2
+        Received = 2,
+        /// <summary>
+        /// 璁㈠崟鍏抽棴
+        /// </summary>
+        [Description("璁㈠崟鍏抽棴")]
+        Closed = 3
     }
 
     public enum PurchaseOrderTypeEnum
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/OrderEnum/ReceiveOrderEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/OrderEnum/ReceiveOrderEnum.cs"
index 3ac452b..4b0a448 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/OrderEnum/ReceiveOrderEnum.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/OrderEnum/ReceiveOrderEnum.cs"
@@ -46,6 +46,17 @@
         /// 鏀惰揣瀹屾垚
         /// </summary>
         [Description("鏀惰揣瀹屾垚")]
-        Completed
+        Completed,
+        /// <summary>
+        /// 鍏抽棴
+        /// </summary>
+        [Description("鍏抽棴")]
+        鍏抽棴 = 99,
+
+        /// <summary>
+        /// 鍙栨秷
+        /// </summary>
+        [Description("鍙栨秷")]
+        鍙栨秷 = 98
     }
 }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs"
index 0ab240e..7307542 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs"
@@ -64,7 +64,11 @@
         /// </summary>
         [Description("鎴愬搧鍑哄簱")]
         OutProduct = 230,
-
+        /// <summary>
+        /// 鎴愬搧瀵勫敭杞粨
+        /// </summary>
+        [Description("鎴愬搧瀵勫敭杞粨")]
+        OutSendProduct = 240,
         /// <summary>
         /// 閲囪喘鍏ュ簱
         /// </summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/HttpMesHelper.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/HttpMesHelper.cs"
index 19fad41..1bfabba 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/HttpMesHelper.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/HttpMesHelper.cs"
@@ -23,15 +23,19 @@
                     
                     using HttpClient httpClient = new HttpClient();
                     httpClient.Timeout = new TimeSpan(0, 0, 60);
-                    //string authorization = "AppKey 1830415116987195392";
-                    string authorization = "AppKey 1773317109539201024";
+                    //姝e紡
+                    string authorization = "AppKey 1830415116987195392";
+                    //娴嬭瘯
+                    //string authorization = "AppKey 1773317109539201024";
 
-                    
+
                     headers = new Dictionary<string, string>
                     {
                         { "Authorization", authorization },
-                        //{ "Site_tenant_id", "0dc2d164-8a62-417e-8a00-808007464feb" }
-                        { "Site_tenant_id", "ced19269-2b83-4577-be43-8cc2f700251e" }
+                        //姝e紡
+                        { "Site_tenant_id", "0dc2d164-8a62-417e-8a00-808007464feb" }
+                        //娴嬭瘯
+                        //{ "Site_tenant_id", "ced19269-2b83-4577-be43-8cc2f700251e" }
                     };
                     if (headers != null)
                     {
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/ErpRequestContent.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/ErpRequestContent.cs"
index 4b047a0..02945c7 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/ErpRequestContent.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/ErpRequestContent.cs"
@@ -6,10 +6,22 @@
 
 namespace WIDESEA_DTO.ERP
 {
+    /// <summary>
+    /// 璋冪敤ERP鎺ュ彛杩斿洖鍙傛暟
+    /// </summary>
     public class ErpRequestContent
     {
+        /// <summary>
+        /// 瑙i噴
+        /// </summary>
         public string Data { get ; set; }
+        /// <summary>
+        /// 
+        /// </summary>
         public string Rdata { get; set; }
+        /// <summary>
+        /// 鍝嶅簲鐘舵��
+        /// </summary>
         public int res { get ; set; }
     }
 }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/ERPService/InvokeERPService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/ERPService/InvokeERPService.cs"
index 963d767..b909403 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/ERPService/InvokeERPService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/ERPService/InvokeERPService.cs"
@@ -39,7 +39,7 @@
             ERPBaseModel<ERPReceiveModel> model = new ERPBaseModel<ERPReceiveModel>()
             {
                 Data = receiveModel,
-                Desc = "鏀惰揣鍗�",
+                Desc = "WMS鏀惰揣鍗曟帹閫�",
                 Type = "toTCWMSReceive",
                 SecurityCode = "TeChuang"
             };
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs"
index 26760b3..1e4d934 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs"
@@ -32,11 +32,11 @@
         /// 鍏ュ簱瀹屾垚涓婃姤
         /// </summary>
         /// <returns></returns>
-        WebResponseContent FeedbackInboundOrder(Dt_InboundOrder inboundOrder);
+        WebResponseContent FeedbackInboundOrder(int inboundOrderId);
         /// <summary>
         /// 閫�鏂欏畬鎴愪笂鎶ヨ嚦ERP
         /// </summary>
-        public WebResponseContent FeedbackReturnOrder(Dt_InboundOrder inboundOrder,Dt_ReturnOrder returnOrder);
+        WebResponseContent FeedbackReturnOrder(Dt_InboundOrder inboundOrder,Dt_ReturnOrder returnOrder);
         /// <summary>
         /// 鏍规嵁浠撳簱鍜屾墭鐩樺彿鑾峰彇鎵樼洏绫诲瀷
         /// </summary>
@@ -47,5 +47,9 @@
         /// </summary>
         /// <returns></returns>
         WebResponseContent ReceiveWarehousingOrder(ErpInOrderDTO model);
+        /// <summary>
+        /// 鎴愬搧鍏ュ簱涓婁紶ERP
+        /// </summary>
+        WebResponseContent FeedbackProIn(Dt_MesProInOrder mesProInOrder);
     }
 }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IOutProStockInfoRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IOutProStockInfoRepository.cs"
new file mode 100644
index 0000000..1b66392
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IOutProStockInfoRepository.cs"
@@ -0,0 +1,14 @@
+锘縰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
+{
+    public interface IOutProStockInfoRepository : IRepository<Dt_OutProStockInfo>
+    {
+    }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutProStockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutProStockInfoService.cs"
new file mode 100644
index 0000000..065f01c
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutProStockInfoService.cs"
@@ -0,0 +1,17 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core.BaseServices;
+using WIDESEA_IOutboundRepository;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_IOutboundService
+{
+    public interface IOutProStockInfoService : IService<Dt_OutProStockInfo>
+    {
+        IOutProStockInfoRepository Repository { get; }
+        Dt_OutProStockInfo GetOutStockLockInfo(Dt_ProOutOrder proOutOrder, Dt_ProOutOrderDetail proOutOrderDetail, Dt_ProStockInfo proStockInfo, float assignQty, int? taskNum = null);
+    }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs"
index 4d49688..822d536 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs"
@@ -97,5 +97,11 @@
         /// <param name="palletCode">鎵樼洏鍙�</param>
         /// <returns></returns>
         WebResponseContent MaterialPick(string palletCode);
+        /// <summary>
+        /// 鑾峰彇Mes鍑哄簱璇︽儏
+        /// </summary>
+        /// <param name="taskNo">Mes浠诲姟鍗曞彿</param>
+        /// <returns></returns>
+        List<Dt_OutStockLockInfo> GetByMesOrderDetail(string taskNo);
     }
 }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IProOutOrderDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IProOutOrderDetailService.cs"
index 3154f3c..20cc88f 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IProOutOrderDetailService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IProOutOrderDetailService.cs"
@@ -3,6 +3,8 @@
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using WIDESEA_Common.LocationEnum;
+using WIDESEA_Core;
 using WIDESEA_Core.BaseServices;
 using WIDESEA_IOutboundRepository;
 using WIDESEA_Model.Models;
@@ -12,5 +14,13 @@
     public interface IProOutOrderDetailService : IService<Dt_ProOutOrderDetail>
     {
         IProOutOrderDetailRepository Repository { get; }
+        /// <summary>
+        /// 鍒嗛厤搴撳瓨澶勭悊璐т綅鏁版嵁
+        /// </summary>
+        (List<Dt_ProStockInfo>, List<Dt_ProOutOrderDetail>, List<Dt_OutProStockInfo>, List<Dt_LocationInfo>) AssignProStockOut(int warehouseId,Dt_ProOutOrder proOutOrder);
+        /// <summary>
+        /// 鍑哄簱浠诲姟鏁版嵁澶勭悊
+        /// </summary>
+        WebResponseContent LockOutboundStockDataUpdate(List<Dt_ProStockInfo> proStockInfos, List<Dt_ProOutOrderDetail> proOutOrderDetails, List<Dt_OutProStockInfo> outProStockInfos, List<Dt_LocationInfo> locationInfos, LocationStatusEnum locationStatus = LocationStatusEnum.Lock, List<Dt_Task>? tasks = null);
     }
 }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IProStockInfoRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IProStockInfoRepository.cs"
index 553243d..d86e150 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IProStockInfoRepository.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IProStockInfoRepository.cs"
@@ -10,5 +10,9 @@
 {
     public interface IProStockInfoRepository : IRepository<Dt_ProStockInfo>
     {
+        /// <summary>
+        /// 鏌ユ壘鍙敤搴撳瓨
+        /// </summary>
+        List<Dt_ProStockInfo> GetProStocks(Dt_ProOutOrderDetail proOutOrderDetail,List<string> locationInfos);
     }
 }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IProStockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IProStockInfoService.cs"
index 1f65de3..6d5fbd0 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IProStockInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IProStockInfoService.cs"
@@ -12,5 +12,13 @@
     public interface IProStockInfoService : IService<Dt_ProStockInfo>
     {
         IProStockInfoRepository Repository { get; }
+        /// <summary>
+        /// 鏌ユ壘鍙敤搴撳瓨
+        /// </summary>
+        List<Dt_ProStockInfo> GetUseableStocks(int warehoseId, Dt_ProOutOrderDetail proOutOrderDetail);
+        /// <summary>
+        /// 鑾峰彇鍑哄簱搴撳瓨
+        /// </summary>
+        List<Dt_ProStockInfo> GetOutboundStocks(List<Dt_ProStockInfo> stockInfos, Dt_ProOutOrderDetail outOrderDetail, float needQuantity, out float residueQuantity);
     }
 }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockService.cs"
index 13f1cfe..29dd8fe 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockService.cs"
@@ -15,5 +15,9 @@
         IStockInfoDetail_HtyService StockInfoDetail_HtyService { get; }
 
         IStockInfo_HtyService StockInfo_HtyService { get; }
+        IProStockInfoService ProStockInfoService { get; }
+        IProStockInfoDetailService ProStockInfoDetailService { get; }
+        IProStockInfo_HtyService ProStockInfo_HtyService { get; }
+        IProStockInfoDetail_HtyService ProStockInfoDetail_HtyService { get; }
     }
 }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs"
index 214bf41..0e64ce4 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs"
@@ -347,6 +347,12 @@
         WebResponseContent PPCutOutGenerateOutboundTasks(int orderDetailId, List<PPStockSelectViewDTO> stockSelectViews);
 
         WebResponseContent PPGeneratePKOutboundTask(int orderDetailId, List<PPStockSelectViewDTO> stockSelectViews);
-
+        /// <summary>
+        /// 鐢熸垚鎴愬搧鍑哄簱浠诲姟
+        /// </summary>
+        /// <param name="ProOutNo">鍑哄簱璁㈠崟鍙�</param>
+        /// <param name="StationCode">绔欏彴鍦板潃</param>
+        /// <returns></returns>
+        WebResponseContent OutProductTask(string ProOutNo, string StationCode);
     }
 }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
index 4d71ad1..252b4b0 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
@@ -2,8 +2,10 @@
 using HslCommunication.WebSocket;
 using Microsoft.AspNetCore.Mvc.RazorPages;
 using Newtonsoft.Json;
+using OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime;
 using SqlSugar;
 using System;
+using System.Collections;
 using System.Collections.Generic;
 using System.Linq;
 using System.Linq.Expressions;
@@ -41,6 +43,7 @@
 using WIDESEA_ITaskInfoService;
 using WIDESEA_Model.Models;
 using WIDESEA_StockRepository;
+using static Org.BouncyCastle.Pqc.Crypto.Utilities.PqcOtherInfoGenerator;
 
 namespace WIDESEA_InboundService
 {
@@ -556,7 +559,7 @@
                     }
                     else
                     {
-                        FeedbackInboundOrder(inboundOrder);
+                        FeedbackInboundOrder(inboundOrder.Id);
                     }
                 }
                 #endregion
@@ -1131,11 +1134,12 @@
         /// 鍏ュ簱瀹屾垚涓婃姤ERP
         /// </summary>
         /// <returns></returns>
-        public WebResponseContent FeedbackInboundOrder(Dt_InboundOrder inboundOrder)
+        public WebResponseContent FeedbackInboundOrder(int inboundOrderId)
         {
             WebResponseContent content = new WebResponseContent();
             try
             {
+                Dt_InboundOrder inboundOrder = BaseDal.Db.Queryable<Dt_InboundOrder>().Where(x => x.Id == inboundOrderId).Includes(x => x.Details).First();
                 if (inboundOrder.Details.Count == 0)
                 {
                     return WebResponseContent.Instance.Error($"鏈壘鍒板叆搴撳崟鏄庣粏淇℃伅");
@@ -1232,11 +1236,11 @@
                         .Select(mg => new ReturnPickItem
                         {
                             Material = mg.Key,
-                            Qty = mg.Sum(x => x.Qty),
+                            Qty = mg.Sum(x => x.ReturnQty),
                             Dataitem = mg.Select(d => new ReturnDataItem
                             {
                                 Lotno = d.BatchNo,
-                                Qty = d.Qty,
+                                Qty = d.ReturnQty,
                                 Location = warehouse.WarehouseCode,
                                 Msfpart = d.Code
                             }).ToList()
@@ -1263,6 +1267,61 @@
             }
             return content;
         }
+        /// <summary>
+        /// 鎴愬搧鍏ュ簱涓婁紶ERP
+        /// </summary>
+        public WebResponseContent FeedbackProIn(Dt_MesProInOrder mesProInOrder)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                List<ERPProItemsItem> proItemsItems = new List<ERPProItemsItem>();
+                foreach (var item in mesProInOrder.Details)
+                {
+                    ERPProItemsItem proItemsItem = new ERPProItemsItem()
+                    {
+                        PartNum = item.ProductCode,
+                        Rev=item.ProductVersion,
+                        DateCode=item.DateCode,
+                        BatchNumber= item.BagNo,
+                        XLocation=item.XSite,
+                        Xqty=item.XQty,
+                        QtySet=item.SETQty,
+                        QtyPcs=item.OKPCSQTY,
+                        WoList=new List<ERPProListItem>()
+                        {
+                            new ERPProListItem()
+                            {
+                                moNumber=item.MoNumber,
+                                WoNumber=item.ERPOrder,
+                                QtyPcs=item.OKPCSQTY,
+                                QtySet=item.SETQty
+                            }
+                        }
+                    };
+                    proItemsItems.Add(proItemsItem);
+                }
+                ERPProInboundModel proInboundModel = new ERPProInboundModel()
+                {
+                    Way = 1,
+                    Code = mesProInOrder.ProInOrderNo,
+                    CreatorCode = "GSWMS",
+                    CompanyCode = "HATC",
+                    FactoryCode = "HA02",
+                    WarehouseCode = "HA71",
+                    LocationCode = "HA71",
+                    StockDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
+                    StockFormType= "Production",
+                    StockFormItems= proItemsItems
+                };
+                _invokeERPService.InvokeProInApi(proInboundModel);
+            }
+            catch (Exception ex)
+            {
+                content.Error(ex.Message);
+            }
+            return content;
+        }
         static object lock_code = new object();
         public string CreateCodeByRule(string ruleCode)
         {
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/PurchaseOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/PurchaseOrderService.cs"
index 3b89db1..2eb5da7 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/PurchaseOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/PurchaseOrderService.cs"
@@ -258,12 +258,15 @@
                 {
                     return WebResponseContent.Instance.Error($"鏈壘鍒伴噰璐崟鏄庣粏淇℃伅");
                 }
-
+                purchaseOrder.PurchaseOrderStatus = PurchaseOrderStatusEnum.Closed.ObjToInt();
                 _unitOfWorkManage.BeginTran();
-                BaseDal.DeleteAndMoveIntoHty(purchaseOrder, OperateTypeEnum.鍏抽棴);
+                BaseDal.UpdateData(purchaseOrder);
+                //BaseDal.DeleteAndMoveIntoHty(purchaseOrder, OperateTypeEnum.鍏抽棴);
                 foreach (var item in purchaseOrder.Details)
                 {
-                    _purchaseOrderDetailRepository.DeleteAndMoveIntoHty(item, OperateTypeEnum.鍏抽棴);
+                    item.PurchaseDetailStatus = PurchaseOrderDetailStatusEnum.Closed.ObjToInt();
+                    //_purchaseOrderDetailRepository.DeleteAndMoveIntoHty(item, OperateTypeEnum.鍏抽棴);
+                    _purchaseOrderDetailRepository.UpdateData(item);
                 }
                 _unitOfWorkManage.CommitTran();
                 return WebResponseContent.Instance.OK();
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderDetailService.cs"
index d74a418..ff6f7dc 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderDetailService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderDetailService.cs"
@@ -72,6 +72,70 @@
                 {
                     return WebResponseContent.Instance.Error($"璇ョ墿鏂欎笉灞炰簬璇ヤ粨搴�");
                 }
+                //鏃犻噰璐崟杩涜鏀惰揣
+                if (receiveOrder.ReceiveOrderType != ReceiveOrderTypeEnum.PO.ObjToInt())
+                {
+                    //鑾峰彇鍏蜂綋鎵规鍙婄墿鏂�
+                    Dt_ReceiveOrderDetail? detailNoPo = receiveOrder.Details.FirstOrDefault(x => x.LotNo == model.LotNo && x.MaterielCode == model.MaterielCode);
+                    lock (_rowNoLocker)
+                    {
+                        if (detailNoPo != null)
+                        {
+                            //鍘熸湁鏀惰揣鏄庣粏澧炲姞鏀惰揣鏁伴噺
+                            detailNoPo.ReceivedQuantity += model.Quantity;
+                            _unitOfWorkManage.BeginTran();
+                            BaseDal.UpdateData(detailNoPo);
+                            _unitOfWorkManage.CommitTran();
+                        }
+                        else
+                        {
+                            int rowNo = 0;
+                            if (receiveOrder.Details.Count > 0)
+                            {
+                                rowNo = receiveOrder.Details.Max(x => x.RowNo);
+                            }
+                            Dt_ReceiveOrderDetail receiveOrderDetail = new Dt_ReceiveOrderDetail()
+                            {
+                                PurchaseOrderNo = model.PurchaseOrderNo,
+                                ReceivedQuantity = model.Quantity,
+                                MaterielCode = model.MaterielCode,
+                                LotNo = model.LotNo,
+                                MaterielName = materielInfo.MaterielName,
+                                MaterielSpec = materielInfo.MaterielSpec,
+                                ReceiveOrderId = receiveOrder.ReceiveOrderId,
+                                PurchaseOrderDetailRowNo = rowNo + 1,
+                                IfInspection = materielInfo.IsCheck.ObjToInt(),
+                                CurrCode = "",
+                                PriceInTax = 0,
+                                TaxRate = "",
+                                RowNo = rowNo + 1,
+                                Unit = materielInfo.MaterielUnit
+                            };
+                            if (receiveOrder.ReceiveOrderStatus == ReceiveOrderStatusEnum.NotStarted.ObjToInt())
+                            {
+                                receiveOrder.ReceiveOrderStatus = ReceiveOrderStatusEnum.Receiving.ObjToInt();
+                            }
+                            _unitOfWorkManage.BeginTran();
+                            _inboundRepository.ReceiveOrderDetailRepository.AddData(receiveOrderDetail);
+                            _inboundRepository.ReceiveOrderRepository.UpdateData(receiveOrder);
+                            #region 娉ㄩ噴
+                            if (materielInfo.IsCheck == WhetherEnum.True)
+                            {
+                                Dt_CheckOrder checkOrder = _mapper.Map<Dt_CheckOrder>(receiveOrderDetail);
+                                checkOrder.ReceiveOrderNo = receiveOrder.ReceiveOrderNo;
+                                checkOrder.QualifiedQuantity = receiveOrderDetail.ReceivedQuantity;
+                                checkOrder.ReceiveDetailRowNo = receiveOrderDetail.RowNo;
+                                checkOrder.ScrappedQuantity = 0;
+                                checkOrder.ReturnQuantity = 0;
+                                checkOrder.DefectedQuantity = 0;
+                                _checkOrderRepository.AddData(checkOrder);
+                            }
+                            #endregion
+                            _unitOfWorkManage.CommitTran();
+                        }
+                        return WebResponseContent.Instance.OK();
+                    }
+                }
                 Dt_PurchaseOrder purchaseOrder = _inboundRepository.PurchaseOrderRepository.Db.Queryable<Dt_PurchaseOrder>().Where(x => x.PurchaseOrderNo == model.PurchaseOrderNo).Includes(x => x.Details).First();
                 if (purchaseOrder == null)
                 {
@@ -200,16 +264,17 @@
                         _inboundRepository.ReceiveOrderRepository.UpdateData(receiveOrder);
                         _inboundRepository.PurchaseOrderDetailRepository.UpdateData(purchaseOrderDetail);
                         #region 娉ㄩ噴
-                        //if (materielInfo.IsCheck == WhetherEnum.True)
-                        //{
-                        //    Dt_CheckOrder checkOrder = _mapper.Map<Dt_CheckOrder>(receiveOrderDetail);
-                        //    checkOrder.ReceiveOrderNo = receiveOrder.ReceiveOrderNo;
-                        //    checkOrder.QualifiedQuantity = receiveOrderDetail.ReceivedQuantity;
-                        //    checkOrder.ScrappedQuantity = 0;
-                        //    checkOrder.ReturnQuantity = 0;
-                        //    checkOrder.DefectedQuantity = 0;
-                        //    _checkOrderRepository.AddData(checkOrder);
-                        //}
+                        ////if (materielInfo.IsCheck == WhetherEnum.True)
+                        ////{
+                        ////    Dt_CheckOrder checkOrder = _mapper.Map<Dt_CheckOrder>(receiveOrderDetail);
+                        ////    checkOrder.ReceiveOrderNo = receiveOrder.ReceiveOrderNo;
+                        ////    checkOrder.QualifiedQuantity = receiveOrderDetail.ReceivedQuantity;
+                        ////    checkOrder.ReceiveDetailRowNo = receiveOrderDetail.RowNo;
+                        ////    checkOrder.ScrappedQuantity = 0;
+                        ////    checkOrder.ReturnQuantity = 0;
+                        ////    checkOrder.DefectedQuantity = 0;
+                        ////    _checkOrderRepository.AddData(checkOrder);
+                        ////}
                         #endregion
                         _unitOfWorkManage.CommitTran();
                     }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderService.cs"
index 72ba693..0477465 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderService.cs"
@@ -131,12 +131,17 @@
                         PriceInTax = 0,
                         PurchaseOrderCode = item.PurchaseOrderNo,
                         PurchaseOrderSerno = item.PurchaseOrderDetailRowNo,
-                        QtyRecieved = item.ReceivedQuantity.ObjToInt(),
+                        QtyRecieved = item.ReceivedQuantity,
                         Serno = item.RowNo,
-                        Supplotno = "",
+                        Supplotno = item.LotNo,
                         Taxrate = "",
 
                     };
+                    if (receiveOrder.ReceiveOrderType!=ReceiveOrderTypeEnum.PO.ObjToInt())
+                    {
+                        recevieOrderDetail.Taxrate = "ZZ11";
+                        recevieOrderDetail.Currcode = "RMB";
+                    }
                     recevieOrderDetails.Add(recevieOrderDetail);
                 }
 
@@ -158,12 +163,16 @@
 
                 //鏇存柊鏀惰揣鍗曚俊鎭�
                 receiveOrder.ReceiveOrderStatus = ReceiveOrderStatusEnum.Completed.ObjToInt();
-                receiveOrder.UploadStatus = WhetherEnum.True.ObjToInt();
+                //鏀惰揣鎺ㄩ�佽嚦ER
+                string response = _invokeERPService.InvokeMatReceiveApi(receiveModel);
+                ErpRequestContent requestContent = response.DeserializeObject<ErpRequestContent>();
+                if (requestContent.res == 1)
+                {
+                    receiveOrder.UploadStatus = WhetherEnum.True.ObjToInt();
+                }
                 BaseDal.UpdateData(receiveOrder);
                 //鍒涘缓鍏ュ簱鍗�
                 CreateInboundOrder(orderId);
-                //鏀惰揣鎺ㄩ�佽嚦ERP 娴嬭瘯娉ㄩ噴
-                _invokeERPService.InvokeMatReceiveApi(receiveModel);
                 return WebResponseContent.Instance.OK();
             }
             catch (Exception ex)
@@ -209,6 +218,10 @@
             try
             {
                 Dt_ReceiveOrder receiveOrder = Db.Queryable<Dt_ReceiveOrder>().Where(x => x.ReceiveOrderId == receiveOrderId).Includes(x => x.Details).First();
+                if (receiveOrder.UploadStatus!= WhetherEnum.True.ObjToInt())
+                {
+                    return WebResponseContent.Instance.Error($"璇ユ敹璐у崟鏉ユ枡涓婁紶ERP澶辫触鏃犳硶鍒涘缓鍏ュ簱鍗曟嵁");
+                }
                 if (receiveOrder == null)
                 {
                     return WebResponseContent.Instance.Error($"鏈壘鍒拌鏀惰揣鍗曚俊鎭�");
@@ -221,17 +234,22 @@
                 {
                     return WebResponseContent.Instance.Error($"璇ユ敹璐у崟鏈畬鎴�");
                 }
+                Dt_InboundOrder OldCreateOrder = _inboundRepository.InboundOrderRepository.QueryFirst(x => x.UpperOrderNo == receiveOrder.ReceiveOrderNo);
+                if (receiveOrder.CreateInOrderStatus==WhetherEnum.True.ObjToInt() || OldCreateOrder!=null)
+                {
+                    return WebResponseContent.Instance.Error($"璇ユ敹璐у崟瀵瑰簲鐨勫叆搴撳崟宸插瓨鍦�");
+                }
                 #region 娉ㄩ噴
-                //List<Dt_CheckOrder> checkOrders = _checkOrderRepository.QueryData(x => x.ReceiveOrderNo == receiveOrder.ReceiveOrderNo);
-                //if (checkOrders.FirstOrDefault(x => x.CheckOrderStatus == CheckOrderStatusEnum.NotCheck.ObjToInt()) != null)
-                //{
-                //    return WebResponseContent.Instance.Error($"璇ユ敹璐у崟鏈川妫�瀹屾垚");
-                //}
+                ////List<Dt_CheckOrder> checkOrders = _checkOrderRepository.QueryData(x => x.ReceiveOrderNo == receiveOrder.ReceiveOrderNo);
+                ////if (checkOrders.FirstOrDefault(x => x.CheckOrderStatus == CheckOrderStatusEnum.NotCheck.ObjToInt()) != null)
+                ////{
+                ////    return WebResponseContent.Instance.Error($"璇ユ敹璐у崟鏈川妫�瀹屾垚");
+                ////}
 
-                //if (checkOrders.FirstOrDefault(x => x.AuditStatus != AuditStatusEnum.Agree.ObjToInt()) != null)
-                //{
-                //    return WebResponseContent.Instance.Error($"璇ユ敹璐у崟璐ㄦ缁撴灉瀹℃壒鏈畬鎴�");
-                //}
+                ////if (checkOrders.FirstOrDefault(x => x.AuditStatus != AuditStatusEnum.Agree.ObjToInt()) != null)
+                ////{
+                ////    return WebResponseContent.Instance.Error($"璇ユ敹璐у崟璐ㄦ缁撴灉瀹℃壒鏈畬鎴�");
+                ////}
                 #endregion
 
                 Dt_InboundOrder inboundOrder = new Dt_InboundOrder()
@@ -249,15 +267,15 @@
                 {
                     float quantity = item.ReceivedQuantity;
                     #region 娉ㄩ噴
-                    //if (item.IfInspection == WhetherEnum.True.ObjToInt())
-                    //{
-                    //    Dt_CheckOrder? checkOrder = checkOrders.FirstOrDefault(x => x.ReceiveOrderNo == receiveOrder.ReceiveOrderNo && x.ReceiveDetailRowNo == item.RowNo);
-                    //    if (checkOrder == null)
-                    //    {
-                    //        return WebResponseContent.Instance.Error($"璐ㄦ鍗曟暟鎹敊璇�");
-                    //    }
-                    //    quantity = checkOrder.QualifiedQuantity.GetValueOrDefault() + checkOrder.DefectedQuantity.GetValueOrDefault();
-                    //}
+                    ////if (item.IfInspection == WhetherEnum.True.ObjToInt())
+                    ////{
+                    ////    Dt_CheckOrder? checkOrder = checkOrders.FirstOrDefault(x => x.ReceiveOrderNo == receiveOrder.ReceiveOrderNo && x.ReceiveDetailRowNo == item.RowNo);
+                    ////    if (checkOrder == null)
+                    ////    {
+                    ////        return WebResponseContent.Instance.Error($"璐ㄦ鍗曟暟鎹敊璇�");
+                    ////    }
+                    ////    quantity = checkOrder.QualifiedQuantity.GetValueOrDefault() + checkOrder.DefectedQuantity.GetValueOrDefault();
+                    ////}
                     #endregion
                     Dt_InboundOrderDetail detail = new Dt_InboundOrderDetail()
                     {
@@ -342,19 +360,19 @@
                         rowNo += 1;
                         receiveOrderDetails.Add(receiveOrderDetail);
                         #region 娉ㄩ噴
-                        //if (materielInfo.IsCheck == WhetherEnum.True)
-                        //{
-                        //    Dt_CheckOrder checkOrder = _mapper.Map<Dt_CheckOrder>(receiveOrderDetail);
-                        //    checkOrder.CheckOrderNo = "TestCheckNo21";//娴嬭瘯
-                        //    checkOrder.ReceiveOrderNo = "";
-                        //    checkOrder.QualifiedQuantity = receiveOrderDetail.ReceivedQuantity;
-                        //    checkOrder.ScrappedQuantity = 0;
-                        //    checkOrder.ReturnQuantity = 0;
-                        //    checkOrder.DefectedQuantity = 0;
-                        //    checkOrder.ReceiveDetailRowNo = rowNo;
-                        //    checkOrder.UploadStatus = CheckUploadEnum.UploadNo.ObjToInt();
-                        //    checkOrders.Add(checkOrder);
-                        //}
+                        if (materielInfo.IsCheck == WhetherEnum.True)
+                        {
+                            Dt_CheckOrder checkOrder = _mapper.Map<Dt_CheckOrder>(receiveOrderDetail);
+                            checkOrder.CheckOrderNo = "TestCheckNo21";//娴嬭瘯
+                            checkOrder.ReceiveOrderNo = "";
+                            checkOrder.QualifiedQuantity = receiveOrderDetail.ReceivedQuantity;
+                            checkOrder.ScrappedQuantity = 0;
+                            checkOrder.ReturnQuantity = 0;
+                            checkOrder.DefectedQuantity = 0;
+                            checkOrder.ReceiveDetailRowNo = rowNo;
+                            checkOrder.UploadStatus = CheckUploadEnum.UploadNo.ObjToInt();
+                            checkOrders.Add(checkOrder);
+                        }
                         #endregion
                     }
                     receiveOrder = new Dt_ReceiveOrder()
@@ -405,19 +423,19 @@
                         rowNo += 1;
                         receiveOrderDetails.Add(receiveOrderDetail);
 
-                        //if (materielInfo.IsCheck == WhetherEnum.True)
-                        //{
-                        //    Dt_CheckOrder checkOrder = _mapper.Map<Dt_CheckOrder>(receiveOrderDetail);
-                        //    checkOrder.CheckOrderNo = "Test-CheckNo1";//娴嬭瘯
-                        //    checkOrder.QualifiedQuantity = receiveOrderDetail.ReceivedQuantity;
-                        //    checkOrder.ScrappedQuantity = 0;
-                        //    checkOrder.ReceiveOrderNo = receiveOrder.ReceiveOrderNo;
-                        //    checkOrder.ReturnQuantity = 0;
-                        //    checkOrder.DefectedQuantity = 0;
-                        //    checkOrder.ReceiveDetailRowNo = rowNo;
-                        //    checkOrder.UploadStatus = CheckUploadEnum.UploadNo.ObjToInt();
-                        //    checkOrders.Add(checkOrder);
-                        //}
+                        if (materielInfo.IsCheck == WhetherEnum.True)
+                        {
+                            Dt_CheckOrder checkOrder = _mapper.Map<Dt_CheckOrder>(receiveOrderDetail);
+                            checkOrder.CheckOrderNo = "Test-CheckNo1";//娴嬭瘯
+                            checkOrder.QualifiedQuantity = receiveOrderDetail.ReceivedQuantity;
+                            checkOrder.ScrappedQuantity = 0;
+                            checkOrder.ReceiveOrderNo = receiveOrder.ReceiveOrderNo;
+                            checkOrder.ReturnQuantity = 0;
+                            checkOrder.DefectedQuantity = 0;
+                            checkOrder.ReceiveDetailRowNo = rowNo;
+                            checkOrder.UploadStatus = CheckUploadEnum.UploadNo.ObjToInt();
+                            checkOrders.Add(checkOrder);
+                        }
                     }
                 }
 
@@ -434,10 +452,10 @@
                     Db.InsertNav(receiveOrder).Include(x => x.Details).ExecuteCommand();
                     checkOrders.ForEach(x => x.ReceiveOrderNo = receiveOrder.ReceiveOrderNo);
                 }
-                //if (checkOrders.Count > 0)
-                //{
-                //    _checkOrderRepository.AddData(checkOrders);
-                //}
+                if (checkOrders.Count > 0)
+                {
+                    _checkOrderRepository.AddData(checkOrders);
+                }
                 _inboundRepository.PurchaseOrderRepository.UpdateData(purchaseOrder);
                 _inboundRepository.PurchaseOrderDetailRepository.UpdateData(purchaseOrder.Details);
                 _unitOfWorkManage.CommitTran();
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReturnOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReturnOrderService.cs"
index 6d5f190..1943086 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReturnOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReturnOrderService.cs"
@@ -24,12 +24,14 @@
         private readonly IUnitOfWorkManage _unitOfWorkManage;
         private readonly IBasicRepository _basicRepository;
         private readonly IOutboundService _outboundService;
+        private readonly IInboundRepository _inboundRepository;
         public ReturnOrderService(IReturnOrderRepository BaseDal,IUnitOfWorkManage unitOfWorkManage,IBasicRepository basicRepository,
-        IOutboundService outboundService) : base(BaseDal)
+        IOutboundService outboundService,IInboundRepository inboundRepository) : base(BaseDal)
         {
             _unitOfWorkManage = unitOfWorkManage;
             _basicRepository = basicRepository;
             _outboundService = outboundService;
+            _inboundRepository = inboundRepository;
         }
         /// <summary>
         /// 鑾峰彇閫�鏂欏崟
@@ -189,6 +191,12 @@
                 {
                     return content.Error("璇ラ��鏂欏崟宸插畬鎴愭垨閫�鏂欎腑");
                 }
+                //鍒ゆ柇鏄惁鍒涘缓鍏ュ簱鍗�
+                Dt_InboundOrder InboundOld = _inboundRepository.InboundOrderRepository.QueryFirst(x=>x.UpperOrderNo== returnOrder.OrderNo);
+                if (InboundOld!=null)
+                {
+                    return content.Error($"璇ラ��鏂欏崟{returnOrder.OrderNo}宸茬敓鎴愬叆搴撳崟鍙穥InboundOld.InboundOrderNo}");
+                }
                 List<Dt_InboundOrderDetail> inboundOrderDetails = new List<Dt_InboundOrderDetail>();
                 foreach (var item in returnOrder.Details)
                 {
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Config/Dt_CodeRuleConfig.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Config/Dt_CodeRuleConfig.cs"
index e25fc30..ceea5e9 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Config/Dt_CodeRuleConfig.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Config/Dt_CodeRuleConfig.cs"
@@ -41,7 +41,7 @@
         /// <summary>
         /// 鍓嶇紑瀛楃涓�
         /// </summary>
-        [SugarColumn(IsNullable = true, Length = 2, ColumnDescription = "鍓嶇紑瀛楃涓�")]
+        [SugarColumn(IsNullable = true, Length = 5, ColumnDescription = "鍓嶇紑瀛楃涓�")]
         public string StartStr { get; set; }
 
         /// <summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_ReceiveOrder.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_ReceiveOrder.cs"
index b18f8d9..aeb933c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_ReceiveOrder.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_ReceiveOrder.cs"
@@ -48,6 +48,12 @@
         public int UploadStatus { get; set; }
 
         /// <summary>
+        /// 鏄惁鍒涘缓鍏ュ簱鍗�
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDescription = "鏄惁鍒涘缓鍏ュ簱鍗�")]
+        public int CreateInOrderStatus { get; set; }
+
+        /// <summary>
         /// 瀹㈡埛浠e彿
         /// </summary>
         [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "瀹㈡埛浠e彿")]
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutProStockInfo.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutProStockInfo.cs"
index 6e40d7b..7bbfb97 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutProStockInfo.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutProStockInfo.cs"
@@ -64,6 +64,11 @@
         [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "浜у搧鐗堟湰")]
         public string PVer { get; set; }
         /// <summary>
+        /// 浜у搧鎵规
+        /// </summary>
+        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "浜у搧鎵规")]
+        public string PLot { get; set; }
+        /// <summary>
         /// 浜у搧鍛ㄦ湡
         /// </summary>
         [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "浜у搧鍛ㄦ湡")]
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_ProOutOrderDetail.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_ProOutOrderDetail.cs"
index ce8dbed..86e4fbe 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_ProOutOrderDetail.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_ProOutOrderDetail.cs"
@@ -79,9 +79,9 @@
         public string DateCode { get; set; }
 
         /// <summary>
-        /// 鍚堟牸PCS鏁�
+        /// 鍑哄簱鍚堟牸PCS鏁�
         /// </summary>
-        [SugarColumn(IsNullable = false, ColumnDescription = "鍚堟牸PCS鏁�")]
+        [SugarColumn(IsNullable = false, ColumnDescription = "鍑哄簱鍚堟牸PCS鏁�")]
         public float QtyPcs { get; set; }
 
         /// <summary>
@@ -91,6 +91,12 @@
         public float OverQtyPcs { get; set; }
 
         /// <summary>
+        /// 閿佸畾鏁伴噺
+        /// </summary>
+        [SugarColumn(IsNullable = false, ColumnDescription = "閿佸畾鏁伴噺")]
+        public float LockQtyPcs { get; set; }
+
+        /// <summary>
         /// X鏉挎暟
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDescription = "X鏉挎暟")]
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_ProStockInfoDetail.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_ProStockInfoDetail.cs"
index 723c9e1..2ad16db 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_ProStockInfoDetail.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_ProStockInfoDetail.cs"
@@ -56,10 +56,10 @@
         [SugarColumn(IsNullable = false, ColumnDescription = "鍖呰SET鏁伴噺")]
         public float SETQty { get; set; }
         /// <summary>
-        /// 鍚堟牸PCS鏁�
+        /// 搴撳瓨PCS鏁�
         /// </summary>
         [SugarColumn(IsNullable = false, ColumnDescription = "鍚堟牸PCS鏁�")]
-        public float OKPCSQTY { get; set; }
+        public float StockPcsQty { get; set; }
         /// <summary>
         /// 鍛ㄦ湡
         /// </summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/OutProStockInfoRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/OutProStockInfoRepository.cs"
new file mode 100644
index 0000000..767cd01
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/OutProStockInfoRepository.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_IOutboundRepository;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_OutboundRepository
+{
+    public class OutProStockInfoRepository : RepositoryBase<Dt_OutProStockInfo>, IOutProStockInfoRepository
+    {
+        public OutProStockInfoRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
+        {
+        }
+    }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutProStockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutProStockInfoService.cs"
new file mode 100644
index 0000000..d3bb1cb
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutProStockInfoService.cs"
@@ -0,0 +1,53 @@
+锘縰sing SqlSugar.Extensions;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Common.StockEnum;
+using WIDESEA_Core.BaseRepository;
+using WIDESEA_Core.BaseServices;
+using WIDESEA_IOutboundRepository;
+using WIDESEA_IOutboundService;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_OutboundService
+{
+    public partial class OutProStockInfoService : ServiceBase<Dt_OutProStockInfo, IOutProStockInfoRepository>, IOutProStockInfoService
+    {
+        private readonly IUnitOfWorkManage _unitOfWorkManage;
+
+        public IOutProStockInfoRepository Repository => BaseDal;
+
+        public OutProStockInfoService(IOutProStockInfoRepository BaseDal,IUnitOfWorkManage unitOfWorkManage) : base(BaseDal)
+        {
+            _unitOfWorkManage = unitOfWorkManage;
+        }
+        public Dt_OutProStockInfo GetOutStockLockInfo(Dt_ProOutOrder proOutOrder, Dt_ProOutOrderDetail proOutOrderDetail, Dt_ProStockInfo proStockInfo, float assignQty, int? taskNum = null)
+        {
+            Dt_OutProStockInfo outProStockInfo = new Dt_OutProStockInfo()
+            {
+                OrderNo = proOutOrder.ProOutOrderNo,
+                OrderDetailId = proOutOrderDetail.Id,
+                OrderType = proOutOrder.ProOrderType,
+                BatchNo = proOutOrderDetail.PLot,
+                SaleOrder = proOutOrderDetail.SaleOrder,
+                Customer = proOutOrderDetail.Customer,
+                PCode = proOutOrderDetail.PCode,
+                PVer = proOutOrderDetail.PVer,
+                PLot = proOutOrderDetail.PLot,
+                DateCode = proOutOrderDetail.DateCode,
+                StockId = proStockInfo.Id,
+                OrderQuantity = proOutOrderDetail.QtyPcs,
+                OriginalQuantity = proStockInfo.proStockInfoDetails.Sum(x => x.StockPcsQty),
+                AssignQuantity = assignQty,
+                LocationCode = proStockInfo.LocationCode,
+                PalletCode = proStockInfo.PalletCode,
+                Unit = proOutOrderDetail.Unit,
+                TaskNum = taskNum,
+                Status = taskNum == null ? OutLockStockStatusEnum.宸插垎閰�.ObjToInt() : OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt()
+            };
+            return outProStockInfo;
+        }
+    }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs"
index 2e84bab..5da8a45 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs"
@@ -188,6 +188,10 @@
         {
             return BaseDal.QueryData(x => x.OrderDetailId == orderDetailId && outStockStatus == null ? true : x.Status == outStockStatus.ObjToInt());
         }
+        public List<Dt_OutStockLockInfo> GetByMesOrderDetail(string taskNo)
+        {
+            return BaseDal.QueryData(x => x.OrderNo == taskNo);
+        }
 
         public List<Dt_OutStockLockInfo> GetStockOutboundOrder(SaveModel saveModel)
         {
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs"
index a213cab..b6057e6 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs"
@@ -235,7 +235,7 @@
                     ERPPickItemModel pickItemModel = new ERPPickItemModel()
                     {
                         Lotno = item.BatchNo,
-                        Qty = item.AssignQuantity.ObjToInt().ToString(),
+                        Qty = item.AssignQuantity.ToString(),
                         Location = WarehouseCode
                     };
                     //鑾峰彇鍑哄簱鍗曟槑缁�
@@ -474,7 +474,7 @@
                     issueModel = new ERPIssueModel()
                     {
                         UniqueTag = id.ToString(),
-                        Code = CreateCodeByRule(nameof(RuleCodeEnum.FLCodeRule)),//娴嬭瘯
+                        Code = CreateCodeByRule(nameof(RuleCodeEnum.FLCodeRule)),
                         WarehouseCode = warehouse.WarehouseCode,
                         Docremark = "",
                         Deptno = outboundOrder.DepartmentCode,
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ProOutOrderDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ProOutOrderDetailService.cs"
index dd8108e..1941997 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ProOutOrderDetailService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ProOutOrderDetailService.cs"
@@ -3,10 +3,16 @@
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using WIDESEA_Common.LocationEnum;
+using WIDESEA_Core;
 using WIDESEA_Core.BaseRepository;
 using WIDESEA_Core.BaseServices;
+using WIDESEA_Core.Helper;
+using WIDESEA_IBasicService;
 using WIDESEA_IOutboundRepository;
 using WIDESEA_IOutboundService;
+using WIDESEA_IRecordService;
+using WIDESEA_IStockService;
 using WIDESEA_Model.Models;
 
 namespace WIDESEA_OutboundService
@@ -16,10 +22,151 @@
         private readonly IUnitOfWorkManage _unitOfWorkManage;
 
         public IProOutOrderDetailRepository Repository => BaseDal;
-
-        public ProOutOrderDetailService(IProOutOrderDetailRepository BaseDal, IUnitOfWorkManage unitOfWorkManage) : base(BaseDal)
+        private readonly IStockService _stockInfoService;
+        private readonly IBasicService _basicService;
+        private readonly IOutProStockInfoService _outProStockInfoService;
+        private readonly IRecordService _recordService;
+        public ProOutOrderDetailService(IProOutOrderDetailRepository BaseDal, IUnitOfWorkManage unitOfWorkManage, IStockService stockInfoService, IBasicService basicService,IOutProStockInfoService outProStockInfoService, IRecordService recordService) : base(BaseDal)
         {
             _unitOfWorkManage = unitOfWorkManage;
+            _stockInfoService = stockInfoService;
+            _basicService = basicService;
+            _outProStockInfoService = outProStockInfoService;
+            _recordService = recordService;
+        }
+        /// <summary>
+        /// 鍑哄簱搴撳瓨鍒嗛厤鍚庯紝鏇存柊鏁版嵁搴撴暟鎹�
+        /// </summary>
+        public WebResponseContent LockOutboundStockDataUpdate(List<Dt_ProStockInfo> proStockInfos, List<Dt_ProOutOrderDetail> proOutOrderDetails, List<Dt_OutProStockInfo> outProStockInfos, List<Dt_LocationInfo> locationInfos, LocationStatusEnum locationStatus = LocationStatusEnum.Lock, List<Dt_Task>? tasks = null)
+        {
+            try
+            {
+                _stockInfoService.ProStockInfoService.Repository.UpdateData(proStockInfos);
+                List<Dt_ProStockInfoDetail> proStockInfoDetails = new List<Dt_ProStockInfoDetail>();
+                foreach (var item in proStockInfos)
+                {
+                    proStockInfoDetails.AddRange(item.proStockInfoDetails);
+                }
+                _stockInfoService.ProStockInfoDetailService.Repository.UpdateData(proStockInfoDetails);
+                BaseDal.UpdateData(proOutOrderDetails);
+
+                List<Dt_OutProStockInfo> addOutStockLockInfos = outProStockInfos.Where(x => x.Id == 0).ToList();
+                if (addOutStockLockInfos != null && addOutStockLockInfos.Any())
+                {
+                    if (tasks != null)
+                    {
+                        addOutStockLockInfos.ForEach(x =>
+                        {
+                            x.TaskNum = tasks.FirstOrDefault(v => v.PalletCode == x.PalletCode)?.TaskNum;
+                        });
+                    }
+
+                    _outProStockInfoService.Repository.AddData(addOutStockLockInfos);
+                }
+                List<Dt_OutProStockInfo> updateOutStockLockInfos = outProStockInfos.Where(x => x.Id > 0).ToList();
+                if (updateOutStockLockInfos != null && updateOutStockLockInfos.Any())
+                {
+                    _outProStockInfoService.Repository.UpdateData(updateOutStockLockInfos);
+                }
+
+                _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfos, locationStatus, LocationChangeType.OutboundAssignLocation, "", tasks?.Select(x => x.TaskNum).ToList());
+                _basicService.LocationInfoService.Repository.UpdateLocationStatus(locationInfos, locationStatus);
+                return WebResponseContent.Instance.OK();
+            }
+            catch (Exception ex)
+            {
+                return WebResponseContent.Instance.Error(ex.Message);
+            }
+        }
+        /// <summary>
+        /// 鍒嗛厤搴撳瓨澶勭悊璐т綅鏁版嵁
+        /// </summary>
+        public (List<Dt_ProStockInfo>, List<Dt_ProOutOrderDetail>, List<Dt_OutProStockInfo>, List<Dt_LocationInfo>) AssignProStockOut(int warehouseId, Dt_ProOutOrder proOutOrder)
+        {
+            List<Dt_ProOutOrderDetail> OutOrderDetails = proOutOrder.Details;
+            if (!OutOrderDetails.Any())
+            {
+                throw new Exception($"鏈壘鍒板嚭搴撳崟鏄庣粏淇℃伅");
+            }
+            List<Dt_ProStockInfo> outStocks = new List<Dt_ProStockInfo>();
+            List<Dt_OutProStockInfo> outProStockInfos = new List<Dt_OutProStockInfo>();
+            List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>();
+            List<Dt_ProOutOrderDetail> groupDetails = OutOrderDetails.GroupBy(x => new { x.SaleOrder, x.PCode, x.PVer, x.PLot, x.DateCode }).Select(x => new Dt_ProOutOrderDetail()
+            {
+                QtyPcs = x.Sum(x => x.QtyPcs) - x.Sum(x => x.OverQtyPcs),
+                SaleOrder = x.Key.SaleOrder,
+                PCode = x.Key.PCode,
+                PVer = x.Key.PVer,
+                PLot = x.Key.PLot,
+                DateCode = x.Key.DateCode,
+            }).ToList();
+            foreach (var item in groupDetails)
+            {
+                float needQty = item.QtyPcs;
+                //鏌ユ壘鍙敤搴撳瓨
+                List<Dt_ProStockInfo> stockInfoss = _stockInfoService.ProStockInfoService.GetUseableStocks(warehouseId, item);
+                if (!stockInfoss.Any())
+                {
+                    throw new Exception("鏈壘鍒板彲鍒嗛厤搴撳瓨");
+                }
+                //鑾峰彇鍑哄簱搴撳瓨
+                List<Dt_ProStockInfo> assignOutStocks = _stockInfoService.ProStockInfoService.GetOutboundStocks(stockInfoss, item, needQty, out float residueQuantity);
+                item.LockQtyPcs += needQty - residueQuantity;
+                outStocks.AddRange(assignOutStocks);
+                float assignQuantity = needQty - residueQuantity;
+                bool isCanLot = !string.IsNullOrEmpty(item.PLot);
+                bool isCanDate = !string.IsNullOrEmpty(item.DateCode);
+                List<Dt_ProOutOrderDetail> details = OutOrderDetails
+                    .Where(x => x.SaleOrder == item.SaleOrder && x.PCode == item.PCode && x.PVer == item.PVer
+                    && (isCanLot ? x.PLot == item.PLot : true)
+                    && (isCanDate ? x.DateCode == item.DateCode : true))
+                    .ToList();
+
+                for (int i = 0; i < details.Count; i++)
+                {
+                    float orderQuantity = details[i].QtyPcs;
+                    for (int j = 0; j < assignOutStocks.Count; j++)
+                    {
+                        float detailAssignQuantity = outProStockInfos.Where(x => x.SaleOrder == item.SaleOrder && x.PCode == item.PCode && x.PVer == item.PVer
+                            && (item.PLot.IsNotEmptyOrNull() ? x.PLot == item.PLot : false)
+                            && (item.DateCode.IsNotEmptyOrNull() ? x.DateCode == item.PLot : false) 
+                            && x.OrderDetailId == details[i].Id).Sum(x => x.AssignQuantity);//鍑哄簱璁㈠崟鏄庣粏宸插垎閰嶆暟閲�
+
+                        float palletAssignQuantity = outProStockInfos.Where(x => x.SaleOrder == item.SaleOrder && x.PCode == item.PCode && x.PVer == item.PVer
+                            && (item.PLot.IsNotEmptyOrNull() ? x.PLot == item.PLot : false)
+                            && (item.DateCode.IsNotEmptyOrNull() ? x.DateCode == item.PLot : false 
+                            && x.PalletCode == assignOutStocks[j].PalletCode)).Sum(x => x.AssignQuantity);
+                        //鍑哄簱璇︽儏宸插垎閰嶆暟閲�
+                        palletAssignQuantity = outProStockInfos.Where(x => x.SaleOrder == item.SaleOrder && x.PCode == item.PCode && x.PVer == item.PVer
+                            && (item.PLot.IsNotEmptyOrNull() ? x.PLot == item.PLot : false)
+                            && (item.DateCode.IsNotEmptyOrNull() ? x.DateCode == item.PLot : false && x.PalletCode == assignOutStocks[j].PalletCode)).Sum(x => x.AssignQuantity);//鍑哄簱璇︽儏宸插垎閰嶆暟閲�
+                        float palletOutboundQuantity = assignOutStocks[j].proStockInfoDetails.Sum(x => x.OutboundQuantity);
+                        if (palletAssignQuantity < palletOutboundQuantity)//濡傛灉鍑哄簱璇︽儏宸插垎閰嶆暟閲忓皬浜庢墭鐩樺凡鍒嗛厤鏁伴噺锛屽垯鍙互缁х画娣诲姞璇ユ墭鐩樺嚭搴撲俊鎭�
+                        {
+                            float orderDetailNeedQuantity = details[i].QtyPcs - detailAssignQuantity;
+                            if (orderDetailNeedQuantity > assignOutStocks[j].proStockInfoDetails.Sum(x => x.OutboundQuantity) - palletAssignQuantity)
+                            {
+                                details[i].LockQtyPcs += assignOutStocks[j].proStockInfoDetails.Sum(x => x.OutboundQuantity) - palletAssignQuantity;
+                                Dt_OutProStockInfo outStockLockInfo = _outProStockInfoService.GetOutStockLockInfo(proOutOrder, details[i], assignOutStocks[j], assignOutStocks[j].proStockInfoDetails.Sum(x => x.OutboundQuantity) - palletAssignQuantity);
+                                outProStockInfos.Add(outStockLockInfo);
+                            }
+                            else
+                            {
+                                Dt_OutProStockInfo outStockLockInfo = _outProStockInfoService.GetOutStockLockInfo(proOutOrder, details[i], assignOutStocks[j], details[i].QtyPcs - details[i].LockQtyPcs);
+                                outProStockInfos.Add(outStockLockInfo);
+                                details[i].LockQtyPcs = details[i].QtyPcs;
+                                break;
+                            }
+
+                        }
+                    }
+                }
+                List<string> locationArr = outStocks.Select(x => x.LocationCode).ToList();
+
+                locationInfos.AddRange(_basicService.LocationInfoService.Repository.GetLocationInfos(locationArr));
+
+            }
+            return (outStocks, OutOrderDetails, outProStockInfos, locationInfos);
         }
     }
 }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/ProStockInfoRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/ProStockInfoRepository.cs"
index 0d83d13..9861ce4 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/ProStockInfoRepository.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/ProStockInfoRepository.cs"
@@ -1,9 +1,11 @@
-锘縰sing System;
+锘縰sing Microsoft.IdentityModel.Tokens;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using WIDESEA_Core.BaseRepository;
+using WIDESEA_Core.Helper;
 using WIDESEA_IStockRepository;
 using WIDESEA_Model.Models;
 
@@ -14,5 +16,24 @@
         public ProStockInfoRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
         {
         }
+        //鏍规嵁鏄庣粏鏁版嵁鏌ユ壘鍙敤搴撳瓨搴撳瓨
+        public List<Dt_ProStockInfo> GetProStocks(Dt_ProOutOrderDetail proOutOrderDetail,List<string> locationInfos)
+        {
+            List<Dt_ProStockInfo>? proStockInfos = null;
+            bool isCanLot= !string.IsNullOrEmpty(proOutOrderDetail.PLot);
+            bool isCanDate = !string.IsNullOrEmpty(proOutOrderDetail.DateCode);
+            proStockInfos = Db.Queryable<Dt_ProStockInfo>().Where(x => locationInfos.Contains(x.LocationCode))
+                .Includes(x => x.proStockInfoDetails)
+                .Where(x => x.proStockInfoDetails
+                .Any(x => x.SaleOrder == proOutOrderDetail.SaleOrder
+                && x.ProductCode == proOutOrderDetail.PCode
+                && x.ProductVersion == proOutOrderDetail.PVer
+                && (isCanLot ? x.LotNumber == proOutOrderDetail.PLot : true)
+                && (isCanDate ? x.DateCode == proOutOrderDetail.DateCode : true)
+                ))
+            .ToList();
+            proStockInfos = proStockInfos.OrderBy(x => x.proStockInfoDetails.FirstOrDefault().DateCode).ToList();
+            return proStockInfos;
+        }
     }
 }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockInfoService.cs"
index fc4b072..e7b3f37 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockInfoService.cs"
@@ -5,6 +5,7 @@
 using System.Threading.Tasks;
 using WIDESEA_Core;
 using WIDESEA_Core.BaseServices;
+using WIDESEA_IBasicRepository;
 using WIDESEA_IStockRepository;
 using WIDESEA_IStockService;
 using WIDESEA_Model.Models;
@@ -14,11 +15,16 @@
     public partial class ProStockInfoService : ServiceBase<Dt_ProStockInfo, IProStockInfoRepository>, IProStockInfoService
     {
         public IProStockInfoRepository Repository => BaseDal;
-        public IStockRepository _stockRepository;
-        public ProStockInfoService(IProStockInfoRepository BaseDal,IStockRepository stockRepository) : base(BaseDal)
+        private readonly IStockRepository _stockRepository;
+        private readonly IBasicRepository _basicRepository;
+        public ProStockInfoService(IProStockInfoRepository BaseDal,IStockRepository stockRepository, IBasicRepository basicRepository) : base(BaseDal)
         {
             _stockRepository = stockRepository;
+            _basicRepository = basicRepository;
         }
+        /// <summary>
+        /// 鏍规嵁澶栧寘淇℃伅瑙g粦鍐呭寘淇℃伅
+        /// </summary>
         public WebResponseContent UnBindStock(List<Dt_ProStockInfoDetail> proStockInfoDetails)
         {
             WebResponseContent content = new WebResponseContent();
@@ -37,5 +43,94 @@
             }
             return content;
         }
+        //鏌ユ壘鍙敤搴撳瓨
+        public List<Dt_ProStockInfo> GetUseableStocks(int warehoseId,Dt_ProOutOrderDetail proOutOrderDetail)
+        {
+            List<string> locationCodes = _basicRepository.LocationInfoRepository.GetCanOutLocationCodes(warehoseId);
+            return BaseDal.GetProStocks(proOutOrderDetail,locationCodes);
+        }
+        /// <summary>
+        /// 鑾峰彇鍑哄簱搴撳瓨
+        /// </summary>
+        public List<Dt_ProStockInfo> GetOutboundStocks(List<Dt_ProStockInfo> stockInfos, Dt_ProOutOrderDetail outOrderDetail, float needQuantity, out float residueQuantity)
+        {
+            List<Dt_ProStockInfo> assignOutStocks =new List<Dt_ProStockInfo>();
+            float stockTotalQuantity = stockInfos.Select(x => x.proStockInfoDetails.Sum(v => v.StockPcsQty - v.OutboundQuantity)).Sum(x => x);
+            //stockInfos = stockInfos.OrderBy(x => x.Id).ToList();
+            if (stockTotalQuantity >= needQuantity)//搴撳瓨澶�
+            {
+                int index = 0;
+                while (needQuantity > 0)
+                {
+                    Dt_ProStockInfo stockInfo = stockInfos[index];
+                    float useableStockQuantity = stockInfo.proStockInfoDetails
+                        .Where(x => x.SaleOrder == outOrderDetail.SaleOrder && x.ProductCode==outOrderDetail.PCode && x.ProductVersion==outOrderDetail.PVer)
+                        .Sum(x => x.StockPcsQty - x.OutboundQuantity);
+                    if (useableStockQuantity < needQuantity)
+                    {
+                        stockInfo.proStockInfoDetails.ForEach(x => x.OutboundQuantity = x.StockPcsQty);
+                        needQuantity -= useableStockQuantity;
+                    }
+                    else
+                    {
+                        stockInfo.proStockInfoDetails.ForEach(x =>
+                        {
+                            if ((x.StockPcsQty > x.OutboundQuantity) && x.SaleOrder == outOrderDetail.SaleOrder && x.ProductCode == outOrderDetail.PCode && x.ProductVersion == outOrderDetail.PVer)
+                            {
+                                if (x.StockPcsQty - x.OutboundQuantity >= needQuantity)
+                                {
+                                    x.OutboundQuantity += needQuantity;
+                                    needQuantity = 0;
+                                }
+                                else
+                                {
+                                    needQuantity -= (x.StockPcsQty - x.OutboundQuantity);
+                                    x.OutboundQuantity = x.StockPcsQty;
+                                }
+                            }
+                        });
+                    }
+                    assignOutStocks.Add(stockInfo);
+                    index++;
+                }
+            }
+            else
+            {
+                for (int i = 0; i < stockInfos.Count; i++)
+                {
+                    Dt_ProStockInfo stockInfo = stockInfos[i];
+                    float useableStockQuantity = stockInfo.proStockInfoDetails
+                        .Where(x => x.SaleOrder == outOrderDetail.SaleOrder && x.ProductCode == outOrderDetail.PCode && x.ProductVersion == outOrderDetail.PVer)
+                        .Sum(x => x.StockPcsQty - x.OutboundQuantity);
+                    if (useableStockQuantity < needQuantity)
+                    {
+                        stockInfo.proStockInfoDetails.ForEach(x => x.OutboundQuantity = x.StockPcsQty);
+                        needQuantity -= useableStockQuantity;
+                    }
+                    else
+                    {
+                        stockInfo.proStockInfoDetails.ForEach(x =>
+                        {
+                            if (x.StockPcsQty > x.OutboundQuantity && x.SaleOrder == outOrderDetail.SaleOrder && x.ProductCode == outOrderDetail.PCode && x.ProductVersion == outOrderDetail.PVer)
+                            {
+                                if (x.StockPcsQty - x.OutboundQuantity >= needQuantity)
+                                {
+                                    x.OutboundQuantity += needQuantity;
+                                    needQuantity = 0;
+                                }
+                                else
+                                {
+                                    needQuantity -= (x.StockPcsQty - x.OutboundQuantity);
+                                    x.OutboundQuantity = x.StockPcsQty;
+                                }
+                            }
+                        });
+                    }
+                    assignOutStocks.Add(stockInfo);
+                }
+            }
+            residueQuantity = needQuantity;
+            return assignOutStocks;
+        }
     }
 }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockSerivce.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockSerivce.cs"
index 5747dac..d97d042 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockSerivce.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockSerivce.cs"
@@ -15,13 +15,21 @@
         public IStockInfoDetail_HtyService StockInfoDetail_HtyService { get; }
 
         public IStockInfo_HtyService StockInfo_HtyService { get; }
+        public IProStockInfoService ProStockInfoService { get; }
+        public IProStockInfoDetailService ProStockInfoDetailService { get; }
+        public IProStockInfo_HtyService ProStockInfo_HtyService { get; }
+        public IProStockInfoDetail_HtyService ProStockInfoDetail_HtyService { get; }
 
-        public StockSerivce(IStockInfoDetailService stockInfoDetailService, IStockInfoService stockInfoService, IStockInfoDetail_HtyService stockInfoDetail_HtyService, IStockInfo_HtyService stockInfo_HtyService)
+        public StockSerivce(IStockInfoDetailService stockInfoDetailService, IStockInfoService stockInfoService, IStockInfoDetail_HtyService stockInfoDetail_HtyService, IStockInfo_HtyService stockInfo_HtyService, IProStockInfoService proStockInfoService,IProStockInfoDetailService proStockInfoDetailService,IProStockInfo_HtyService proStockInfo_HtyService,IProStockInfoDetail_HtyService proStockInfoDetail_HtyService)
         {
             StockInfoDetailService = stockInfoDetailService;
             StockInfoService = stockInfoService;
             StockInfoDetail_HtyService = stockInfoDetail_HtyService;
             StockInfo_HtyService = stockInfo_HtyService;
+            ProStockInfoService= proStockInfoService;
+            ProStockInfoDetailService= proStockInfoDetailService;
+            ProStockInfo_HtyService = proStockInfo_HtyService;
+            ProStockInfoDetail_HtyService = proStockInfoDetail_HtyService;
         }
     }
 }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
index cc46e19..f4369ea 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
@@ -442,6 +442,7 @@
                 tasks.ForEach(x =>
                 {
                     x.TargetAddress = model.Line;
+                    x.OrderNo = mesOutboundOrder.TaskNo;
                 });
                 _unitOfWorkManage.BeginTran();
 
@@ -501,7 +502,7 @@
                     EffectiveDate = model.ExpirationDate,
                     MaterielCode = model.MaterialCode,
                     InboundOrderRowNo = stockInfoDetail_Hty?.InboundOrderRowNo ?? 0,
-                    MaterielName = model.MaterialCode,
+                    MaterielName = stockInfoDetail_Hty.MaterielName,
                     ProductionDate = model.ProductionDate,
                     OrderNo = stockInfoDetail_Hty?.OrderNo ?? "",
                     OutboundQuantity = 0,
@@ -1064,6 +1065,7 @@
             }
             return content;
         }
+        //澶栧寘淇℃伅鎺ユ敹
         public MesResponseContent BoxStockin(MesBoxInfoModel boxInfoModel)
         {
             MesResponseContent content = new MesResponseContent();
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
index 0c76b61..3e6d678 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
@@ -226,7 +226,11 @@
                 {
                     return WebResponseContent.Instance.Error($"鏈壘鍒拌浠诲姟淇℃伅");
                 }
-
+                Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == task.WarehouseId);
+                if (warehouse.WarehouseCode==WarehouseEnum.HA71.ToString())
+                {
+                    return InProductCompleted(task);
+                }
                 Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == task.PalletCode && x.WarehouseId == task.WarehouseId).Includes(x => x.Details).First();
                 if (stockInfo == null)
                 {
@@ -266,10 +270,8 @@
 
                 LocationStatusEnum lastStatus = (LocationStatusEnum)locationInfo.LocationStatus;
                 locationInfo.LocationStatus = LocationStatusEnum.InStock.ObjToInt();
-                Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == task.WarehouseId);
-
+                
                 stockInfo.LocationCode = locationInfo.LocationCode;
-
                 #region 绌虹鍏ュ簱/鎷i�夊洖搴�/鐢熶骇閫�鏂�
                 if (task.TaskType == TaskTypeEnum.InEmpty.ObjToInt() || task.TaskType == TaskTypeEnum.InPick.ObjToInt() || (task.TaskType == TaskTypeEnum.ProductionReturn.ObjToInt() && warehouse.WarehouseCode == WarehouseEnum.HA64.ToString()))
                 {
@@ -369,7 +371,7 @@
                 _stockRepository.StockInfoDetailRepository.UpdateData(stockInfo.Details);
                 _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, lastStatus, LocationStatusEnum.InStock, LocationChangeType.InboundCompleted);
                 _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfo.Details, stockInfo.Details.Sum(x => x.StockQuantity), stockInfo.Details.Sum(x => x.StockQuantity), StockChangeTypeEnum.Inbound, taskNum);
-                if (inboundOrder != null)
+                if (inboundOrder != null && inboundOrderDetail != null)
                 {
                     _inboundRepository.InboundOrderRepository.UpdateData(inboundOrder);
                     _inboundRepository.InboundOrderDetailRepository.UpdateData(inboundOrderDetail);
@@ -389,7 +391,7 @@
                     }
                     else
                     {
-                        _inboundOrderService.FeedbackInboundOrder(inboundOrder);
+                        _inboundOrderService.FeedbackInboundOrder(inboundOrder.Id);
                     }
                 }
                 return WebResponseContent.Instance.OK();
@@ -400,7 +402,70 @@
                 return WebResponseContent.Instance.Error(ex.Message);
             }
         }
-
+        /// <summary>
+        /// 鎴愬搧浠撲换鍔″畬鎴�
+        /// </summary>
+        public WebResponseContent InProductCompleted(Dt_Task task)
+        {
+            WebResponseContent content=new WebResponseContent();
+            try
+            {
+                //鑾峰彇缁勭洏淇℃伅
+                Dt_ProStockInfo proStockInfo = _stockRepository.ProStockInfoRepository.Db.Queryable<Dt_ProStockInfo>().Where(x => x.PalletCode == task.PalletCode).Includes(x => x.proStockInfoDetails).First();
+                if (proStockInfo == null)
+                {
+                    return content.Error($"鏈壘鍒拌兌妗嗕负{task.PalletCode}缁勭洏淇℃伅");
+                }
+                Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress);
+                if (locationInfo == null)
+                {
+                    return WebResponseContent.Instance.Error($"鏈壘鍒扮洰鏍囪揣浣嶄俊鎭�");
+                }
+                if (locationInfo.LocationStatus == LocationStatusEnum.InStock.ObjToInt())
+                {
+                    return WebResponseContent.Instance.Error($"璐т綅鐘舵�佷笉姝g‘");
+                }
+                LocationStatusEnum lastStatus = (LocationStatusEnum)locationInfo.LocationStatus;
+                locationInfo.LocationStatus = LocationStatusEnum.InStock.ObjToInt();
+                proStockInfo.LocationCode = locationInfo.LocationCode;
+                //鑾峰彇MES鍏ュ簱鍗曟嵁
+                Dt_MesProInOrder mesProInOrder = _inboundRepository.MesProInOrderRepository.Db.Queryable<Dt_MesProInOrder>().Where(x => x.BatchNo == task.PalletCode).Includes(x => x.Details).First();
+                if (mesProInOrder == null || mesProInOrder.Details == null || mesProInOrder.Details.Count <= 0)
+                {
+                    return content.Error("鏈壘鍒癕ES鍐呭寘鍗曟嵁淇℃伅");
+                }
+                //杩涜鍗曟嵁澶勭悊
+                mesProInOrder.MesProStatus = InOrderStatusEnum.鍏ュ簱瀹屾垚.ObjToInt();
+                mesProInOrder.Details.ForEach(x =>
+                {
+                    x.OverInQuantity = x.OKPCSQTY;
+                });
+                proStockInfo.StockStatus = StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt();
+                proStockInfo.proStockInfoDetails.ForEach(x =>
+                {
+                    x.ProOutDetailStatus = StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt();
+                });
+                //鏇存柊鍏ュ簱鐘舵��
+                task.TaskStatus = TaskStatusEnum.Finish.ObjToInt();
+                _unitOfWorkManage.BeginTran();
+                BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? OperateTypeEnum.浜哄伐瀹屾垚 : OperateTypeEnum.鑷姩瀹屾垚);
+                _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, proStockInfo.PalletType, LocationStatusEnum.InStock, proStockInfo.WarehouseId);
+                _stockRepository.ProStockInfoRepository.UpdateData(proStockInfo);
+                _stockRepository.ProStockInfoDetailRepository.UpdateData(proStockInfo.proStockInfoDetails);
+                _inboundRepository.MesProInOrderRepository.UpdateData(mesProInOrder);
+                _inboundRepository.MesProInOrderDetailRepository.UpdateData(mesProInOrder.Details);
+                _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, lastStatus, LocationStatusEnum.InStock, LocationChangeType.InboundCompleted);
+                _unitOfWorkManage.CommitTran();
+                //涓婁紶ERP
+                _inboundOrderService.FeedbackProIn(mesProInOrder);
+            }
+            catch (Exception ex)
+            {
+                _unitOfWorkManage.RollbackTran();
+                content.Error(ex.Message);
+            }
+            return content.OK();
+        }
         /// <summary>
         /// 鍑哄簱浠诲姟瀹屾垚
         /// </summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
index b20f957..cf866ab 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
@@ -94,6 +94,10 @@
                     {
                         string? orderNo = stockInfo.Details.FirstOrDefault()?.OrderNo ?? "";
                         inboundOrder =_inboundOrderService.Repository.QueryFirst(x => x.InboundOrderNo == orderNo && x.OrderStatus < InOrderStatusEnum.鍏ュ簱瀹屾垚.ObjToInt());
+                        if (inboundOrder!=null)
+                        {
+                            newTask.OrderNo = inboundOrder.InboundOrderNo;
+                        }
                     }
                     
                     if (inboundOrder != null)
@@ -101,10 +105,12 @@
                         if (inboundOrder.OrderType == InOrderTypeEnum.Allocat.ObjToInt())
                         {
                             newTask.TaskType = TaskTypeEnum.InAllocate.ObjToInt();
+                            newTask.OrderNo = inboundOrder.InboundOrderNo;
                         }
                         else if (inboundOrder.OrderType == InOrderTypeEnum.Return.ObjToInt())
                         {
                             newTask.TaskType = TaskTypeEnum.ProductionReturn.ObjToInt();
+                            newTask.OrderNo = inboundOrder.InboundOrderNo;
                         }
                     }
                     if (stockInfo.StockStatus == StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt())
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
index ef6aeb1..d130c64 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
@@ -78,36 +78,184 @@
         /// <summary>
         /// 鐢熸垚鎴愬搧鍑哄簱浠诲姟
         /// </summary>
-        /// <param name="Id">鍑哄簱璁㈠崟ID</param>
+        /// <param name="ProOutNo">鍑哄簱璁㈠崟鍙�</param>
         /// <param name="StationCode">绔欏彴鍦板潃</param>
         /// <returns></returns>
-        public WebResponseContent OutProductTask(int Id,string StationCode)
+        public WebResponseContent OutProductTask(string ProOutNo, string StationCode)
         {
             WebResponseContent content = new WebResponseContent();
             try
             {
+                //鑾峰彇鎴愬搧鍑哄簱璁㈠崟
+                Dt_ProOutOrder proOutOrder = _outboundService.ProOutOrderService.Repository.Db.Queryable<Dt_ProOutOrder>().Where(x => x.ProOutOrderNo == ProOutNo).Includes(x => x.Details).First();
+                if (proOutOrder==null)
+                {
+                    return content.Error("鍑哄簱璁㈠崟涓嶅瓨鍦�");
+                }
+                List<Dt_Task> tasks = new List<Dt_Task>();
+                List<StockSelectViewDTO> stockSelectViews = new List<StockSelectViewDTO>();
+                List<Dt_ProStockInfo> proStockInfos = new List<Dt_ProStockInfo>();
+                List<Dt_ProOutOrderDetail> proOutOrderDetails = new List<Dt_ProOutOrderDetail>();
+                List<Dt_OutProStockInfo> outProStockInfos = new List<Dt_OutProStockInfo>();
+                List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>();
                 (List<Dt_Task>, List<Dt_ProStockInfo>?, List<Dt_ProOutOrderDetail>?, List<Dt_OutProStockInfo>?, List<Dt_LocationInfo>?) result =
-                OutProductTaskDataHandle(Id, StationCode);
+                OutProductTaskDataHandle(proOutOrder);
+                if (result.Item2 != null && result.Item2.Count > 0)
+                {
+                    proStockInfos.AddRange(result.Item2);
+                }
+                if (result.Item3 != null && result.Item3.Count > 0)
+                {
+                    proOutOrderDetails.AddRange(result.Item3);
+                }
+                if (result.Item4 != null && result.Item4.Count > 0)
+                {
+                    outProStockInfos.AddRange(result.Item4);
+                }
+                if (result.Item5 != null && result.Item5.Count > 0)
+                {
+                    locationInfos.AddRange(result.Item5);
+                }
+                if (result.Item1 != null && result.Item1.Count > 0)
+                {
+                    //鏇存柊鍑哄簱鐩殑浣嶇疆
+                    result.Item1.ForEach(x =>
+                    {
+                        x.TargetAddress = StationCode;
+                    });
+                    tasks.AddRange(result.Item1);
+                }
+                //澶勭悊鍑哄簱鏁版嵁
+                content = GenerateOutboundTaskDataUpdate(tasks, proStockInfos, proOutOrderDetails, outProStockInfos, locationInfos);
             }
             catch (Exception ex)
             {
+                _unitOfWorkManage.RollbackTran();
                 content.Error(ex.Message);
             }
             return content;
+        }
+        public WebResponseContent GenerateOutboundTaskDataUpdate(List<Dt_Task> tasks, List<Dt_ProStockInfo>? proStockInfos = null, List<Dt_ProOutOrderDetail>? proOutOrderDetails = null, List<Dt_OutProStockInfo>? outProStockInfos = null, List<Dt_LocationInfo>? locationInfos = null)
+        {
+            try
+            {
+                _unitOfWorkManage.BeginTran();
+
+                BaseDal.AddData(tasks);
+                if (proStockInfos != null && proStockInfos.Count > 0 && proOutOrderDetails != null && proOutOrderDetails.Count > 0 && outProStockInfos != null && outProStockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0)
+                {
+                    proStockInfos.ForEach(x =>
+                    {
+                        x.StockStatus = StockStatusEmun.鍑哄簱閿佸畾.ObjToInt();
+                    });
+                    WebResponseContent content = _outboundService.ProOutOrderDetailService.LockOutboundStockDataUpdate(proStockInfos, proOutOrderDetails, outProStockInfos, locationInfos, tasks: tasks);
+
+                    if (!content.Status)
+                    {
+                        _unitOfWorkManage.RollbackTran();
+                        return content;
+                    }
+                }
+                else if (proOutOrderDetails != null && proOutOrderDetails.Count > 0)
+                {
+                    proOutOrderDetails.ForEach(x =>
+                    {
+                        x.ProOrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt();
+                    });
+
+                    _outboundService.ProOutOrderDetailService.Repository.UpdateData(proOutOrderDetails);
+                }
+                _unitOfWorkManage.CommitTran();
+                PushTasksToWCS(tasks);
+                return WebResponseContent.Instance.OK();
+            }
+            catch (Exception ex)
+            {
+                _unitOfWorkManage.RollbackTran();
+                return WebResponseContent.Instance.Error(ex.Message);
+            }
+
         }
         /// <summary>
         /// 澶勭悊鎴愬搧鍑哄簱鏁版嵁
         /// </summary>
         /// <returns></returns>
-        public (List<Dt_Task>, List<Dt_ProStockInfo>?, List<Dt_ProOutOrderDetail>?, List<Dt_OutProStockInfo>?, List<Dt_LocationInfo>?) OutProductTaskDataHandle(int Id, string StationCode)
+        public (List<Dt_Task>, List<Dt_ProStockInfo>?, List<Dt_ProOutOrderDetail>?, List<Dt_OutProStockInfo>?, List<Dt_LocationInfo>?) OutProductTaskDataHandle(Dt_ProOutOrder proOutOrder)
         {
             List<Dt_Task> tasks = new List<Dt_Task>();
             List<Dt_ProStockInfo> proStockInfos = new List<Dt_ProStockInfo>();
             List<Dt_ProOutOrderDetail> proOutOrderDetails = new List<Dt_ProOutOrderDetail>();
             List<Dt_OutProStockInfo> outProStockInfos=new List<Dt_OutProStockInfo>();
             List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>();
+            //鍒嗛厤搴撳瓨
+            (List<Dt_ProStockInfo>, List<Dt_ProOutOrderDetail>, List<Dt_OutProStockInfo>, List<Dt_LocationInfo>) result = _outboundService.ProOutOrderDetailService.AssignProStockOut(proOutOrder.WarehouseId, proOutOrder);
+            if (result.Item1!=null&&result.Item1.Count>0)
+            {
+                TaskTypeEnum typeEnum = proOutOrder.ProOrderType switch
+                {
+                    (int)OutProTypeEnum.ProOut => TaskTypeEnum.OutProduct,
+                    (int)OutProTypeEnum.SendProOut => TaskTypeEnum.OutSendProduct,
+                    _ => new TaskTypeEnum()
+                };
+                tasks = GetTasks(result.Item1, typeEnum);
+                result.Item2.ForEach(x =>
+                {
+                    x.ProOrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt();
+                });
+                result.Item3.ForEach(x =>
+                {
+                    x.Status = OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt();
+                });
 
+                proStockInfos = result.Item1;
+                proOutOrderDetails = result.Item2;
+                outProStockInfos = result.Item3;
+                locationInfos = result.Item4;
+            }
+            else
+            {
+                throw new Exception("鏃犲彲鍒嗛厤搴撳瓨");
+            }
             return (tasks, proStockInfos, proOutOrderDetails, outProStockInfos, locationInfos);
+        }
+        /// <summary>
+        /// 鐢熸垚浠诲姟
+        /// </summary>
+        /// <param name="stockInfos"></param>
+        /// <param name="taskType"></param>
+        /// <returns></returns>
+        public List<Dt_Task> GetTasks(List<Dt_ProStockInfo> stockInfos, TaskTypeEnum taskType)
+        {
+            List<Dt_Task> tasks = new List<Dt_Task>();
+            for (int i = 0; i < stockInfos.Count; i++)
+            {
+                Dt_ProStockInfo stockInfo = stockInfos[i];
+
+                if (stockInfo != null)
+                {
+                    Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == stockInfo.LocationCode);
+                    if (!tasks.Exists(x => x.PalletCode == stockInfo.PalletCode))
+                    {
+                        Dt_Task task = new()
+                        {
+                            CurrentAddress = stockInfo.LocationCode,
+                            Grade = 0,
+                            PalletCode = stockInfo.PalletCode,
+                            NextAddress = "",
+                            Roadway = locationInfo.RoadwayNo,
+                            SourceAddress = stockInfo.LocationCode,
+                            TargetAddress = "",
+                            TaskStatus = TaskStatusEnum.New.ObjToInt(),
+                            TaskType = taskType.ObjToInt(),
+                            TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
+                            PalletType = stockInfo.PalletType,
+                            WarehouseId = stockInfo.WarehouseId,
+                        };
+                        tasks.Add(task);
+                    }
+                }
+            }
+            return tasks;
         }
         /// <summary>
         /// 搴撳瓨鏁版嵁杞嚭搴撲换鍔�
@@ -254,6 +402,10 @@
                         _ =>new TaskTypeEnum()
                     };
                     tasks = GetTasks(result.Item1, typeEnum);
+                    tasks.ForEach(x =>
+                    {
+                        x.OrderNo = outboundOrder.UpperOrderNo;
+                    });
                     result.Item2.ForEach(x =>
                     {
                         x.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt();
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs"
index d147c0e..6bb636a 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs"
@@ -84,7 +84,16 @@
         {
             return Service.MaterielGroup(saveModel);
         }
-
+        /// <summary>
+        /// 鏇存嵁鍏ュ簱鍗曞彿ID涓婁紶ERP
+        /// </summary>
+        /// <param name="inboundOrderId">鍏ュ簱鍗曞彿Id</param>
+        /// <returns></returns>
+        [HttpPost, HttpGet, Route("FeedbackInboundOrder")]
+        public WebResponseContent FeedbackInboundOrder(int inboundOrderId)
+        {
+            return Service.FeedbackInboundOrder(inboundOrderId);
+        }
         ///// <summary>
         ///// 鍏ュ簱瀹屾垚鍚庡洖浼燛RP
         ///// </summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutStockLockInfoController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutStockLockInfoController.cs"
index dd6e86c..f5c9e72 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutStockLockInfoController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutStockLockInfoController.cs"
@@ -42,7 +42,17 @@
         [HttpPost, HttpGet, Route("GetByOrderDetailId"), AllowAnonymous]
         public List<Dt_OutStockLockInfo> GetByOrderDetailId(int orderDetailId)
         {
-            return Service.GetByOrderDetailId(orderDetailId,null);
+            return Service.GetByOrderDetailId(orderDetailId, null);
+        }
+        /// <summary>
+        /// 鑾峰彇Mes鍑哄簱璇︽儏
+        /// </summary>
+        /// <param name="taskNo">Mes浠诲姟鍗曞彿</param>
+        /// <returns></returns>
+        [HttpPost, HttpGet, Route("GetByMesOrderDetail"), AllowAnonymous]
+        public List<Dt_OutStockLockInfo> GetByMesOrderDetail(string taskNo)
+        {
+            return Service.GetByMesOrderDetail(taskNo);
         }
     }
 }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
index f814880..e381dba 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
@@ -176,6 +176,17 @@
         {
             return Service.GenerateOutboundTasks(keys);
         }
+        /// <summary>
+        /// 鐢熸垚鎴愬搧鍑哄簱浠诲姟
+        /// </summary>
+        /// <param name="ProOutNo">鍑哄簱璁㈠崟鍙�</param>
+        /// <param name="StationCode">绔欏彴鍦板潃</param>
+        /// <returns></returns>
+        [HttpPost, HttpGet, Route("OutProductTask"), AllowAnonymous]
+        public WebResponseContent OutProductTask(string ProOutNo, string StationCode)
+        {
+            return Service.OutProductTask(ProOutNo, StationCode);
+        }
         ///// <summary>
         ///// 鐢熸垚MESPP浠撳ぇ鍗峰嚭搴撲换鍔�
         ///// </summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Filter/CustomProfile.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Filter/CustomProfile.cs"
index bfcb11d..0e1fe8e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Filter/CustomProfile.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Filter/CustomProfile.cs"
@@ -38,7 +38,7 @@
             CreateMap<Dt_Task, WMSTaskDTO>();
             CreateMap<MESBagDetail, Dt_MesProInOrderDetail>().ForMember(x => x.OverInQuantity, b => b.MapFrom(b => 0));
             CreateMap<ErpProOutOrderDetailds, Dt_ProOutOrderDetail>().ForMember(x => x.ProOrderDetailStatus, b => b.MapFrom(b => 0)).ForMember(x => x.OverQtyPcs, b => b.MapFrom(b => 0));
-            CreateMap<Dt_MesProInOrderDetail, Dt_ProStockInfoDetail>().ForMember(x => x.ProOutDetailStatus, b => b.MapFrom(b => StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt())).ForMember(x => x.OutboundQuantity, b => b.MapFrom(b => 0));
+            CreateMap<Dt_MesProInOrderDetail, Dt_ProStockInfoDetail>().ForMember(x => x.ProOutDetailStatus, b => b.MapFrom(b => StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt())).ForMember(x => x.OutboundQuantity, b => b.MapFrom(b => 0)).ForMember(x => x.StockPcsQty, b => b.MapFrom(b => b.OKPCSQTY));
         }
     }
 }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json"
index 58106ac..bf7bb13 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json"
@@ -14,6 +14,7 @@
   //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=",
   //"ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWMS_HUAIAN;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
   "ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWMS_HUAIAN;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+  //  "ConnectionString": "Data Source=10.30.4.92;Initial Catalog=TESTWMSCP_WMS;User ID=sa;Password=duo123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
   //鏃MS鏁版嵁搴撹繛鎺�
   //"TeConnectionString": "Data Source=10.30.4.92;Initial Catalog=TeChuang;User ID=sa;Password=duo123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
   //璺ㄥ煙

--
Gitblit v1.9.3