From 9086b238cd9fbb9fbeae7cab11d59576cd9d2853 Mon Sep 17 00:00:00 2001
From: liulijun <liulijun@hnkhzn.com>
Date: 星期一, 24 十一月 2025 10:27:01 +0800
Subject: [PATCH] 合并

---
 项目代码/BigScreen/src/router/index.js                                                   |    2 
 项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs        |   14 
 项目资料/通信协议/纸片三台料架DB块数据/企业微信截图_1763189335703.png                                       |    0 
 项目资料/通信协议/纸片两台料架DB块数据/企业微信截图_17631892881691.png                                      |    0 
 项目代码/WMS/WMSServices/WIDESEA_OutboundService/OutStockLockInfoService.cs              |    8 
 项目代码/WMS/WMSServices/WIDESEA_OutboundService/OutLineViewService.cs                   |   89 ++
 项目资料/通信协议/纸片两台料架DB块数据/企业微信截图_17631893013030.png                                      |    0 
 项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/ERP/ErpBSTController.cs           |    4 
 项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/原料库/StackerCraneJob_YLSC3.cs                   |   19 
 项目代码/WMS/WMSServices/WIDESEA_DTO/ERP/BSTStockInfoDTO.cs                              |    2 
 项目代码/WMS/WMSServices/WIDESEA_IOutboundService/IOutLineViewService.cs                 |   26 
 项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs      |    9 
 项目代码/WMS/WMSServices/WIDESEA_Model/Models/Inbound/Dt_MESProInOrderInfo.cs            |    2 
 项目代码/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutMESOrder.cs                 |   12 
 项目代码/WMS/WMSServices/WIDESEA_Model/Models/Stock/Dt_StockInfo.cs                      |   57 +
 项目代码/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs                       |    2 
 项目资料/通信协议/纸片四台料架DB块数据/企业微信截图_17631895685290.png                                      |    0 
 项目资料/通信协议/接驳台与上位机WCS交互.xls                                                           |    0 
 项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs                  |  381 ++++++--
 项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs                       |  355 +++++--
 项目代码/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs                        |    9 
 项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/MES/MesController.cs              |    4 
 项目代码/WMS/WMSServices/WIDESEA_OutboundService/OutboundService.cs                      |    7 
 项目代码/WMS/WMSServices/WIDESEA_DTO/ERP/SGOutOrderDTO.cs                                |   12 
 项目代码/龙利得PDA/common/config.js                                                         |    4 
 项目代码/WMS/WMSServices/WIDESEA_InboundService/InboundOrderService.cs                   |    9 
 项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/接驳台/CoveryorJobYL.cs                           |    6 
 项目代码/WCS/WCSServices/WIDESEAWCS_Common/APIEnum/APIEnum.cs                            |    7 
 项目代码/BigScreen/package-lock.json                                                     |   12 
 项目代码/WMS/WMSServices/WIDESEA_IOutboundService/IOutboundService.cs                    |    4 
 项目资料/通信协议/纸片上料桁架数量.xlsx                                                              |    0 
 项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/原料库/StackerCraneJob_YLSC2.cs                   |   21 
 项目代码/WMS/WMSServices/WIDESEA_Model/Models/Basic/Dt_MaterielInfo.cs                   |    6 
 项目代码/WMS/WMSServices/WIDESEA_StockService/StockInfoService.cs                        |   98 ++
 项目代码/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderService.cs                    |  121 +-
 项目代码/WMS/WMSServices/WIDESEA_DTO/MES/MESReturnIssueDTO.cs                            |   21 
 项目代码/WMS/WMSServices/WIDESEA_DTO/Task/WMSTaskDTO.cs                                  |    8 
 项目代码/BigScreen/src/api/ajax.js                                                       |    4 
 项目代码/WMS/WMSServices/WIDESEA_DTO/Basic/ERPMaterialDTO.cs                             |    7 
 项目代码/WMS/WMSServices/WIDESEA_StockService/WIDESEA_StockService.csproj                |    1 
 项目资料/通信协议/纸杯纸箱上料桁架通讯协议.xlsx                                                          |    0 
 项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/桁架/TrussCartonJob.cs                           |    2 
 项目代码/WMS/WMSServices/WIDESEA_Common/OrderEnum/OutboundOrderMenu.cs                   |    7 
 项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Outbound/OutLineViewController.cs |   30 
 项目代码/WCS/WCSServices/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs                     |   16 
 项目代码/WMS/WMSClient/src/extension/outbound/extend/outSGOrderDetail.vue                |    2 
 项目代码/WMS/WMSServices/WIDESEA_DTO/ERP/BSTPickInfoDTO.cs                               |    2 
 项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs                 |  156 +++
 项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/成品仓/StackerCraneJob_CP.cs                      |   16 
 项目代码/WMS/WMSServices/WIDESEA_InboundService/PurchaseOrderService.cs                  |    6 
 项目资料/接口协议/博斯通利拓接口.V2.xlsx                                                            |    0 
 项目代码/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutLineViewRepository.cs           |   17 
 项目代码/WCS/WCSServices/WIDESEAWCS_DTO/MESResponse.cs                                   |   27 
 项目代码/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs              |   28 
 项目代码/WMS/WMSServices/WIDESEA_IInboundService/IMESProInOrderInfoService.cs            |    6 
 项目代码/WMS/WMSServices/WIDESEA_OutboundRepository/OutboundRepository.cs                |    4 
 项目代码/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs                       |   51 
 项目代码/WMS/WMSServices/WIDESEA_IStockService/IStockInfoService.cs                      |   13 
 项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/成品仓/ConveyorLineJob_CPH.cs                     |   75 -
 项目资料/通信协议/纸片四台料架DB块数据/企业微信截图_17631895456628.png                                      |    0 
 项目资料/通信协议/原料库输送线通讯协议.xlsx                                                            |    0 
 项目代码/WMS/WMSServices/WIDESEA_External/Model/MESDeliveryModel.cs                      |    4 
 项目代码/WMS/WMSServices/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs                        |   23 
 项目代码/WMS/WMSClient/src/extension/outbound/outSGOrder.js                              |   49 
 项目代码/WMS/WMSServices/WIDESEA_InboundService/MESProInOrderInfoService.cs              |  117 +-
 项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/原料库/ConveyorLineJob_YL1ndFloor.cs              |   11 
 项目代码/WMS/WMSServices/WIDESEA_WMSServer/appsettings.json                              |    4 
 项目代码/WCS/WCSServices/WIDESEAWCS_DTO/TaskInfo/WMSTaskDTO.cs                           |    8 
 项目代码/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutSGOrderDetail.cs            |    6 
 项目代码/WMS/WMSClient/config/buttons.js                                                 |    9 
 项目代码/WMS/WMSClient/src/views/Index.vue                                               |   34 
 项目代码/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderDetailService.cs              |    9 
 项目代码/WMS/WMSServices/WIDESEA_Core/HttpContextUser/AspNetUser.cs                      |    4 
 项目资料/通信协议/纸片三台料架DB块数据/企业微信截图_17631893492052.png                                      |    0 
 项目资料/接口协议/龙利得MES接口.xlsx                                                              |    0 
 项目代码/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutSGOrder.cs                  |    6 
 项目代码/龙利得PDA/pages/stash/boxing.vue                                                   |   23 
 项目代码/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutboundRepository.cs              |    5 
 项目代码/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutStockLockInfo.cs            |   16 
 项目代码/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutLineView.cs                 |  104 ++
 项目代码/BigScreen/src/views/indexLine.vue                                               |  198 +---
 项目代码/WMS/WMSClient/src/extension/outbound/extend/SelectedStock.vue                   |   18 
 项目代码/WMS/WMSServices/WIDESEA_OutboundRepository/OutLineViewRepository.cs             |   21 
 项目代码/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs                     |    6 
 项目代码/WMS/WMSClient/public/webconfig.js                                               |    2 
 85 files changed, 1,769 insertions(+), 709 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/BigScreen/package-lock.json" "b/\351\241\271\347\233\256\344\273\243\347\240\201/BigScreen/package-lock.json"
index 5a9ef9b..6fc1e6f 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/BigScreen/package-lock.json"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/BigScreen/package-lock.json"
@@ -2349,11 +2349,6 @@
         "fastq": "^1.6.0"
       }
     },
-    "@popperjs/core": {
-      "version": "npm:@sxzz/popperjs-es@2.11.7",
-      "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
-      "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
-    },
     "@sideway/address": {
       "version": "4.1.5",
       "resolved": "https://registry.npmmirror.com/@sideway/address/-/address-4.1.5.tgz",
@@ -7396,6 +7391,13 @@
         "lodash-unified": "^1.0.2",
         "memoize-one": "^6.0.0",
         "normalize-wheel-es": "^1.2.0"
+      },
+      "dependencies": {
+        "@popperjs/core": {
+          "version": "npm:@sxzz/popperjs-es@2.11.7",
+          "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
+          "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
+        }
       }
     },
     "element-ui": {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/BigScreen/src/api/ajax.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/BigScreen/src/api/ajax.js"
index 9390aa5..b63f08b 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/BigScreen/src/api/ajax.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/BigScreen/src/api/ajax.js"
@@ -1,8 +1,8 @@
 // 杩欎釜鏃禷xios鐨勯厤缃�
 import axios from 'axios';
 // import { config } from 'vue/types/umd';
-axios.defaults.baseURL = 'http://192.168.2.155:8099'; //'http://192.168.2.155:8099'; 
-
+//axios.defaults.baseURL = 'http://127.0.0.1:9293'; 
+axios.defaults.baseURL = 'http://192.168.35.3:9283'; 
 // 閿欒淇℃伅澶勭悊
 const  errorHandle = (status, other) => {
   switch (status) {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/BigScreen/src/router/index.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/BigScreen/src/router/index.js"
index 8f9b734..224d9f9 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/BigScreen/src/router/index.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/BigScreen/src/router/index.js"
@@ -4,7 +4,7 @@
 Vue.use(VueRouter)
 
 const routes = [{
-  path: '/line',
+  path: '/',
   name: 'indexLine',
   component: () => import('../views/indexLine.vue')
 },
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/BigScreen/src/views/indexLine.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/BigScreen/src/views/indexLine.vue"
index cb43c38..75d0137 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/BigScreen/src/views/indexLine.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/BigScreen/src/views/indexLine.vue"
@@ -24,7 +24,7 @@
                     font-size: 50px;
                     font-weight: bold;
                     color: #90EE90;
-                  ">绔嬪簱杈撻�佽建閬撳師绾镐俊鎭紙鍏� 鍗凤級</span>
+                  ">绔嬪簱杈撻�佽建閬撳師绾镐俊鎭紙鍏眥{showMsg}}鍗凤級</span>
                             //鏃堕棿
                             <div style="position: absolute; right: 20px;">
                                 <p style="
@@ -64,6 +64,7 @@
     data() {
         return {
             timing: null,
+            timeRequest: null,
             loading: true,
             dateDay: null,
             dateYear: null,
@@ -82,139 +83,22 @@
                 ],
                 data: [
                     [
-                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
-                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
-                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
-                        '<span style="color:#FF4500; font-size:75px;">1</span>',
-                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
-                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
-                        '<span style="color:#FF4500; font-size:75px;">180</span>',
+                        '<span style="color:#FF4500; font-size:60px;">705010</span>',
+                        '<span style="color:#FF4500; font-size:60px;">015004</span>',
+                        '<span style="color:#FF4500; font-size:60px;">X2</span>',
+                        '<span style="color:#FF4500; font-size:60px;">1</span>',
+                        '<span style="color:#FF4500; font-size:60px;">1200</span>',
+                        '<span style="color:#FF4500; font-size:60px;;">4798</span>',
+                        '<span style="color:#FF4500; font-size:60px;">180</span>',
                     ],
                     [
-                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
-                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
-                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
-                        '<span style="color:#FF4500; font-size:75px;">2</span>',
-                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
-                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
-                        '<span style="color:#FF4500; font-size:75px;">180</span>',
-                    ],
-                    [
-                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
-                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
-                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
-                        '<span style="color:#FF4500; font-size:75px;">3</span>',
-                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
-                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
-                        '<span style="color:#FF4500; font-size:75px;">180</span>',
-                    ],
-                    [
-                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
-                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
-                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
-                        '<span style="color:#FF4500; font-size:75px;">4</span>',
-                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
-                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
-                        '<span style="color:#FF4500; font-size:75px;">180</span>',
-                    ],
-                    [
-                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
-                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
-                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
-                        '<span style="color:#FF4500; font-size:75px;">5</span>',
-                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
-                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
-                        '<span style="color:#FF4500; font-size:75px;">180</span>',
-                    ],
-                    [
-                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
-                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
-                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
-                        '<span style="color:#FF4500; font-size:75px;">6</span>',
-                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
-                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
-                        '<span style="color:#FF4500; font-size:75px;">180</span>',
-                    ],
-                    [
-                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
-                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
-                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
-                        '<span style="color:#FF4500; font-size:75px;">7</span>',
-                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
-                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
-                        '<span style="color:#FF4500; font-size:75px;">180</span>',
-                    ],
-                    [
-                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
-                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
-                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
-                        '<span style="color:#FF4500; font-size:75px;">8</span>',
-                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
-                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
-                        '<span style="color:#FF4500; font-size:75px;">180</span>',
-                    ],
-                    [
-                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
-                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
-                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
-                        '<span style="color:#FF4500; font-size:75px;">9</span>',
-                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
-                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
-                        '<span style="color:#FF4500; font-size:75px;">180</span>',
-                    ],
-                    [
-                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
-                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
-                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
-                        '<span style="color:#FF4500; font-size:75px;">10</span>',
-                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
-                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
-                        '<span style="color:#FF4500; font-size:75px;">180</span>',
-                    ],
-                    [
-                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
-                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
-                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
-                        '<span style="color:#FF4500; font-size:75px;">11</span>',
-                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
-                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
-                        '<span style="color:#FF4500; font-size:75px;">180</span>',
-                    ],
-                    [
-                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
-                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
-                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
-                        '<span style="color:#FF4500; font-size:75px;">12</span>',
-                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
-                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
-                        '<span style="color:#FF4500; font-size:75px;">180</span>',
-                    ],
-                    [
-                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
-                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
-                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
-                        '<span style="color:#FF4500; font-size:75px;">13</span>',
-                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
-                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
-                        '<span style="color:#FF4500; font-size:75px;">180</span>',
-                    ],
-                    [
-                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
-                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
-                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
-                        '<span style="color:#FF4500; font-size:75px;">14</span>',
-                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
-                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
-                        '<span style="color:#FF4500; font-size:75px;">180</span>',
-                    ],
-                    [
-                        '<span style="color:#FF4500; font-size:75px;">705010</span>',
-                        '<span style="color:#FF4500; font-size:75px;">015004</span>',
-                        '<span style="color:#FF4500; font-size:75px;">X2</span>',
-                        '<span style="color:#FF4500; font-size:75px;">15</span>',
-                        '<span style="color:#FF4500; font-size:75px;">1200</span>',
-                        '<span style="color:#FF4500; font-size:75px;;">4798</span>',
-                        '<span style="color:#FF4500; font-size:75px;">180</span>',
+                        '<span style="color:#FF4500; font-size:60px;">705010</span>',
+                        '<span style="color:#FF4500; font-size:60px;">015004</span>',
+                        '<span style="color:#FF4500; font-size:60px;">X2</span>',
+                        '<span style="color:#FF4500; font-size:60px;">2</span>',
+                        '<span style="color:#FF4500; font-size:60px;">1200</span>',
+                        '<span style="color:#FF4500; font-size:60px;;">4798</span>',
+                        '<span style="color:#FF4500; font-size:60px;">180</span>',
                     ],
                 ],
                 headerHeight: 60,
@@ -222,12 +106,12 @@
                 evenRowBGC: "rgba(0, 0, 0, 0.6)",
                 headerBGC: "rgba(0, 0, 0, 0.6)",
                 waitTime: 5000,
-                columnWidth: [350, 350, 200, 200, 250, 250, 350],
+                columnWidth: [380, 380, 180, 200, 200, 250, 250],
                 rowNum: 10,
                 align: ["center", "center", "center", "center", "center", "center", "center"],
             },
             IsDetail: true,
-            OrderCreator: {},
+            showMsg:""
         };
     },
     components: {
@@ -240,10 +124,11 @@
             this.updateTime(); // 姣忕鏇存柊鏃堕棿
         }, 1000);
         this.cancelLoading();
-        // this.GetOrderDetail();
+        this.GetOrderDetail();
     },
     beforeDestroy() {
         clearInterval(this.timing);
+        clearInterval(this.timeRequest);
     },
     methods: {
         // 鏇存柊鍖椾含鏃堕棿
@@ -278,42 +163,51 @@
             }, 1000);
         },
         GetOrderDetail() {
-            axios.post("/api/dt_WorkOrder/getWorkOrderInfo", null, "").then((res) => {
+            axios.post("/api/OutLineView/GetOutLineView", null, "").then((res) => {
                 if (res.data.status) {
                     if (res.data.data == null) {
                         return;
                     }
-                    var sp = '</span>';
+                    this.showMsg=res.data.message
                     var arr = [];
-                    res.data.data.dt_WorkOrderDetail.forEach((x) => {
+                    res.data.data.forEach((x) => {
                         var item = [
-                            '<span style="color:#67e0e3;">' + x.layer + '灞�' + sp,
-                            '<span style="color:#9fe6b8;">' + (x.lj_hight == null ? '鏃犻渶娴嬮噺' : x.lj_hight + 'mm') + sp,
-                            '<span style="color:#fb7503;">' + (x.measure_hight == null ? '鏃犻渶娴嬮噺' : x.measure_hight + 'mm') + sp,
-                            '<span style="color:#fb7503;">' + x.lj_is_tolerance + sp,
+                                '<span style="color:#FF4500; font-size:55px;">'+x.palletCode+'</span>',
+                                '<span style="color:#FF4500; font-size:55px;">'+x.orderNo+'</span>',
+                                '<span style="color:#FF4500; font-size:55px;">'+x.materielCode+'</span>',
+                                '<span style="color:#FF4500; font-size:55px;">'+x.machineName+'</span>',
+                                '<span style="color:#FF4500; font-size:55px;">'+x.materialWide+'</span>',
+                                '<span style="color:#FF4500; font-size:55px;;">'+x.originalQuantity+'</span>',
+                                '<span style="color:#FF4500; font-size:55px;">'+x.orderQuantity+'</span>',
                         ];
                         arr.push(item);
                     });
-                    this.OrderCreator = res.data.data;
                     if (this.IsDetail) {
                         this.config = {
                             header: [
-                                '<span style="font-size:18px;">灞傛暟</span>',
-                                '<span style="font-size:18px;">绱鏍囧噯楗煎帤</span>',
-                                '<span style="font-size:18px;">绱楗煎帤</span>',
-                                '<span style="font-size:18px;">娴嬮珮缁撴灉</span>'
+                            '<span style="font-size:50px;">绾稿嵎鏉$爜</span>',
+                            '<span style="font-size:50px;">宸ュ崟鍙�</span>',
+                            '<span style="font-size:50px;">浠g爜</span>',
+                            '<span style="font-size:50px;">涓婃満浣�</span>',
+                            '<span style="font-size:50px;">瀹藉箙</span>',
+                            '<span style="font-size:50px;">绾稿嵎闀�</span>',
+                            '<span style="font-size:50px;">闇�鐢ㄧ焊闀�</span>'
                             ],
                             data: arr,
-                            waitTime: 10000,
-                            rowNum: 15,
-                            columnWidth: [75, 150, 110, 110],
-                            align: ["center", "center", "center", "center"]
+                            headerHeight: 60,
+                            oddRowBGC: "rgba(0, 0, 0, 0.6)",
+                            evenRowBGC: "rgba(0, 0, 0, 0.6)",
+                            headerBGC: "rgba(0, 0, 0, 0.6)",
+                            waitTime: 5000,
+                            columnWidth: [380, 380, 180, 200, 200, 250, 250],
+                            rowNum: 10,
+                            align: ["center", "center", "center", "center", "center", "center", "center"],
                         };
                     } else {
                         this.$refs["scrollBoard"].updateRows(arr)
                     }
                     if (this.IsDetail) {
-                        setInterval(() => {
+                        this.timeRequest = setInterval(() => {
                             this.GetOrderDetail();
                         }, 10000);
                         this.IsDetail = false;
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Common/APIEnum/APIEnum.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Common/APIEnum/APIEnum.cs"
index 0ff1873..38f3572 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Common/APIEnum/APIEnum.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Common/APIEnum/APIEnum.cs"
@@ -80,6 +80,11 @@
         /// 棰勮皟搴︽帴鍙�
         /// </summary>
         [Description("棰勮皟搴︽帴鍙�")]
-        AGV_CTUScheduleTaskTask
+        AGV_CTUScheduleTaskTask,
+        /// <summary>
+        /// MES灏忚溅鍒拌揪閫氱煡
+        /// </summary>
+        [Description("MES灏忚溅鍒拌揪閫氱煡")]
+        MESAvgArriveNotice
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_DTO/MESResponse.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_DTO/MESResponse.cs"
new file mode 100644
index 0000000..15741a2
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_DTO/MESResponse.cs"
@@ -0,0 +1,27 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEA_External.Model
+{
+    /// <summary>
+    /// MES杩斿洖
+    /// </summary>
+    public class MESResponse
+    {
+        /// <summary>
+        /// 鎴愬姛缁撴灉
+        /// </summary>
+        public bool Result { get; set; }
+        /// <summary>
+        /// 杩斿洖淇℃伅
+        /// </summary>
+        public string Msg { get; set; }
+        /// <summary>
+        /// 杩斿洖瀵硅薄
+        /// </summary>
+        public bool Obj { get; set; }
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_DTO/TaskInfo/WMSTaskDTO.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_DTO/TaskInfo/WMSTaskDTO.cs"
index 7374db6..55d9cf3 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_DTO/TaskInfo/WMSTaskDTO.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_DTO/TaskInfo/WMSTaskDTO.cs"
@@ -73,5 +73,13 @@
         public string AGVArea { get; set; }
 
         public int PalletType { get; set; }
+        /// <summary>
+        /// MES璁″垝Id
+        /// </summary>
+        public int DispatchPlanId { get; set; }
+        /// <summary>
+        /// 鍔犲伐涓績
+        /// </summary>
+        public string WorkCentreCode { get; set; }
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
index 6acdd14..fa0e402 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
@@ -99,7 +99,11 @@
         //涓婁紶鏉$爜
 
         WebResponseContent MESBoxCodeNotice(string boxCode);
-        WebResponseContent MESAvgArriveNotice(RequestAGVArriveDTO requestAGVArriveDTO);
+        /// <summary>
+        /// 鍒ゆ柇鍏佽鏀捐揣
+        /// </summary>
+        /// <returns></returns>
+        string MESAvgArriveNotice(RequestAGVArriveDTO requestAGVArriveDTO);
 
         /// <summary>
         /// 鍙犵洏鏈虹敵璇风┖鎵樺叆鎴愬搧搴�
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs"
index cd2cc53..d4d2387 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs"
@@ -205,5 +205,21 @@
         [ExporterHeader(DisplayName = "澶囨敞")]
         [SugarColumn(IsNullable = true, Length = 255, ColumnDescription = "澶囨敞")]
         public string Remark { get; set; }
+
+        /// <summary>
+        /// 鍔犲伐涓績缂栫爜
+        /// </summary>
+        [ImporterHeader(Name = "鍔犲伐涓績缂栫爜")]
+        [ExporterHeader(DisplayName = "鍔犲伐涓績缂栫爜")]
+        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "鍔犲伐涓績缂栫爜")]
+        public string WorkCentreCode { get; set; }
+
+        /// <summary>
+        /// 鐗╂枡缂栧彿
+        /// </summary>
+        [ImporterHeader(Name = "MES璁″垝Id")]
+        [ExporterHeader(DisplayName = "MES璁″垝Id")]
+        [SugarColumn(IsNullable = true, ColumnDescription = "MES璁″垝Id")]
+        public int DispatchPlanId { get; set; }
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs"
index 70ebbef..c9d6b61 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs"
@@ -2,7 +2,9 @@
 using Microsoft.AspNetCore.Http;
 using Microsoft.AspNetCore.Mvc;
 using System.Text;
+using System.Text.RegularExpressions;
 using WIDESEA_DTO.Agv;
+using WIDESEA_External.Model;
 using WIDESEAWCS_Common.TaskEnum;
 using WIDESEAWCS_Core;
 using WIDESEAWCS_Core.Enums;
@@ -70,7 +72,7 @@
                     }
                     else//鍑哄簱鏀捐揣璇锋眰
                     {
-                        var content = PutRequest(task.NextAddress, task.PalletType);
+                        var content = PutRequest(task.NextAddress, task);
                         if (!content.Status)
                         {
                             throw new Exception(content.Message);
@@ -89,7 +91,7 @@
                     }
                     else//鍏ュ簱鏀捐揣璇锋眰
                     {
-                        var content = PutRequest(task.NextAddress, task.TaskNum);
+                        var content = PutRequest(task.NextAddress, task);
                         if (!content.Status)
                         {
                             throw new Exception(content.Message);
@@ -312,7 +314,7 @@
         /// <param name="palletType"></param>
         /// <returns></returns>
         [HttpPost, HttpGet, Route("PutRequest"), AllowAnonymous]
-        public WebResponseContent PutRequest(string code, int taskNum)
+        public WebResponseContent PutRequest(string code, Dt_Task task)
         {
             WebResponseContent content = new WebResponseContent();
             try
@@ -330,14 +332,20 @@
                     {
                         SD_WorkCentreAgvArriveNoticeInfo=new List<AgvArriveNotice> { new AgvArriveNotice()
                         {
-                            DispatchPlanMaterialId=409,
-                            WorkCentreCode="66",
-                            LocationCode="3-ZD-ZJZZ",
-                            CallId="4534c242-27a7-4fb6-86f5-460b09db303d"
+                            DispatchPlanMaterialId=task.DispatchPlanId,
+                            WorkCentreCode=task.WorkCentreCode,
+                            LocationCode=code,
+                            CallId=Guid.NewGuid().ToString().Replace("-","")
                         } }
                     };
-                    WebResponseContent webResponse= _taskService.MESAvgArriveNotice(requestAGVArriveDTO);
-                    if (webResponse.Message.Contains("\"obj\": true"))
+                    MESResponse response = _taskService.MESAvgArriveNotice(requestAGVArriveDTO).DeserializeObject<MESResponse>() ?? throw new Exception("鏈幏鍙栧埌杩斿洖淇℃伅");
+                    if (!response.Result)
+                    {
+                        throw new Exception($"璋冪敤MES灏忚溅鍏佽鏀捐揣鎶ラ敊,MES杩斿洖淇℃伅"+ Regex.Replace(response.Msg, @"\\u([0-9a-fA-F]{4})", match => {
+                            return ((char)Convert.ToInt32(match.Groups[1].Value, 16)).ToString();
+                        }));
+                    }
+                    if (response.Obj)
                     {
                         return content.Error($"鍏佽鍙栨枡");
                     }
@@ -389,7 +397,7 @@
                         bool RequestPut = otherDevice.GetValue<CoveryorDB, bool>(CoveryorDB.C_RequestPut, stationManger.StationDeviceCode);
                         if (!RequestPut)
                         {
-                            otherDevice.SetValue(CoveryorDB.C_InTaskNum, taskNum, stationManger.StationDeviceCode);
+                            otherDevice.SetValue(CoveryorDB.C_InTaskNum, task.TaskNum, stationManger.StationDeviceCode);
                             otherDevice.SetValue(CoveryorDB.C_RequestPut, true, stationManger.StationDeviceCode);
                             Thread.Sleep(1000);
                         }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs"
index 078ae8d..820e628 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -18,7 +18,6 @@
 using Newtonsoft.Json;
 using SqlSugar;
 using System.Diagnostics.CodeAnalysis;
-using System.Threading.Tasks;
 using WIDESEA_DTO.Agv;
 using WIDESEAWCS_Common;
 using WIDESEAWCS_Common.APIEnum;
@@ -524,24 +523,54 @@
             }
             return content;
         }
-        public WebResponseContent MESAvgArriveNotice(RequestAGVArriveDTO requestAGVArriveDTO)
+        /// <summary>
+        /// 鍒ゆ柇鍏佽鏀捐揣
+        /// </summary>
+        /// <returns></returns>
+        public string MESAvgArriveNotice(RequestAGVArriveDTO requestAGVArriveDTO)
         {
-            WebResponseContent content = new WebResponseContent();
+            Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.MESAvgArriveNotice.ToString());
+
+            string response = Post(apiInfo.ApiAddress, JsonConvert.SerializeObject(requestAGVArriveDTO));
+
+            return response;
+        }
+        public static string Post(string serviceAddress, string requestJson = "", string contentType = "application/json", Dictionary<string, string>? headers = null)
+        {
+            string result = string.Empty;
+            DateTime beginDate = DateTime.Now;
             try
             {
-                string address = AppSettings.Get("WMSApiAddress");
-                if (string.IsNullOrEmpty(address))
+                using (HttpContent httpContent = new StringContent(requestJson))
                 {
-                    return WebResponseContent.Instance.Error($"鏈壘鍒癢MSApi鍦板潃");
+                    httpContent.Headers.ContentType = new MediaTypeHeaderValue("application/json");
+
+                    using HttpClient httpClient = new HttpClient();
+                    httpClient.Timeout = new TimeSpan(0, 0, 30);
+                    string LoginToken = AppSettings.Get("MESLoginToken");
+                    headers = new Dictionary<string, string>
+                    {
+                        //姝e紡
+                        { "LoginToken", LoginToken }
+                    };
+                    if (headers != null)
+                    {
+                        foreach (var header in headers)
+                            httpClient.DefaultRequestHeaders.Add(header.Key, header.Value);
+                    }
+                    HttpResponseMessage responseMessage = httpClient.PostAsync(serviceAddress, httpContent).Result;
+                    result = responseMessage.Content.ReadAsStringAsync().Result;
                 }
-                string responseStr = HttpHelper.Post($"{address}/api/Mes/MESAvgArriveNotice", requestAGVArriveDTO.Serialize());
-                return content.OK(responseStr);
+                return result;
             }
-            catch (Exception ex)
+            catch (Exception e)
             {
-                content = WebResponseContent.Instance.Error(ex.Message);
+                throw new Exception(e.Message);
             }
-            return content;
+            finally
+            {
+                Logger.Add(serviceAddress, requestJson == null ? "" : requestJson, result, beginDate);
+            }
         }
         public WebResponseContent CPEmptyInbound(string palletCode,string SourceAddress)
         {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/ConveyorLineJob_YL1ndFloor.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/ConveyorLineJob_YL1ndFloor.cs"
index d35385c..feb8c6f 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/ConveyorLineJob_YL1ndFloor.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/ConveyorLineJob_YL1ndFloor.cs"
@@ -205,6 +205,17 @@
                                 WriteInfo(item.StationCode, $"浠诲姟鍙�:{task.TaskNum}锛孯IFD{task.RfidCode}涓�妤煎嚭搴撹嚦鑰佸巶鎴垮畬鎴�");
                             }
                         }
+                        else if (conveyorLineInfoRead != null && item.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt() && conveyorLineInfoRead.WR_Task <= 0 && !string.IsNullOrEmpty(conveyorLineInfoRead.WR_TMID) && conveyorLineInfoRead.WR_Request == 98) //涓�妤艰�佸巶鍑哄簱鍙e畬鎴�
+                        {
+                            Dt_Task task = _taskRepository.QueryFirst(x => (x.RfidCode == conveyorLineInfoRead.WR_TMID || x.PalletCode== conveyorLineInfoRead.WR_TMID) && _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt() && x.DeviceCode == device.DeviceCode);
+                            if (task != null)
+                            {
+                                //浠诲姟鍥炲
+                                device.SetValue(WR_CLineYLDB.WR_Reresult, 98, item.StationCode);
+                                _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing, deviceCode: "CL3_YL");
+                                WriteInfo(item.StationCode, $"浠诲姟鍙�:{task.TaskNum}锛孯IFD{task.RfidCode}涓�妤煎嚭搴撹嚦鑰佸巶鎴垮畬鎴�");
+                            }
+                        }
                     }
                     else
                     {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC2.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC2.cs"
index 52a3b36..f346954 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC2.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC2.cs"
@@ -23,6 +23,8 @@
 using SqlSugar.Extensions;
 using WIDESEAWCS_Tasks.ConveyorLineJob;
 using WIDESEAWCS_QuartzJob.Repository;
+using WIDESEAWCS_QuartzJob.DTO;
+using WIDESEAWCS_QuartzJob.StackerCrane;
 
 namespace WIDESEAWCS_Tasks
 {
@@ -57,8 +59,14 @@
                     {
                         commonStackerCrane.StackerCraneTaskCompletedEventHandler += CommonStackerCrane_StackerCraneTaskCompletedEventHandler;//璁㈤槄浠诲姟瀹屾垚浜嬩欢
                     }
-                    commonStackerCrane.CheckStackerCraneTaskCompleted();//闃叉浠诲姟瀹屾垚浜嬩欢鐩戞祴瓒呮椂锛屽啀鎵嬪姩瑙﹀彂涓�娆�
-                    if (commonStackerCrane.StackerCraneAutoStatusValue == StackerCraneAutoStatus.Automatic && commonStackerCrane.StackerCraneStatusValue == StackerCraneStatus.Normal && commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.Standby)
+                    //commonStackerCrane.CheckStackerCraneTaskCompleted();//闃叉浠诲姟瀹屾垚浜嬩欢鐩戞祴瓒呮椂锛屽啀鎵嬪姩瑙﹀彂涓�娆�
+                    //鑾峰彇褰撳墠鍫嗗灈鏈虹姸鎬�
+                    if (commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.WorkCompleted)
+                    {
+                        StackerCraneTaskCompletedEventArgs e = new StackerCraneTaskCompletedEventArgs(commonStackerCrane.CurrentTaskNum);
+                        CommonStackerCrane_StackerCraneTaskCompletedEventHandler(commonStackerCrane, e);
+                    }
+                    else if (commonStackerCrane.StackerCraneAutoStatusValue == StackerCraneAutoStatus.Automatic && commonStackerCrane.StackerCraneStatusValue == StackerCraneStatus.Normal && commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.Standby)//鍒ゆ柇涓嬪彂
                     {
                         short stackerError = commonStackerCrane.Communicator.Read<short>("DB1000.54.0");
                         if (stackerError==0)
@@ -98,7 +106,7 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void CommonStackerCrane_StackerCraneTaskCompletedEventHandler(object? sender, WIDESEAWCS_QuartzJob.StackerCrane.StackerCraneTaskCompletedEventArgs e)
+        private void CommonStackerCrane_StackerCraneTaskCompletedEventHandler(object? sender, StackerCraneTaskCompletedEventArgs e)
         {
             CommonStackerCrane? commonStackerCrane = sender as CommonStackerCrane;
             if (commonStackerCrane != null)
@@ -197,6 +205,13 @@
         /// <returns></returns>
         private Dt_Task? GetTask(CommonStackerCrane commonStackerCrane)
         {
+            //鍒ゆ柇鏄惁鏈夋鎵ц鐨勪换鍔★紝濡傛灉鏈夊垯涓嶄笅鍙�
+            Dt_Task? taskOld = _taskRepository.QueryFirst(x => x.DeviceCode == commonStackerCrane.DeviceCode && x.Roadway == commonStackerCrane.DeviceCode && x.TaskState == TaskStatusEnum.SC_Executing.ObjToInt());
+            if (taskOld != null)
+            {
+                return null;
+            }
+
             Dt_Task? task;
             if (commonStackerCrane.LastTaskType == null)
             {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC3.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC3.cs"
index bfcdf92..8b355c0 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC3.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC3.cs"
@@ -25,6 +25,7 @@
 using WIDESEAWCS_Core.Helper;
 using HslCommunication.WebSocket;
 using WIDESEAWCS_DTO.Equipment;
+using WIDESEAWCS_QuartzJob.StackerCrane;
 
 namespace WIDESEAWCS_Tasks
 {
@@ -63,7 +64,14 @@
                         commonStackerCrane.StackerCraneTaskCompletedEventHandler += CommonStackerCrane_StackerCraneTaskCompletedEventHandler;//璁㈤槄浠诲姟瀹屾垚浜嬩欢
                     }
                     commonStackerCrane.CheckStackerCraneTaskCompleted();//闃叉浠诲姟瀹屾垚浜嬩欢鐩戞祴瓒呮椂锛屽啀鎵嬪姩瑙﹀彂涓�娆�
-                    if (commonStackerCrane.StackerCraneAutoStatusValue == StackerCraneAutoStatus.Automatic && commonStackerCrane.StackerCraneStatusValue == StackerCraneStatus.Normal && commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.Standby)
+
+                    //鑾峰彇褰撳墠鍫嗗灈鏈虹姸鎬�
+                    if (commonStackerCrane.CurrentTaskNum>0 && commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.WorkCompleted)
+                    {
+                        StackerCraneTaskCompletedEventArgs e = new StackerCraneTaskCompletedEventArgs(commonStackerCrane.CurrentTaskNum);
+                        CommonStackerCrane_StackerCraneTaskCompletedEventHandler(commonStackerCrane, e);
+                    }
+                    else if (commonStackerCrane.StackerCraneAutoStatusValue == StackerCraneAutoStatus.Automatic && commonStackerCrane.StackerCraneStatusValue == StackerCraneStatus.Normal && commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.Standby)//鍒ゆ柇涓嬪彂
                     {
                         short stackerError = commonStackerCrane.Communicator.Read<short>("DB1000.54.0");
                         if (stackerError == 0)
@@ -122,7 +130,7 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void CommonStackerCrane_StackerCraneTaskCompletedEventHandler(object? sender, WIDESEAWCS_QuartzJob.StackerCrane.StackerCraneTaskCompletedEventArgs e)
+        private void CommonStackerCrane_StackerCraneTaskCompletedEventHandler(object? sender,StackerCraneTaskCompletedEventArgs e)
         {
             CommonStackerCrane? commonStackerCrane = sender as CommonStackerCrane;
             if (commonStackerCrane != null)
@@ -248,6 +256,13 @@
         /// <returns></returns>
         private Dt_Task? GetTask(CommonStackerCrane commonStackerCrane)
         {
+            //鍒ゆ柇鏄惁鏈夋鎵ц鐨勪换鍔★紝濡傛灉鏈夊垯涓嶄笅鍙�
+            Dt_Task? taskOld = _taskRepository.QueryFirst(x => x.DeviceCode == commonStackerCrane.DeviceCode && x.Roadway == commonStackerCrane.DeviceCode && x.TaskState == TaskStatusEnum.SC_Executing.ObjToInt());
+            if (taskOld != null)
+            {
+                return null;
+            }
+
             Dt_Task? task;
             if (commonStackerCrane.LastTaskType == null)
             {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPH.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPH.cs"
index b11f4c0..1fcf99e 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPH.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPH.cs"
@@ -42,7 +42,6 @@
         private readonly IRouterExtension _routerExtension;
         private readonly List<Dt_WarehouseDevice> warehouseDevices;
         private static object lockObj = 0;//
-        private static List<string> strings = new List<string>();
 
         public ConveyorLineJob_CPH(ICacheService cacheService, ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IRouterService routerService, IRouterExtension routerExtension)
         {
@@ -54,14 +53,6 @@
             _routerRepository = routerRepository;
             _routerService = routerService;
             _routerExtension = routerExtension;
-            string boxCodes = AppSettings.Get("BoxCodes");
-            if (!string.IsNullOrEmpty(boxCodes) && strings.Count<=0)
-            {
-                foreach (string s in boxCodes.Split(","))
-                {
-                    strings.Add(s);
-                }
-            }
             string? warehouseDevicesStr = _cacheService.Get<string>(nameof(Dt_WarehouseDevice));
             if (!string.IsNullOrEmpty(warehouseDevicesStr))
             {
@@ -80,19 +71,19 @@
                 if (lockObj.ToString()=="0")
                 {
                     lockObj = 1;
-                    Task task = Task.Run(() =>
+                    Task task = Task.Run(async () =>
                     {
                         try
                         {
-                            while (true)
+                            bool flag = context.JobDetail.JobDataMap.TryGetValue("JobParams", out object? value);
+                            if (flag && value != null)
                             {
-                                bool flag = context.JobDetail.JobDataMap.TryGetValue("JobParams", out object? value);
-                                if (flag && value != null)
+                                //鑾峰彇褰撳墠璁惧
+                                OtherDevice device = (OtherDevice)value;
+                                List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == device.DeviceCode);
+                                Dt_StationManger? RequestIn = stationMangers.FirstOrDefault(x => x.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt());
+                                while (true)
                                 {
-                                    //鑾峰彇褰撳墠璁惧
-                                    OtherDevice device = (OtherDevice)value;
-                                    List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == device.DeviceCode);
-                                    Dt_StationManger? RequestIn = stationMangers.FirstOrDefault(x => x.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt());
                                     if (RequestIn != null)
                                     {
                                         DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == RequestIn.StationCode && x.DeviceProParamType == nameof(R_CLineCPHDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
@@ -103,47 +94,26 @@
                                             //鐮佸灈鐜嚎璇锋眰浠诲姟 
                                             if (conveyorLineInfoRead != null && (conveyorLineInfoRead.R_State == 2 || conveyorLineInfoRead.R_State == 3) && conveyorLineInfoRead.R_TaskNo <= 0 && !string.IsNullOrEmpty(conveyorLineInfoRead.R_BoxCode) && conveyorLineInfoRead.R_Request == 1)
                                             {
-                                                //WebResponseContent content = _taskService.MESBoxCodeNotice(conveyorLineInfoRead.R_BoxCode);
-                                                ////鍚慦MS璇锋眰浠诲姟
-                                                //if (true)
-                                                //{
 
-                                                //}
-                                                //string[] strings = conveyorLineInfoRead.R_BoxCode.Split("-");
-                                                //if (strings.Length==2)
-                                                //{
                                                 #region todo:涓存椂閫昏緫
                                                 //鍐欏叆鎵ц鏁版嵁
-                                                if (strings.FirstOrDefault(x=>x == conveyorLineInfoRead.R_BoxCode)!=null)
+                                                device.SetValue(W_CLineCPHDB.W_TaskNo, 100 + 5, RequestIn.StationCode);
+                                                device.SetValue(W_CLineCPHDB.W_Channel, 14, RequestIn.StationCode);
+                                                device.SetValue(W_CLineCPHDB.W_Long, 485, RequestIn.StationCode);
+                                                device.SetValue(W_CLineCPHDB.W_Wide, 460, RequestIn.StationCode);
+                                                device.SetValue(W_CLineCPHDB.W_High, 420, RequestIn.StationCode);
+                                                device.SetValue(W_CLineCPHDB.W_TMID, conveyorLineInfoRead.R_BoxCode, RequestIn.StationCode);
+                                                device.SetValue(W_CLineCPHDB.W_Request, 1, RequestIn.StationCode);
+                                                WebResponseContent content = _taskService.MESBoxCodeNotice(conveyorLineInfoRead.R_BoxCode);
+                                                if (content.Status)
                                                 {
-                                                    device.SetValue(W_CLineCPHDB.W_TaskNo, 100 + 5, RequestIn.StationCode);
-                                                    device.SetValue(W_CLineCPHDB.W_Channel, 5, RequestIn.StationCode);
-                                                    device.SetValue(W_CLineCPHDB.W_Long, 450, RequestIn.StationCode);
-                                                    device.SetValue(W_CLineCPHDB.W_Wide, 360, RequestIn.StationCode);
-                                                    device.SetValue(W_CLineCPHDB.W_High, 400, RequestIn.StationCode);
-                                                    device.SetValue(W_CLineCPHDB.W_TMID, conveyorLineInfoRead.R_BoxCode, RequestIn.StationCode);
-                                                    device.SetValue(W_CLineCPHDB.W_Request, 1, RequestIn.StationCode);
-                                                    WebResponseContent content = _taskService.MESBoxCodeNotice(conveyorLineInfoRead.R_BoxCode);
-                                                    if (content.Message.Contains("true"))
-                                                    {
-                                                        strings.Remove(conveyorLineInfoRead.R_BoxCode);
-                                                        WriteInfo(RequestIn.StationName, content.Message);
-                                                    }
-                                                    else
-                                                    {
-                                                        WriteError(RequestIn.StationName, content.Message);
-                                                    }
+                                                    WriteInfo(RequestIn.StationName, content.Message);
                                                 }
                                                 else
                                                 {
-                                                    WriteError(RequestIn.StationName, $"鏈壘鍒版潯鐮亄conveyorLineInfoRead.R_BoxCode}鏁版嵁");
+                                                    WriteError(RequestIn.StationName, content.Message);
                                                 }
                                                 #endregion
-                                                //}
-                                                //else
-                                                //{
-                                                //    WriteError(RequestIn.StationName, $"鏁版嵁鎴彇閿欒锛歿strings}");
-                                                //}
                                             }
                                         }
                                         else
@@ -151,7 +121,7 @@
                                             WriteError(RequestIn.StationName, $"鏈壘鍒拌澶囧瓙缂栧彿{RequestIn.StationCode}鐨勫崗璁俊鎭�");
                                         }
                                     }
-                                    foreach (var item in stationMangers.Where(x=>x.StationType==StationTypeEnum.StationType_OnlyOutbound.ObjToInt()))
+                                    foreach (var item in stationMangers.Where(x => x.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt()))
                                     {
                                         DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(R_CLineCPHDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
                                         if (deviceProRead != null)
@@ -171,21 +141,20 @@
                                             }
                                         }
                                     }
-                                    Thread.Sleep(100);
                                 }
                             }
                         }
                         catch (Exception ex)
                         {
-
                             lockObj = 0;
                             WriteError(nameof(ConveyorLineJob_CPH), $"閿欒淇℃伅锛歿ex.Message}");
                         }
-                        
+
                     });
                 }
                 
             }
+            
             return Task.CompletedTask;
         }
     }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/StackerCraneJob_CP.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/StackerCraneJob_CP.cs"
index 50e9cba..2fdc8c7 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/StackerCraneJob_CP.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/StackerCraneJob_CP.cs"
@@ -121,7 +121,7 @@
                 {
                     if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
                     {
-                        Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StackerCraneStationCode == task.NextAddress && x.StackerCraneCode==deviceCode);
+                        Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == task.NextAddress && x.StackerCraneCode==deviceCode);
                         if (stationManger == null)
                         {
                             _taskExecuteDetailService.AddTaskExecuteDetail(taskNum, $"杈撻�佺嚎鍑哄簱绔欑偣鏈厤缃�,{task.NextAddress}");
@@ -182,6 +182,13 @@
         /// <returns></returns>
         private Dt_Task? GetTask(CommonStackerCrane commonStackerCrane)
         {
+            //鍒ゆ柇鏄惁鏈夋鎵ц鐨勪换鍔★紝濡傛灉鏈夊垯涓嶄笅鍙�
+            Dt_Task? taskOld = _taskRepository.QueryFirst(x => x.DeviceCode == commonStackerCrane.DeviceCode && x.Roadway == commonStackerCrane.DeviceCode && x.TaskState == TaskStatusEnum.SC_Executing.ObjToInt());
+            if (taskOld!=null)
+            {
+                return null;
+            }
+
             Dt_Task task;
             if (commonStackerCrane.LastTaskType == null)
             {
@@ -252,8 +259,8 @@
                     short command = client.GetValue<R_ConveyorLineCPDB, short>(R_ConveyorLineCPDB.Command, stationManger.StationCode);
                     if (command==3)//鍑哄簱绔欏彴鏈鍗犵敤
                     {
-                        task.NextAddress = stationManger.StackerCraneStationCode;
-                        _taskRepository.UpdateData(task);
+                        //task.NextAddress = stationManger.StackerCraneStationCode;
+                        //_taskRepository.UpdateData(task);
                         return task;
                     }
                     else
@@ -319,7 +326,8 @@
             }
             else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)//鍒ゆ柇鏄惁鏄嚭搴撲换鍔�
             {
-                string[] targetCodes = task.NextAddress.Split("-");
+                Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == task.NextAddress && x.StackerCraneCode == task.DeviceCode);
+                string[] targetCodes = stationManger.StackerCraneStationCode.Split("-");
                 if (targetCodes.Length == 3)
                 {
                     stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodes[0]);
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\216\245\351\251\263\345\217\260/CoveryorJobYL.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\216\245\351\251\263\345\217\260/CoveryorJobYL.cs"
index 2b9204c..3e158ec 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\216\245\351\251\263\345\217\260/CoveryorJobYL.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\216\245\351\251\263\345\217\260/CoveryorJobYL.cs"
@@ -79,16 +79,12 @@
                     {
                         bool RequestTake = device.GetValue<CoveryorDB, bool>(CoveryorDB.C_RequestTake, item.StationDeviceCode);
                         int OutTaskNum = device.GetValue<CoveryorDB, int>(CoveryorDB.C_OutTaskNum, item.StationDeviceCode);
-                        if (RequestTake && OutTaskNum>0) //涓�妤煎嚭搴撶敵璇�
+                        if (RequestTake && OutTaskNum>0) //鍑哄簱鐢宠
                         {
                             //鑾峰彇褰撳墠浠诲姟
                             Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum ==OutTaskNum && x.NextAddress == item.StationCode && _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt());
                             if (task != null)
                             {
-                                if (true)
-                                {
-
-                                }
                                 //鍒嗛厤宸烽亾 瀛樺叆鎵樼洏鏁版嵁
                                 List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == task.TaskType && task.NextAddress == x.StartPosi);
                                 Dt_Router router = routers.FirstOrDefault();
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\241\201\346\236\266/TrussCartonJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\241\201\346\236\266/TrussCartonJob.cs"
index 5f12377..c49ef1e 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\241\201\346\236\266/TrussCartonJob.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\241\201\346\236\266/TrussCartonJob.cs"
@@ -80,7 +80,7 @@
                         foreach (var item in stationMangers)
                         {
                             //鐮佸灈鐘舵��
-                            bool Call = device.GetValue<R_TrussCartonDB, bool>(GetCartonCall(item.StackerCraneStationCode), item.StackerCraneCode);
+                            bool Call = device.GetValue<R_TrussCartonDB, bool>(GetCartonCall(item.StackerCraneStationCode), device.DeviceCode);
 
                             if (Call && item.IsOccupied == 0)
                             {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/config/buttons.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/config/buttons.js"
index 3dc0f7f..5aaefe5 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/config/buttons.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/config/buttons.js"
@@ -200,6 +200,15 @@
     onClick: function () {
     }
 },
+{
+    name: "鎺� 绋� 鍑� 搴�",
+    icon: '',
+    class: '',
+    value: 'CreateSGManualTasks',
+    type: 'success',
+    onClick: function () {
+    }
+}
 ]
 
 export default buttons
\ No newline at end of file
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/public/webconfig.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/public/webconfig.js"
index 4f1a4a8..8d88f68 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/public/webconfig.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/public/webconfig.js"
@@ -1,5 +1,5 @@
 window.webConfig = {
-    //"webApiBaseUrl": "http://192.168.35.3:9283/",
+    // "webApiBaseUrl": "http://192.168.35.3:9283/",
     "webApiBaseUrl": "http://127.0.0.1:9293/",
     "webApiProduction":"http://192.168.35.3:9283/"
 }
\ No newline at end of file
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/extend/SelectedStock.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/extend/SelectedStock.vue"
index e58e9da..2b10b84 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/extend/SelectedStock.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/extend/SelectedStock.vue"
@@ -124,6 +124,18 @@
           width: 150,
         },
         {
+          prop: "materialWide",
+          title: "鐗╂枡骞呭",
+          type: "string",
+          width: 100,
+        },
+        {
+          prop: "materialWeight",
+          title: "鐗╂枡閲嶉噺",
+          type: "string",
+          width: 100,
+        },
+        {
           prop: "stockId",
           title: "搴撳瓨涓婚敭",
           type: "string",
@@ -150,7 +162,7 @@
         },
         {
           prop: "taskNum",
-          title: "鍑哄簱浠诲姟鍙�",
+          title: "鍑哄簱浠诲姟",
           type: "string",
           width: 100,
         },
@@ -158,13 +170,13 @@
           prop: "palletCode",
           title: "鏉$爜缂栧彿",
           type: "string",
-          width: 150,
+          width: 130,
         },
         {
           prop: "locationCode",
           title: "璐т綅缂栧彿",
           type: "string",
-          width: 180,
+          width: 200,
         },
         {
           prop: "status",
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/extend/outSGOrderDetail.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/extend/outSGOrderDetail.vue"
index 599f8ff..b02081a 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/extend/outSGOrderDetail.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/extend/outSGOrderDetail.vue"
@@ -325,7 +325,7 @@
         this.$refs.child.open(row);
       } else {
         //鐐瑰嚮鎵撳紑鍑哄簱璇︽儏
-        this.$refs.selectedStock.open(row,this.row.outSGOrderNo);
+        this.$refs.selectedStock.open(row,this.row.orderId);
       }
     },
     outbound() {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/outSGOrder.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/outSGOrder.js"
index ce5cafe..72eb4d1 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/outSGOrder.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/outSGOrder.js"
@@ -19,20 +19,43 @@
       onInit() {  
         //鎵╁睍椤甸潰鍒濆鍖栨搷浣�
         this.columns.push({
-          field: '鎿嶄綔',
-          title: '鎿嶄綔',
-          width: 90,
-          fixed: 'right',
-          align: 'center',
-          formatter: (row) => {
-              return (
-                  '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">鏌ョ湅鏄庣粏</i>'
-              );
-          },
-          click: (row) => {
-              this.$refs.gridBody.open(row);
+            field: '鎿嶄綔',
+            title: '鎿嶄綔',
+            width: 90,
+            fixed: 'right',
+            align: 'center',
+            formatter: (row) => {
+                return (
+                    '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">鏌ョ湅鏄庣粏</i>'
+                );
+            },
+            click: (row) => {
+                this.$refs.gridBody.open(row);
+            }
+        });
+        //鍒涘缓鎺掔▼鍑哄簱
+        let OutOrder = this.buttons.find(x => x.value == 'CreateSGManualTasks');
+        if (OutOrder) {
+          OutOrder.onClick = function () {
+            let rows = this.$refs.table.getSelected();
+            if (rows.length == 0) return this.$error("璇烽�夋嫨鏁版嵁!");
+            this.$confirm("纭瑕侀�夋嫨鐨勬暟鎹嚭搴撳槢鍚�?", "璀﹀憡", {
+              confirmButtonText: "纭畾",
+              cancelButtonText: "鍙栨秷",
+              type: "warning",
+              center: true,
+            }).then(() => {
+              var keys = rows.map((x) => x.id);
+              this.http
+                .post("api/Task/CreateSGManualTasks?", keys, "鏁版嵁澶勭悊涓�")
+                .then((x) => {
+                  if (!x.status) return this.$message.error(x.message);
+                  this.$message.success("鎿嶄綔鎴愬姛");
+                  this.refresh();
+                });
+            });
           }
-      });
+        }
       },
       onInited() {
         //妗嗘灦鍒濆鍖栭厤缃悗
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/Index.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/Index.vue"
index 519f89b..a882a94 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/Index.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/Index.vue"
@@ -324,24 +324,24 @@
       });
     };
 
-    const createSocket = (url) => {
-      // 鍒涘缓WebSocket杩炴帴
-      //"ws://127.0.0.1:9295/admin"
-      client = new WebSocket(url);
+    // const createSocket = (url) => {
+    //   // 鍒涘缓WebSocket杩炴帴
+    //   //"ws://127.0.0.1:9295/admin"
+    //   client = new WebSocket(url);
 
-      client.onopen = function () {
-        client.onmessage = handleMessage;
-        store.commit("setWebsocket", client);
-        console.log("WebSocket 杩炴帴鎴愬姛");
-      };
+    //   client.onopen = function () {
+    //     client.onmessage = handleMessage;
+    //     store.commit("setWebsocket", client);
+    //     console.log("WebSocket 杩炴帴鎴愬姛");
+    //   };
 
-      client.onclose = function () {
-        console.log("WebSocket 杩炴帴鍏抽棴");
-        setTimeout(createSocket, 10000);
-      };
-      //鐩戝惉socket閿欒淇℃伅
-      client.onerror = function () {};
-    };
+    //   client.onclose = function () {
+    //     console.log("WebSocket 杩炴帴鍏抽棴");
+    //     setTimeout(createSocket, 10000);
+    //   };
+    //   //鐩戝惉socket閿欒淇℃伅
+    //   client.onerror = function () {};
+    // };
 
     const changeTheme = (name) => {
       if (theme.value != name) {
@@ -606,7 +606,7 @@
         }
       }
 
-      createSocket("ws://127.0.0.1:9296/" + _userInfo.userName);
+      // createSocket("ws://127.0.0.1:9296/" + _userInfo.userName);
 
       Object.assign(_config.$tabs, { open: open, close: close });
 
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/OrderEnum/OutboundOrderMenu.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/OrderEnum/OutboundOrderMenu.cs"
index c950f95..2e29148 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/OrderEnum/OutboundOrderMenu.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/OrderEnum/OutboundOrderMenu.cs"
@@ -50,6 +50,11 @@
         /// 涓�鏈熺敓绠¢鏂�
         /// </summary>
         [Description("涓�鏈熺敓绠¢鏂�")]
-        OutSGPick=1
+        OutSGPick = 1,
+        /// <summary>
+        /// 浜屾湡MES棰嗘枡
+        /// </summary>
+        [Description("浜屾湡MES棰嗘枡")]
+        OutMESPick = 2
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/HttpContextUser/AspNetUser.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/HttpContextUser/AspNetUser.cs"
index 66945ac..4637b01 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/HttpContextUser/AspNetUser.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/HttpContextUser/AspNetUser.cs"
@@ -84,9 +84,9 @@
         public void UpdateToke(string token, int userId)
         {
             if (MenuType == 0)
-                _cacheService.AddOrUpdate(userId.ToString(), token, 21600);
+                _cacheService.AddOrUpdate(userId.ToString(), token);
             else
-                _cacheService.AddOrUpdate(userId.ToString() + "-App", token, 21600);
+                _cacheService.AddOrUpdate(userId.ToString() + "-App", token);
         }
 
         public bool IsSuperAdmin => IsRoleIdSuperAdmin(RoleId);
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/Basic/ERPMaterialDTO.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/Basic/ERPMaterialDTO.cs"
index 5ece8de..9a3b1bf 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/Basic/ERPMaterialDTO.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/Basic/ERPMaterialDTO.cs"
@@ -85,9 +85,14 @@
         public string WarehouseCode { get; set; }
 
         /// <summary>
-        /// 璁¢噺鍗曚綅锛圞g锛氬崈鍏嬶級
+        /// 璁¢噺鍗曚綅
         /// </summary>
         [PropertyValidate("璁¢噺鍗曚綅锛欿g:鍏枻銆丮锛氱背銆丳cs锛氫釜(鍙�)", NotNullAndEmpty = true)]
         public string Unit { get; set; }
+        /// <summary>
+        /// 璁¢噺鍗曚綅
+        /// </summary>
+        [PropertyValidate("璁¢噺鍗曚綅锛欿g:鍏枻銆丮锛氱背銆丳cs锛氫釜(鍙�)", NotNullAndEmpty = true)]
+        public string AssistUnitCode { get; set; }
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/ERP/BSTPickInfoDTO.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/ERP/BSTPickInfoDTO.cs"
index dcfe9ea..6fbc529 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/ERP/BSTPickInfoDTO.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/ERP/BSTPickInfoDTO.cs"
@@ -50,7 +50,7 @@
         public List<PaperMattakeDetailItem> PaperMattakeDetails { get; set; }
     }
     /// <summary>
-    /// 鐢熶骇鎺掔▼鏄庣粏
+    /// 鐢熶骇鎺掔▼棰嗙敤鏄庣粏
     /// </summary>
     public class PaperMattakeDetailItem
     {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/ERP/BSTStockInfoDTO.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/ERP/BSTStockInfoDTO.cs"
index 7ebce58..7d004ac 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/ERP/BSTStockInfoDTO.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/ERP/BSTStockInfoDTO.cs"
@@ -28,7 +28,7 @@
         /// </summary>
         public string ReceiptDate { get; set; }
         /// <summary>
-        /// 榫欏埄寰�150g鐧藉崱
+        /// 鐗╂枡鍚嶇О
         /// </summary>
         public string MaterialName { get; set; }
         /// <summary>
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/ERP/SGOutOrderDTO.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/ERP/SGOutOrderDTO.cs"
index e6343fa..5143ed0 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/ERP/SGOutOrderDTO.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/ERP/SGOutOrderDTO.cs"
@@ -89,5 +89,17 @@
         /// </summary>
         [PropertyValidate("鐢熶骇宸ュ崟鍙�", NotNullAndEmpty = true)]
         public string OrderId { get; set; }
+
+        /// <summary>
+        /// 宸ュ崟鐢ㄧ焊搴忓彿(涓婃父)
+        /// </summary>
+        [PropertyValidate("宸ュ崟鐢ㄧ焊搴忓彿", NotNullAndEmpty = true)]
+        public int Number { get; set; }
+
+        /// <summary>
+        /// 澶囨敞(涓婃父)
+        /// </summary>
+        [PropertyValidate("宸ュ崟鐢ㄧ焊搴忓彿", NotNullAndEmpty = true)]
+        public string Remark { get; set; }
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/MES/MESReturnIssueDTO.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/MES/MESReturnIssueDTO.cs"
index 89bc658..196c8d0 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/MES/MESReturnIssueDTO.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/MES/MESReturnIssueDTO.cs"
@@ -14,22 +14,23 @@
     public class MESReturnIssueDTO
     {
         /// <summary>
-        /// 鍑哄簱鏉ユ簮鏄庣粏ID
-        /// </summary>
-        [PropertyValidate("鍑哄簱鏉ユ簮鏄庣粏ID", NotNullAndEmpty = true)]
-        public int OutDetailId { get; set; }
-
-        /// <summary>
         /// 鍛煎彨Id
         /// </summary>
         [PropertyValidate("鍛煎彨Id", NotNullAndEmpty = true)]
         public string IssueId { get; set; }
 
         /// <summary>
+        /// 鍔犲伐涓績
+        /// </summary>
+        [PropertyValidate("鍔犲伐涓績", NotNullAndEmpty = true)]
+        public string MakeCode { get; set; }
+
+        /// <summary>
         /// 鍛ㄨ浆浣嶇疆缂栧彿
         /// </summary>
         [PropertyValidate("鍛ㄨ浆浣嶇疆缂栧彿", NotNullAndEmpty = true)]
         public string PointCode { get; set; }
+
         /// <summary>
         /// 浣欐枡淇℃伅
         /// </summary>
@@ -62,10 +63,10 @@
         [PropertyValidate("閫�鏂欐暟閲�", NotNullAndEmpty = true)]
         public decimal ReturnQuantity { get; set; }
         /// <summary>
-        /// 鏄惁棰嗘枡锛�1鏈鏂� 0宸蹭复鏂欙級
+        /// 鏄惁棰嗘枡锛�1鏈鏂� 0宸查鏂欙級
         /// </summary>
-        [PropertyValidate("鏄惁棰嗘枡锛�1鏈鏂� 0宸蹭复鏂欙級", NotNullAndEmpty = true)]
-        public string Whether { get; set; }
+        [PropertyValidate("鏄惁棰嗘枡锛�1鏈鏂� 0宸查鏂欙級", NotNullAndEmpty = true)]
+        public int Whether { get; set; }
         /// <summary>
         /// 閫�鏂欏伐鍗曞彿(ERP鐩稿叧)
         /// </summary>
@@ -75,7 +76,7 @@
         /// 鐩村緞
         /// </summary>
         [PropertyValidate("鐩村緞", NotNullAndEmpty = true)]
-        public string Thickness { get; set; }
+        public decimal Thickness { get; set; }
         /// <summary>
         /// 骞呭
         /// </summary>
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/Task/WMSTaskDTO.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/Task/WMSTaskDTO.cs"
index b9873cb..c6e515e 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/Task/WMSTaskDTO.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/Task/WMSTaskDTO.cs"
@@ -85,6 +85,14 @@
         /// 
         /// </summary>
         public int PalletType { get; set; }
+        /// <summary>
+        /// MES璁″垝Id
+        /// </summary>
+        public int DispatchPlanId { get; set; }
+        /// <summary>
+        /// 鍔犲伐涓績
+        /// </summary>
+        public string WorkCentreCode { get; set; }
 
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/Model/MESDeliveryModel.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/Model/MESDeliveryModel.cs"
index e0aab7f..f42d71a 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/Model/MESDeliveryModel.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/Model/MESDeliveryModel.cs"
@@ -35,7 +35,7 @@
         /// <summary>
         /// 鏁伴噺
         /// </summary>
-        public int MainQuantity { get; set; }
+        public decimal MainQuantity { get; set; }
         /// <summary>
         /// 杈呭崟浣嶇紪鐮�
         /// </summary>
@@ -47,7 +47,7 @@
         /// <summary>
         /// 浠撳簱缂栫爜
         /// </summary>
-        public string StockInfoCode { get; set; }
+        public string StockInfoCode { get; set; } = "CKDA003";
         /// <summary>
         /// 鎵瑰彿
         /// </summary>
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IInboundService/IMESProInOrderInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IInboundService/IMESProInOrderInfoService.cs"
index e583a36..f31d84b 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IInboundService/IMESProInOrderInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IInboundService/IMESProInOrderInfoService.cs"
@@ -15,12 +15,10 @@
     {
         IMESProInOrderInfoRepository Repository { get; }
         /// <summary>
-        /// 鎴愬搧/鍗婃垚鍝佷俊鎭悓姝ユ帴鍙�
-        /// </summary>
-        WebResponseContent ReceiveProCodeInfo(List<MESProInDTO> proInDTOs);
-        /// <summary>
         /// MES宸ュ崟鍋滄鎺ュ彛
         /// </summary>
         WebResponseContent ReceiveProOrderStop(MESOrderStopDTO orderStopDTO);
+
+        WebResponseContent MESBoxCode(string boxCode);
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutLineViewRepository.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutLineViewRepository.cs"
new file mode 100644
index 0000000..2c8c57f
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutLineViewRepository.cs"
@@ -0,0 +1,17 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core.BaseRepository;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_IOutboundRepository
+{
+    /// <summary>
+    /// 鑰佸巶鍑哄簱绾夸綋缂撳瓨浠撳偍鎺ュ彛灞�
+    /// </summary>
+    public interface IOutLineViewRepository : IRepository<Dt_OutLineView>
+    {
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutboundRepository.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutboundRepository.cs"
index 97de639..c0087ac 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutboundRepository.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutboundRepository.cs"
@@ -40,6 +40,9 @@
         /// 鎴愬搧閿�鍞嚭搴撴槑缁嗕粨鍌ㄦ帴鍙e眰
         /// </summary>
         IProDeliveryOrderDetailRepository ProDeliveryOrderDetailRepository { get; }
-
+        /// <summary>
+        /// 鑰佸巶绾夸綋缂撳瓨浠撳偍鎺ュ彛灞�
+        /// </summary>
+        IOutLineViewRepository OutLineViewRepository { get; }
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutLineViewService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutLineViewService.cs"
new file mode 100644
index 0000000..0f58d5f
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutLineViewService.cs"
@@ -0,0 +1,26 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core;
+using WIDESEA_Core.BaseServices;
+using WIDESEA_IOutboundRepository;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_IOutboundService
+{
+    public interface IOutLineViewService : IService<Dt_OutLineView>
+    {
+        IOutLineViewRepository Repository { get; }
+        /// <summary>
+        /// 瀛樺叆鏈�鏂扮殑鍑哄簱绾稿嵎淇℃伅
+        /// </summary>
+        WebResponseContent SaveLineView(List<Dt_OutStockLockInfo> outStockLockInfos);
+        /// <summary>
+        /// 鑾峰彇绾夸綋鍘熺焊
+        /// </summary>
+        /// <returns></returns>
+        WebResponseContent GetOutLineView();
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutboundService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutboundService.cs"
index a815eb1..7652437 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutboundService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutboundService.cs"
@@ -28,5 +28,9 @@
         /// 鍑哄簱璇︽儏涓氬姟鎺ュ彛灞�
         /// </summary>
         IOutStockLockInfoService OutStockLockInfoService { get; }
+        /// <summary>
+        /// 鑰佸巶绾夸綋缂撳瓨涓氬姟鎺ュ彛灞�
+        /// </summary>
+        IOutLineViewService OutLineViewService { get; }
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IStockService/IStockInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IStockService/IStockInfoService.cs"
index dd46554..323451d 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IStockService/IStockInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IStockService/IStockInfoService.cs"
@@ -1,4 +1,5 @@
-锘縰sing System;
+锘縰sing OfficeOpenXml.FormulaParsing.Excel.Operators;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
@@ -20,6 +21,11 @@
         /// </summary>
         WebResponseContent ManualMaterielGroup(SaveModel saveModel);
         /// <summary>
+        /// 鏇存柊鑰佸巶娈嬪嵎搴撳瓨
+        /// </summary>
+        /// <returns></returns>
+        WebResponseContent UpBSTStock(int operate);
+        /// <summary>
         /// 鑾峰彇鍙娇鐢ㄥ簱瀛�
         /// </summary>
         List<Dt_StockInfo> GetUseableStocks(int materielId,decimal width, int warehoseId);
@@ -35,5 +41,10 @@
         /// 鍒嗛厤瀹為檯搴撳瓨
         /// </summary>
         List<Dt_StockInfo> GetOutboundStocks(List<Dt_StockInfo> stockInfos, decimal needQuantity);
+
+        /// <summary>
+        /// 鍒嗛厤鑰佸巶搴撳瓨
+        /// </summary>
+        List<Dt_StockInfo> GetOutOldStocks(List<Dt_StockInfo> stockInfos, decimal needQuantity);
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs"
index 00a5e34..88fc6d7 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs"
@@ -252,6 +252,13 @@
         /// </summary>
         /// <param name="bSTPickInfoDTO"></param>
         /// <returns></returns>
-        WebResponseContent ReceivePicking(BSTPickInfoDTO bSTPickInfoDTO);
+        WebResponseContent ReceivePicking(List<BSTPickInfoDTO> bSTPickInfoDTOs);
+
+        /// <summary>
+        /// 鍒涘缓鐢熺鎵嬪姩鍑哄簱
+        /// </summary>
+        /// <param name="ids"></param>
+        /// <returns></returns>
+        WebResponseContent CreateSGManualTasks(List<int> ids);
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_InboundService/InboundOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_InboundService/InboundOrderService.cs"
index 07dfa8c..a615e70 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_InboundService/InboundOrderService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_InboundService/InboundOrderService.cs"
@@ -56,9 +56,10 @@
                 {
                     return content.Error($"鍏ュ簱鏉$爜{nameof(inboundDetailItem.BarCode)}:{inboundDetailItem.BarCode}鐗╂枡:{inboundDetailItem.MaterialCode}涓嶅瓨鍦�");
                 }
-                //鑾峰彇鎵�鏈夐噰璐俊鎭�
+                //鑾峰彇鎵�鏈夊叆搴撲俊鎭�
                 List<Dt_InboundOrder> inboundOrdersOld = BaseDal.Db.Queryable<Dt_InboundOrder>().Includes(x => x.Details).ToList();
-
+                //鑾峰彇鎵�鏈夊叆搴撴槑缁嗕俊鎭�
+                List<Dt_InboundOrderDetail> inboundOrderDetailsOld = inboundOrdersOld.SelectMany(x=>x.Details).ToList();
                 if (eRPInboundOrderDTO.OperateType == 1)
                 {
                     //鍒ゆ柇閲嶅鎻掑叆
@@ -76,6 +77,10 @@
                         {
                             throw new Exception($"鐗╂枡{x.MaterialCode}鏉$爜{x.BarCode}鐩村緞闇�澶т簬0");
                         }
+                        if (inboundOrderDetailsOld.FirstOrDefault(t=>t.BarCode==x.BarCode)!=null)
+                        {
+                            throw new Exception($"鍏ュ簱鍗晎inboundOrder.UpperOrderNo}{x.MaterialCode}鏉$爜{x.BarCode}宸插瓨鍦�");
+                        }
                         x.MaterialName = materielInfo?.MaterielName;
                         x.Unit = materielInfo?.MaterielUnit;
                         x.MaterialSpec = materielInfo.MaterielSpec;
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_InboundService/MESProInOrderInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_InboundService/MESProInOrderInfoService.cs"
index 755c45e..4096a29 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_InboundService/MESProInOrderInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_InboundService/MESProInOrderInfoService.cs"
@@ -3,6 +3,7 @@
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
+using System.Text.RegularExpressions;
 using System.Threading.Tasks;
 using WIDESEA_Common.MaterielEnum;
 using WIDESEA_Common.OrderEnum;
@@ -11,6 +12,8 @@
 using WIDESEA_Core.BaseServices;
 using WIDESEA_Core.Helper;
 using WIDESEA_DTO.MES;
+using WIDESEA_External.MESService;
+using WIDESEA_External.Model;
 using WIDESEA_IBasicRepository;
 using WIDESEA_IInboundRepository;
 using WIDESEA_IInboundService;
@@ -24,75 +27,15 @@
         private readonly IBasicRepository _basicRepository;
         private readonly IAGVStationInfoRepository _agvStationInfoRepository;
         private readonly IMapper _mapper;
-        public MESProInOrderInfoService(IMESProInOrderInfoRepository BaseDal,IBasicRepository basicRepository,IMapper mapper, IAGVStationInfoRepository agvStationInfoRepository) : base(BaseDal)
+        private readonly IInvokeMESService _invokeMESService;
+        public MESProInOrderInfoService(IMESProInOrderInfoRepository BaseDal,IBasicRepository basicRepository,IMapper mapper, IAGVStationInfoRepository agvStationInfoRepository,IInvokeMESService invokeMESService) : base(BaseDal)
         {
             _basicRepository = basicRepository;
             _mapper = mapper;
             _agvStationInfoRepository = agvStationInfoRepository;
+            _invokeMESService = invokeMESService;
         }
 
-        /// <summary>
-        /// 鎴愬搧/鍗婃垚鍝佷俊鎭悓姝ユ帴鍙�
-        /// </summary>
-        public WebResponseContent ReceiveProCodeInfo(List<MESProInDTO> proInDTOs)
-        {
-            WebResponseContent content = new WebResponseContent();
-            try
-            {
-                if (proInDTOs==null || proInDTOs.Count<=0)
-                {
-                    return content.Error("浼犲叆淇℃伅涓虹┖");
-                }
-                //鑾峰彇鎵�鏈夋垚鍝侊紝鍗婃垚鍝佷俊鎭�
-                List<Dt_MESProInOrderInfo> proInOrderInfos = BaseDal.QueryData();
-                //鑾峰彇鎵�鏈夌墿鏂欎俊鎭�
-                List<Dt_MaterielInfo> materielInfos = _basicRepository.MaterielInfoRepository.QueryData(x => x.MaterielInvOrgId == MaterielInvOrgEnum.鏂板巶.ObjToInt());
-                
-                MESProInDTO? CheckMaterialCode = proInDTOs.FirstOrDefault(x => !materielInfos.Select(x => x.MaterielCode).Contains(x.MaterialCode));
-                if (CheckMaterialCode != null)
-                {
-                    return content.Error($"鐗╂枡缂栫爜{nameof(MESProInDTO.MaterialCode)}:{CheckMaterialCode.MaterialCode}淇℃伅涓嶅瓨鍦�");
-                }
-                //鑾峰彇鎵�鏈堿GV鐐逛綅
-                List<Dt_AGVStationInfo> aGVStationInfos = _agvStationInfoRepository.QueryData(x => !string.IsNullOrEmpty(x.MESPointCode));
-                
-                //鍒ゆ柇鏄惁瀛樺湪閲嶅
-                MESProInDTO? proInDTO = proInDTOs.FirstOrDefault(x=>x.IsMantissa==false && proInOrderInfos.Select(x=>x.BarCode).Contains(x.BarCode));
-                if (proInDTO!=null)
-                {
-                    return content.Error($"{proInDTO.ProductOrderNo}鐢熶骇宸ュ崟{proInDTO.BarCode}鏉$爜宸插瓨鍦�");
-                }
-                Dt_MESProInOrderInfo? proInOrderInfo = proInOrderInfos.FirstOrDefault(x=>x.MESProInStatus==InOrderStatusEnum.鍏抽棴.ObjToInt() && proInDTOs.Select(x=>x.ProductOrderNo).Distinct().Contains(x.ProductOrderNo));
-                if (proInOrderInfo != null)
-                {
-                    return content.Error($"{proInOrderInfo.ProductOrderNo}鐢熶骇宸ュ崟宸插叧闂�");
-                }
-                List<Dt_MESProInOrderInfo> AddMESProInOrders = new List<Dt_MESProInOrderInfo>();
-                foreach (var item in proInDTOs)
-                {
-                    Dt_MaterielInfo materielInfo = materielInfos.FirstOrDefault(x=>x.MaterielCode== item.MaterialCode);
-                    if (materielInfo.MaterielSourceType!=MaterielTypeEnum.鎴愬搧.ObjToInt())
-                    {
-                        Dt_AGVStationInfo? CheckPointCode = aGVStationInfos.FirstOrDefault(x=>x.MESPointCode==item?.PointCode);
-                        if (CheckPointCode == null)
-                        {
-                            return content.Error($"鍛ㄨ浆浣峽nameof(MESReturnIssueDTO.PointCode)}{item?.PointCode}涓嶅瓨鍦�,浠呮垚鍝佺墿鏂欏彲涓嶄紶");
-                        }
-                    }
-                    Dt_MESProInOrderInfo AddproInOrderInfo = _mapper.Map<Dt_MESProInOrderInfo>(item);
-                    AddproInOrderInfo.WarehouseId = materielInfo.WarehouseId;
-                    AddproInOrderInfo.MESProOrderType = materielInfo.MaterielSourceType;
-                    AddMESProInOrders.Add(AddproInOrderInfo);
-                }
-                BaseDal.AddData(AddMESProInOrders);
-                content.OK("鎺ユ敹鎴愬姛");
-            }
-            catch (Exception ex)
-            {
-                content.Error(ex.Message);
-            }
-            return content;
-        }
         /// <summary>
         /// MES宸ュ崟鍋滄鎺ュ彛
         /// </summary>
@@ -107,14 +50,14 @@
                     return content.Error("浼犲叆淇℃伅涓嶈兘涓虹┖");
                 }
                 //鑾峰彇瀵瑰簲鍗曟嵁
-                List<Dt_MESProInOrderInfo>? mESProInOrderInfos = BaseDal.QueryData(x => x.ProductOrderNo == orderStopDTO.ProductOrderNo && x.MESProInStatus != OutOrderStatusEnum.鍏抽棴.ObjToInt());
+                List<Dt_MESProInOrderInfo>? mESProInOrderInfos = BaseDal.QueryData(x => x.ProductOrderNo == orderStopDTO.ProductOrderNo && x.MESProInStatus != InOrderStatusEnum.鍏抽棴.ObjToInt());
                 if (mESProInOrderInfos == null || mESProInOrderInfos.Count <= 0)
                 {
                     return content.Error($"鎴愬搧鎴栧崐鎴愬搧宸ュ崟{nameof(MESOrderStopDTO.ProductOrderNo)}{orderStopDTO.ProductOrderNo}涓嶅瓨鍦ㄦ垨宸插叧闂�");
                 }
                 mESProInOrderInfos.ForEach(x =>
                 {
-                    x.MESProInStatus = OutOrderStatusEnum.鍏抽棴.ObjToInt();
+                    x.MESProInStatus = InOrderStatusEnum.鍏抽棴.ObjToInt();
                 });
                 BaseDal.UpdateData(mESProInOrderInfos);
                 content.OK($"宸ュ崟{nameof(MESOrderStopDTO.ProductOrderNo)}{orderStopDTO.ProductOrderNo}鍋滄鎴愬姛");
@@ -125,5 +68,49 @@
             }
             return content;
         }
+        /// <summary>
+        /// MES宸ュ崟鍋滄鎺ュ彛
+        /// </summary>
+        /// <summary>
+        public WebResponseContent MESBoxCode(string boxCode)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                if (boxCode.IsNullOrEmpty())
+                {
+                    return content.Error("浼犲叆淇℃伅涓嶈兘涓虹┖");
+                }
+                //鑾峰彇瀵瑰簲鍗曟嵁
+                Dt_MESProInOrderInfo mESProInOrderInfo = BaseDal.QueryFirst(x => x.BarCode == boxCode);
+                if (mESProInOrderInfo == null)
+                {
+                    return content.Error($"鎴愬搧鏉$爜{boxCode}涓嶅瓨鍦�");
+                }
+                if (mESProInOrderInfo.MESProInStatus==InOrderStatusEnum.鍏ュ簱瀹屾垚.ObjToInt())
+                {
+                    return content.Error($"鎴愬搧鏉$爜{boxCode}宸插叆搴�");
+                }
+                mESProInOrderInfo.MESProInStatus = InOrderStatusEnum.鍏ュ簱瀹屾垚.ObjToInt();
+                MESResponse response = _invokeMESService.MESBoxCodeNotice(boxCode).DeserializeObject<MESResponse>() ?? throw new Exception("鏈幏鍙栧埌MES杩斿洖淇℃伅");
+                if (!response.Result)
+                {
+                    throw new Exception($"MES閰嶉�佸嚭鍙戞帴鍙h皟鐢ㄦ姤閿�,MES杩斿洖淇℃伅{DecodeUnicode(response.Msg)}");
+                }
+                BaseDal.UpdateData(mESProInOrderInfo);
+                content.OK($"鎴愬搧鏉$爜{boxCode}鎵爜鍏ュ簱");
+            }
+            catch (Exception ex)
+            {
+                content.Error(ex.Message);
+            }
+            return content;
+        }
+        public static string DecodeUnicode(string input)
+        {
+            return Regex.Replace(input, @"\\u([0-9a-fA-F]{4})", match => {
+                return ((char)Convert.ToInt32(match.Groups[1].Value, 16)).ToString();
+            });
+        }
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_InboundService/PurchaseOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_InboundService/PurchaseOrderService.cs"
index 60b96be..ee38920 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_InboundService/PurchaseOrderService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_InboundService/PurchaseOrderService.cs"
@@ -116,7 +116,7 @@
                 }
                 //鑾峰彇鎵�鏈夐噰璐俊鎭�
                 List<Dt_PurchaseOrder> purchaseOrdersOld = BaseDal.Db.Queryable<Dt_PurchaseOrder>().Includes(x=>x.Details).ToList();
-
+                List<Dt_PurchaseOrderDetail> purchaseOrderDetailsOld = purchaseOrdersOld.SelectMany(x => x.Details).ToList();
                 if (eRPPurchaseOrderDTO.OperateType == 1)
                 {
                     //鍒ゆ柇閲嶅鎻掑叆
@@ -130,6 +130,10 @@
                     purchaseOrderDetails.ForEach(x =>
                     {
                         Dt_MaterielInfo? materielInfo = materielInfos.FirstOrDefault(t => t.MaterielCode == x.MaterialCode);
+                        if (materielInfo != null)
+                        {
+
+                        }
                         x.MaterielName = materielInfo?.MaterielName;
                         x.Unit = materielInfo?.MaterielUnit;
                         x.MaterielSpec=  materielInfo?.MaterielSpec;
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Basic/Dt_MaterielInfo.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Basic/Dt_MaterielInfo.cs"
index cfb31f2..d116aef 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Basic/Dt_MaterielInfo.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Basic/Dt_MaterielInfo.cs"
@@ -96,6 +96,12 @@
         public string MaterielUnit { get; set; }
 
         /// <summary>
+        /// 杈呭崟浣�
+        /// </summary>
+        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "杈呭崟浣�")]
+        public string AssistUnitCode { get; set; }
+
+        /// <summary>
         /// 鐗╂枡鐘舵��(0:绂佺敤銆�1:鍙敤)
         /// </summary>
         [SugarColumn(IsNullable = false, ColumnDescription = "鐗╂枡鐘舵��(0:绂佺敤銆�1:鍙敤)")]
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Inbound/Dt_MESProInOrderInfo.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Inbound/Dt_MESProInOrderInfo.cs"
index 64a43ca..35a86cf 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Inbound/Dt_MESProInOrderInfo.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Inbound/Dt_MESProInOrderInfo.cs"
@@ -91,7 +91,7 @@
         /// <summary>
         /// 浣嶇疆缂栧彿
         /// </summary>
-        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "浣嶇疆缂栧彿")]
+        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "浣嶇疆缂栧彿")]
         public string PointCode { get; set; }
 
         /// <summary>
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutLineView.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutLineView.cs"
new file mode 100644
index 0000000..7f7cdd3
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutLineView.cs"
@@ -0,0 +1,104 @@
+锘縰sing SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core.Attributes;
+using WIDESEA_Core.CodeConfigEnum;
+using WIDESEA_Core.DB.Models;
+
+namespace WIDESEA_Model.Models
+{
+    /// <summary>
+    /// 鑰佸巶鍑哄簱绾夸綋缂撳瓨
+    /// </summary>
+    [SugarTable(nameof(Dt_OutLineView), "鑰佸巶鍑哄簱绾夸綋缂撳瓨"), ModelValidate]
+    public class Dt_OutLineView : BaseEntity
+    {
+        /// <summary>
+        /// 涓婚敭
+        /// </summary>
+        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")]
+        public int Id { get; set; }
+
+        /// <summary>
+        /// 鍗曟嵁缂栧彿
+        /// </summary>
+        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍗曟嵁缂栧彿")]
+        public string OrderNo { get; set; }
+
+        /// <summary>
+        /// 鍗曟嵁鏄庣粏涓婚敭
+        /// </summary>
+        [SugarColumn(IsNullable = false, ColumnDescription = "鍗曟嵁鏄庣粏涓婚敭")]
+        public int OrderDetailId { get; set; }
+
+        /// <summary>
+        /// 鐗╂枡缂栧彿
+        /// </summary>
+        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鐗╂枡缂栧彿")]
+        public string MaterielCode { get; set; }
+
+        /// <summary>
+        /// 鐗╂枡鍚嶇О
+        /// </summary>
+        [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "鐗╂枡鍚嶇О")]
+        public string MaterielName { get; set; }
+
+        /// <summary>
+        /// 鍗曟嵁鏁伴噺
+        /// </summary>
+        [SugarColumn(IsNullable = false, ColumnDescription = "鍗曟嵁鏁伴噺")]
+        public decimal OrderQuantity { get; set; }
+
+        /// <summary>
+        /// 鍘熷搴撳瓨閲�
+        /// </summary>
+        [SugarColumn(IsNullable = false, ColumnDescription = "鍘熷搴撳瓨閲�")]
+        public decimal OriginalQuantity { get; set; }
+
+        /// <summary>
+        /// 鍒嗛厤鍑哄簱閲�
+        /// </summary>
+        [SugarColumn(IsNullable = false, ColumnDescription = "鍒嗛厤鍑哄簱閲�")]
+        public decimal AssignQuantity { get; set; }
+
+        /// <summary>
+        /// 鏉$爜缂栧彿
+        /// </summary>
+        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鏉$爜缂栧彿")]
+        public string PalletCode { get; set; }
+
+        /// <summary>
+        /// 鏈哄彴浣嶇疆
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDescription = "鏈哄彴浣嶇疆")]
+        public string MachineName { get; set; }
+
+        /// <summary>
+        /// 鐗╂枡骞呭
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDescription = "鐗╂枡骞呭")]
+        public decimal? MaterialWide { get; set; }
+
+        /// <summary>
+        /// 鐗╂枡閲嶉噺
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDescription = "鐗╂枡閲嶉噺")]
+        public decimal? MaterialWeight { get; set; }
+
+        /// <summary>
+        /// 鍗曚綅
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDescription = "鍗曚綅")]
+        public string Unit { get; set; }
+
+
+        /// <summary>
+        /// 浠诲姟鍙�
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDescription = "浠诲姟鍙�")]
+        public int? TaskNum { get; set; }
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutMESOrder.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutMESOrder.cs"
index 92d5ac5..7f38ba1 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutMESOrder.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutMESOrder.cs"
@@ -120,6 +120,18 @@
         public decimal OutTotalUsage { get; set; }
 
         /// <summary>
+        /// 鍩烘湰鍗曚綅
+        /// </summary>
+        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍩烘湰鍗曚綅")]
+        public string MaterielUnit { get; set; }
+
+        /// <summary>
+        /// 杈呭崟浣�
+        /// </summary>
+        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "杈呭崟浣�")]
+        public string AssistUnitCode { get; set; }
+
+        /// <summary>
         /// 澶囨敞
         /// </summary>
         [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "澶囨敞")]
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutSGOrder.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutSGOrder.cs"
index feed1bd..60d83f3 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutSGOrder.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutSGOrder.cs"
@@ -55,6 +55,12 @@
         public string ShortName { get; set; }
 
         /// <summary>
+        /// 宸ュ崟鐢ㄧ焊搴忓彿
+        /// </summary>
+        [SugarColumn(IsNullable = false,  ColumnDescription = "宸ュ崟鐢ㄧ焊搴忓彿")]
+        public int Number { get; set; }
+
+        /// <summary>
         /// 鍑哄簱鍗曠姸鎬�
         /// </summary>
         [SugarColumn(IsNullable = false, ColumnDescription = "鍑哄簱鍗曠姸鎬�")]
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutSGOrderDetail.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutSGOrderDetail.cs"
index dcdb75d..fa425d3 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutSGOrderDetail.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutSGOrderDetail.cs"
@@ -111,6 +111,12 @@
         public string MaterialName { get; set; }
 
         /// <summary>
+        /// 澶囨敞(涓婃父)
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDescription = "澶囨敞(涓婃父)")]
+        public string Remark { get; set; }
+
+        /// <summary>
         /// 鍑哄簱鍗曟槑缁嗙姸鎬�
         /// </summary>
         [SugarColumn(IsNullable = false, ColumnDescription = "鍑哄簱鍗曟槑缁嗙姸鎬�")]
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutStockLockInfo.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutStockLockInfo.cs"
index 57eedca..1e1cc51 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutStockLockInfo.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutStockLockInfo.cs"
@@ -106,6 +106,12 @@
         public string Unit { get; set; }
 
         /// <summary>
+        /// 杈呭崟浣�
+        /// </summary>
+        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "杈呭崟浣�")]
+        public string AssistUnit { get; set; }
+
+        /// <summary>
         /// 鏈哄彴浣嶇疆
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDescription = "鏈哄彴浣嶇疆")]
@@ -116,6 +122,16 @@
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDescription = "鍔犲伐涓績")]
         public string MakeCode { get; set; }
+        /// <summary>
+        /// 鐗╂枡骞呭
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDescription = "鐗╂枡骞呭")]
+        public decimal? MaterialWide { get; set; }
+        /// <summary>
+        /// 鐗╂枡閲嶉噺
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDescription = "鐗╂枡閲嶉噺")]
+        public decimal? MaterialWeight { get; set; }
 
         /// <summary>
         /// 浠诲姟鍙�
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Stock/Dt_StockInfo.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Stock/Dt_StockInfo.cs"
index 64d059a..f1430e3 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Stock/Dt_StockInfo.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Stock/Dt_StockInfo.cs"
@@ -1,4 +1,5 @@
-锘縰sing SqlSugar;
+锘縰sing Magicodes.ExporterAndImporter.Core;
+using SqlSugar;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -18,144 +19,192 @@
         /// <summary>
         /// 涓婚敭
         /// </summary>
+        [ExporterHeader(DisplayName = "涓婚敭")]
+        [ImporterHeader(Name = "涓婚敭")]
         [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")]
         public int Id { get; set; }
 
         /// <summary>
         /// 鏉$爜缂栧彿
         /// </summary>
+        [ExporterHeader(DisplayName = "鏉$爜缂栧彿")]
+        [ImporterHeader(Name = "鏉$爜缂栧彿")]
         [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鏉$爜缂栧彿")]
         public string PalletCode { get; set; }
 
         /// <summary>
         /// RFID淇℃伅
         /// </summary>
+        [ExporterHeader(DisplayName = "RFID淇℃伅")]
+        [ImporterHeader(Name = "RFID淇℃伅")]
         [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "RFID淇℃伅")]
         public string RfidCode { get; set; }
 
         /// <summary>
         /// 鎵樼洏绫诲瀷
         /// </summary>
+        [ExporterHeader(DisplayName = "鎵樼洏绫诲瀷")]
+        [ImporterHeader(Name = "鎵樼洏绫诲瀷")]
         [SugarColumn(IsNullable = false, ColumnDescription = "鎵樼洏绫诲瀷")]
         public int PalletType { get; set; }
 
         /// <summary>
         /// 璐т綅缂栧彿
         /// </summary>
+        [ExporterHeader(DisplayName = "璐т綅缂栧彿")]
+        [ImporterHeader(Name = "璐т綅缂栧彿")]
         [SugarColumn(IsNullable = true, Length = 30, ColumnDescription = "璐т綅缂栧彿")]
         public string LocationCode { get; set; }
 
         /// <summary>
         /// 浠撳簱涓婚敭
         /// </summary>
+        [ExporterHeader(DisplayName = "浠撳簱涓婚敭")]
+        [ImporterHeader(Name = "浠撳簱涓婚敭")]
         [SugarColumn(IsNullable = false, ColumnDescription = "浠撳簱涓婚敭")]
         public int WarehouseId { get; set; }
 
         /// <summary>
         /// 搴撳瓨缁勭粐
         /// </summary>
+        [ExporterHeader(DisplayName = "搴撳瓨缁勭粐")]
+        [ImporterHeader(Name = "搴撳瓨缁勭粐")]
         [SugarColumn(IsNullable = false, ColumnDescription = "搴撳瓨缁勭粐")]
         public int MaterielInvOrgId { get; set; }
 
         /// <summary>
         /// 搴撳瓨灞炴��(鍘熺焊,鍗婃垚...)
         /// </summary>
+        [ExporterHeader(DisplayName = "搴撳瓨灞炴��")]
+        [ImporterHeader(Name = "搴撳瓨灞炴��")]
         [SugarColumn(IsNullable = false, ColumnDescription = "搴撳瓨灞炴��")]
         public int StockAttribute { get; set; }
 
         /// <summary>
         /// 搴撳瓨鐘舵��
         /// </summary>
+        [ExporterHeader(DisplayName = "搴撳瓨鐘舵��")]
+        [ImporterHeader(Name = "搴撳瓨鐘舵��")]
         [SugarColumn(IsNullable = false, ColumnDescription = "搴撳瓨鐘舵��")]
         public int StockStatus { get; set; }
 
         /// <summary>
         /// 鐗╂枡Id
         /// </summary>
+        [ExporterHeader(DisplayName = "鐗╂枡Id")]
+        [ImporterHeader(Name = "鐗╂枡Id")]
         [SugarColumn(IsNullable = true, ColumnDescription = "鐗╂枡Id")]
         public int MaterielId { get; set; }
 
         /// <summary>
         /// 鐗╂枡缂栧彿
         /// </summary>
+        [ExporterHeader(DisplayName = "鐗╂枡缂栧彿")]
+        [ImporterHeader(Name = "鐗╂枡缂栧彿")]
         [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鐗╂枡缂栧彿")]
         public string MaterielCode { get; set; }
 
         /// <summary>
         /// 鐗╂枡鍚嶇О
         /// </summary>
+        [ExporterHeader(DisplayName = "鐗╂枡鍚嶇О")]
+        [ImporterHeader(Name = "鐗╂枡鍚嶇О")]
         [SugarColumn(IsNullable = false, Length = 200, ColumnDescription = "鐗╂枡鍚嶇О")]
         public string MaterielName { get; set; }
 
         /// <summary>
         /// 鐗╂枡瑙勬牸
         /// </summary>
+        [ExporterHeader(DisplayName = "鐗╂枡瑙勬牸")]
+        [ImporterHeader(Name = "鐗╂枡瑙勬牸")]
         [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "鐗╂枡瑙勬牸")]
         public string MaterielSpec { get; set; }
 
         /// <summary>
         /// 鎵规鍙�
         /// </summary>
+        [ExporterHeader(DisplayName = "鎵规鍙�")]
+        [ImporterHeader(Name = "鎵规鍙�")]
         [SugarColumn(IsNullable = true, Length = 100, ColumnDescription = "鎵规鍙�")]
         public string BatchNo { get; set; }
 
         /// <summary>
         /// 璁㈠崟鍙�
         /// </summary>
+        [ExporterHeader(DisplayName = "璁㈠崟鍙�")]
+        [ImporterHeader(Name = "璁㈠崟鍙�")]
         [SugarColumn(IsNullable = true, Length = 100, ColumnDescription = "璁㈠崟鍙�")]
         public string OrderNo { get; set; }
 
         /// <summary>
         /// 搴撳瓨鐗╂枡鎬婚暱(m)
         /// </summary>
+        [ExporterHeader(DisplayName = "搴撳瓨鐗╂枡鎬婚暱")]
+        [ImporterHeader(Name = "搴撳瓨鐗╂枡鎬婚暱")]
         [SugarColumn(IsNullable = true, ColumnDescription = "搴撳瓨鐗╂枡鎬婚暱(m)")]
         public decimal StockLength { get; set; }
 
         /// <summary>
         /// 鐗╂枡閲嶉噺
         /// </summary>
+        [ExporterHeader(DisplayName = "鐗╂枡閲嶉噺")]
+        [ImporterHeader(Name = "鐗╂枡閲嶉噺")]
         [SugarColumn(IsNullable = true, ColumnDescription = "鐗╂枡閲嶉噺")]
         public decimal? MaterielWeight { get; set; }
 
         /// <summary>
         /// 妫�娴嬮噸閲�
         /// </summary>
+        [ExporterHeader(DisplayName = "妫�娴嬮噸閲�")]
+        [ImporterHeader(Name = "妫�娴嬮噸閲�")]
         [SugarColumn(IsNullable = true, ColumnDescription = "妫�娴嬮噸閲�")]
         public decimal? CheckWeight { get; set; }
 
         /// <summary>
         /// 鐗╂枡鐩村緞/楂樺害
         /// </summary>
+        [ExporterHeader(DisplayName = "鐗╂枡鐩村緞")]
+        [ImporterHeader(Name = "鐗╂枡鐩村緞")]
         [SugarColumn(IsNullable = true, ColumnDescription = "鐗╂枡鐩村緞/楂樺害")]
         public decimal? MaterielThickness { get; set; }
 
         /// <summary>
         /// 妫�娴嬬洿寰�
         /// </summary>
+        [ExporterHeader(DisplayName = "妫�娴嬬洿寰�")]
+        [ImporterHeader(Name = "妫�娴嬬洿寰�")]
         [SugarColumn(IsNullable = true, ColumnDescription = "妫�娴嬬洿寰�")]
         public decimal? CheckThickness { get; set; }
 
         /// <summary>
         /// 鐗╂枡渚ч潰骞呭(m)
         /// </summary>
+        [ExporterHeader(DisplayName = "鐗╂枡渚ч潰骞呭")]
+        [ImporterHeader(Name = "鐗╂枡渚ч潰骞呭")]
         [SugarColumn(IsNullable = true, ColumnDescription = "鐗╂枡渚ч潰骞呭(m)")]
         public decimal? MaterielWide { get; set; }
 
         /// <summary>
         /// 妫�娴嬪箙瀹�
         /// </summary>
+        [ExporterHeader(DisplayName = "妫�娴嬪箙瀹�")]
+        [ImporterHeader(Name = "妫�娴嬪箙瀹�")]
         [SugarColumn(IsNullable = true, ColumnDescription = "妫�娴嬪箙瀹�")]
         public decimal? CheckWide { get; set; }
 
         /// <summary>
         /// 鍑哄簱鐗╂枡鏁伴噺
         /// </summary>
+        [ExporterHeader(DisplayName = "鍑哄簱鐗╂枡鏁伴噺")]
+        [ImporterHeader(Name = "鍑哄簱鐗╂枡鏁伴噺")]
         [SugarColumn(IsNullable = false, ColumnDescription = "鍑哄簱鐗╂枡鏁伴噺", DefaultValue = "0")]
         public decimal StockOutLength { get; set; }
 
         /// <summary>
         /// 鏁村嵎/娈嬪嵎
         /// </summary>
+        [ExporterHeader(DisplayName = "鏁村嵎/娈嬪嵎")]
+        [ImporterHeader(Name = "鏁村嵎/娈嬪嵎")]
         [SugarColumn(IsNullable = false, ColumnDescription = "鏁村嵎/娈嬪嵎", DefaultValue = "0")]
         public int IsFull { get; set; }
 
@@ -164,18 +213,24 @@
         /// 0 鍚�<br/>
         /// 1 鏄�<br/>
         /// </summary>
+        [ExporterHeader(DisplayName = "鏄惁棰嗘枡(1鏄�0鍚�)")]
+        [ImporterHeader(Name = "鏄惁棰嗘枡(1鏄�0鍚�)")]
         [SugarColumn(IsNullable = false, ColumnDescription = "鏄惁棰嗘枡", DefaultValue = "0")]
         public int IsPick { get; set; }
 
         /// <summary>
         /// 鍗曚綅
         /// </summary>
+        [ExporterHeader(DisplayName = "鍗曚綅")]
+        [ImporterHeader(Name = "鍗曚綅")]
         [SugarColumn(IsNullable = true, ColumnDescription = "鍗曚綅")]
         public string Unit { get; set; }
 
         /// <summary>
         /// 澶囨敞
         /// </summary>
+        [ExporterHeader(DisplayName = "澶囨敞")]
+        [ImporterHeader(Name = "澶囨敞")]
         [SugarColumn(IsNullable = true, ColumnDescription = "澶囨敞")]
         public string Remark { get; set; }
     }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs"
index c142a6f..38cd103 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs"
@@ -124,7 +124,7 @@
         /// </summary>
         [ImporterHeader(Name = "鍗曟嵁缂栧彿")]
         [ExporterHeader(DisplayName = "鍗曟嵁缂栧彿")]
-        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "鍗曟嵁缂栧彿")]
+        [SugarColumn(IsNullable = true, Length = 100, ColumnDescription = "鍗曟嵁缂栧彿")]
         public string? OrderNo { get; set; }
 
         /// <summary>
@@ -142,6 +142,7 @@
         [ExporterHeader(DisplayName = "浠诲姟涓嬪彂鏃堕棿")]
         [SugarColumn(IsNullable = true, ColumnDescription = "浠诲姟涓嬪彂鏃堕棿")]
         public DateTime? Dispatchertime { get; set; }
+
         /// <summary>
         /// 浠诲姟缁�
         /// </summary>
@@ -149,6 +150,7 @@
         [ExporterHeader(DisplayName = "浠诲姟缁�")]
         [SugarColumn(IsNullable = true, ColumnDescription = "浠诲姟缁�")]
         public string GroupId { get; set; }
+
         /// <summary>
         /// 浠诲姟鐗╂枡闀垮害
         /// </summary>
@@ -156,6 +158,7 @@
         [ExporterHeader(DisplayName = "浠诲姟鐗╂枡闀垮害")]
         [SugarColumn(IsNullable = true, ColumnDescription = "浠诲姟鐗╂枡闀垮害")]
         public int TaskLength { get; set; }
+
         /// <summary>
         /// 澶囨敞
         /// </summary>
@@ -163,6 +166,7 @@
         [ExporterHeader(DisplayName = "澶囨敞")]
         [SugarColumn(IsNullable = true, Length = 255, ColumnDescription = "澶囨敞")]
         public string Remark { get; set; }
+
         /// <summary>
         /// 鐗╂枡缂栧彿
         /// </summary>
@@ -170,6 +174,23 @@
         [ExporterHeader(DisplayName = "鐗╂枡缂栧彿")]
         [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "鐗╂枡缂栧彿")]
         public string MaterielCode { get; set; }
+
+        /// <summary>
+        /// 鍔犲伐涓績缂栫爜
+        /// </summary>
+        [ImporterHeader(Name = "鍔犲伐涓績缂栫爜")]
+        [ExporterHeader(DisplayName = "鍔犲伐涓績缂栫爜")]
+        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "鍔犲伐涓績缂栫爜")]
+        public string WorkCentreCode { get; set; }
+
+        /// <summary>
+        /// 鐗╂枡缂栧彿
+        /// </summary>
+        [ImporterHeader(Name = "MES璁″垝Id")]
+        [ExporterHeader(DisplayName = "MES璁″垝Id")]
+        [SugarColumn(IsNullable = true, ColumnDescription = "MES璁″垝Id")]
+        public int DispatchPlanId { get; set; }
+
         /// <summary>
         /// 鐗╂枡鏁伴噺
         /// </summary>
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundRepository/OutLineViewRepository.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundRepository/OutLineViewRepository.cs"
new file mode 100644
index 0000000..76161b6
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundRepository/OutLineViewRepository.cs"
@@ -0,0 +1,21 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core.BaseRepository;
+using WIDESEA_IOutboundRepository;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_OutboundRepository
+{
+    /// <summary>
+    /// 鑰佸巶鍑哄簱绾夸綋缂撳瓨浠撳偍瀹炵幇灞�
+    /// </summary>
+    public class OutLineViewRepository : RepositoryBase<Dt_OutLineView>, IOutLineViewRepository
+    {
+        public OutLineViewRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
+        {
+        }
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundRepository/OutboundRepository.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundRepository/OutboundRepository.cs"
index e29b587..f46a921 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundRepository/OutboundRepository.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundRepository/OutboundRepository.cs"
@@ -19,7 +19,8 @@
         public IOutBSTPickInfoRepository OutBSTPickInfoRepository { get; }
         public IProDeliveryOrderRepository ProDeliveryOrderRepository { get; }
         public IProDeliveryOrderDetailRepository ProDeliveryOrderDetailRepository { get; }
-        public OutboundRepository(IOutMESOrderRepository outMESOrderRepository, IOutSGOrderRepository outSGOrderRepository, IOutSGOrderDetailRepository outSGOrderDetailRepository, IOutStockLockInfoRepository outStockLockInfoRepository, IOutBSTPickInfoRepository outBSTPickInfoRepository, IProDeliveryOrderRepository proDeliveryOrderRepository, IProDeliveryOrderDetailRepository proDeliveryOrderDetailRepository)
+        public IOutLineViewRepository OutLineViewRepository { get; }
+        public OutboundRepository(IOutMESOrderRepository outMESOrderRepository, IOutSGOrderRepository outSGOrderRepository, IOutSGOrderDetailRepository outSGOrderDetailRepository, IOutStockLockInfoRepository outStockLockInfoRepository, IOutBSTPickInfoRepository outBSTPickInfoRepository, IProDeliveryOrderRepository proDeliveryOrderRepository, IProDeliveryOrderDetailRepository proDeliveryOrderDetailRepository, IOutLineViewRepository outLineViewRepository)
         {
             OutMESOrderRepository = outMESOrderRepository;
             OutSGOrderRepository = outSGOrderRepository;
@@ -28,6 +29,7 @@
             OutBSTPickInfoRepository = outBSTPickInfoRepository;
             ProDeliveryOrderRepository = proDeliveryOrderRepository;
             ProDeliveryOrderDetailRepository = proDeliveryOrderDetailRepository;
+            OutLineViewRepository = outLineViewRepository;
         }
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutLineViewService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutLineViewService.cs"
new file mode 100644
index 0000000..055f04e
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutLineViewService.cs"
@@ -0,0 +1,89 @@
+锘縰sing AutoMapper;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Common.TaskEnum;
+using WIDESEA_Core;
+using WIDESEA_Core.BaseRepository;
+using WIDESEA_Core.BaseServices;
+using WIDESEA_Core.Helper;
+using WIDESEA_IBasicRepository;
+using WIDESEA_IOutboundRepository;
+using WIDESEA_IOutboundService;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_OutboundService
+{
+    public class OutLineViewService : ServiceBase<Dt_OutLineView, IOutLineViewRepository>, IOutLineViewService
+    {
+        public IOutLineViewRepository Repository => BaseDal;
+        private IBasicRepository _basicRepository;
+        private readonly IMapper _mapper;
+        private readonly IUnitOfWorkManage _unitOfWorkManage;
+
+        public OutLineViewService(IOutLineViewRepository BaseDal, IBasicRepository basicRepository, IMapper mapper, IUnitOfWorkManage unitOfWorkManage) : base(BaseDal)
+        {
+            _basicRepository = basicRepository;
+            _mapper = mapper;
+            _unitOfWorkManage = unitOfWorkManage;
+        }
+        /// <summary>
+        /// 鑾峰彇绾夸綋鍘熺焊
+        /// </summary>
+        /// <returns></returns>
+        public WebResponseContent GetOutLineView()
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                //鑾峰彇鏁版嵁
+                List<Dt_OutLineView> lineViews = BaseDal.QueryData().OrderBy(x=>x.CreateDate).ToList();
+                int taskCount = BaseDal.Db.Queryable<Dt_Task>().Where(x=>x.TaskType==TaskTypeEnum.OldYLOutbound.ObjToInt() && x.TaskStatus==TaskStatusEnum.Line_Executing.ObjToInt()).Count(); 
+                content.OK($"{taskCount}", lineViews);
+            }
+            catch (Exception ex)
+            {
+                content.Error(ex.Message);
+            }
+            return content;
+        }
+        /// <summary>
+        /// 瀛樺叆鏈�鏂扮殑鍑哄簱绾稿嵎淇℃伅
+        /// </summary>
+        /// <param name="outStockLockInfos"></param>
+        /// <returns></returns>
+        public WebResponseContent SaveLineView(List<Dt_OutStockLockInfo> outStockLockInfos)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                //鑾峰彇褰撳墠鑰佸巶缂撳瓨鎵�鏈夌焊鍗蜂俊鎭�
+                List<Dt_OutLineView> outLineViews = BaseDal.QueryData();
+                //鑾峰彇褰撳墠绾稿嵎涓暟
+                int? outLineCount = outLineViews?.Select(x => x.PalletCode).Distinct().Count();
+                if (outLineViews==null || outLineViews.Count<=0 || outLineCount<=2)
+                {
+                    List<Dt_OutLineView> outLineViewsAdd = outStockLockInfos.Select(x => _mapper.Map<Dt_OutLineView>(x)).ToList();
+                    BaseDal.AddData(outLineViewsAdd);
+                }
+                else
+                {
+                    //鑾峰彇鏈�鏃╃殑绾稿嵎淇℃伅
+                    string? code= outLineViews.FirstOrDefault()?.PalletCode;
+                    List<Dt_OutLineView> outLineViewsDel = outLineViews.Where(x=>x.PalletCode==code).ToList();
+                    List<Dt_OutLineView> outLineViewsAdd = outStockLockInfos.Select(x => _mapper.Map<Dt_OutLineView>(x)).ToList();
+                    BaseDal.DeleteData(outLineViewsDel);
+                    BaseDal.AddData(outLineViewsAdd);
+                }
+                content.OK("鎴愬姛");
+            }
+            catch (Exception ex)
+            {
+                content.Error(ex.Message);
+            }
+            return content;
+        }
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderDetailService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderDetailService.cs"
index d7168ca..eb116ca 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderDetailService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderDetailService.cs"
@@ -76,10 +76,10 @@
                 List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseableStocks(item.MaterialNo, item.Width, outBSTOrders.FirstOrDefault().WarehouseId).Where(x=>!outStocks.Select(x=>x.PalletCode).Contains(x.PalletCode)).ToList();
                 if (!stockInfos.Any())
                 {
-                    throw new Exception($"鏈壘鍒板彲鍒嗛厤搴撳瓨");
+                    continue;
                 }
                 //鍒嗛厤瀹為檯搴撳瓨
-                List<Dt_StockInfo> autoAssignStocks = _stockService.StockInfoService.GetOutboundStocks(stockInfos, needQuantity).ToList();
+                List<Dt_StockInfo> autoAssignStocks = _stockService.StockInfoService.GetOutOldStocks(stockInfos, needQuantity).ToList();
                 //娣诲姞搴撳瓨鍒嗛厤
                 outStocks.AddRange(autoAssignStocks);
                 //鑾峰彇鎵�鏈夎鐗╂枡鍗曟嵁
@@ -100,6 +100,11 @@
 
                         decimal orderDetailNeedQuantity = details[i].XqLen - detailAssignQuantity;
 
+                        if (autoAssignStocks.Count==0)
+                        {
+                            break;
+                        }
+
                         decimal useStockLength = autoAssignStocks[0].StockLength- autoAssignStocks[0].StockOutLength;
                         Dt_OutSGOrder? sGOrder = outBSTOrders.FirstOrDefault(x => x.Id == details[i].OutSGOrderId);
                         if (orderDetailNeedQuantity > useStockLength)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderService.cs"
index e4416b0..14554e5 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderService.cs"
@@ -20,6 +20,9 @@
 using WIDESEA_Common.WareHouseEnum;
 using WIDESEA_Core.Helper;
 using System.Reflection;
+using System.Text.RegularExpressions;
+using Microsoft.AspNetCore.Http;
+using HslCommunication;
 
 namespace WIDESEA_OutboundService
 {
@@ -45,56 +48,84 @@
         
         public WebResponseContent AddOutSGOrder(List<SGOutOrderDTO> outOrderDTOs)
         {
-            
-                WebResponseContent content = new WebResponseContent();
-                try
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                //鑾峰彇鎵�鏈夋帓绋嬪崟
+                List<Dt_OutSGOrder> outSGOrders = BaseDal.Db.Queryable<Dt_OutSGOrder>().Includes(x => x.Details).ToList();
+                List<Dt_OutSGOrderDetail> outSGOrderDetails= outSGOrders.SelectMany(x=>x.Details).ToList();
+                ////鍒ゆ柇鍗曟嵁
+                //Dt_OutSGOrderDetail? ExistAddOutOrderDetail = outSGOrderDetails.FirstOrDefault(x => outOrderDTOs.Select(t => t.BoardMpsDetailId).Distinct().Contains(x.BoardMpsDetailId));
+                //if (ExistAddOutOrderDetail != null)
+                //{
+                //    return content.Error($"鍑哄簱鎺掔▼鏄庣粏{nameof(SGOutOrderDTO.BoardMpsDetailId)}:{ExistAddOutOrderDetail.BoardMpsDetailId}宸插瓨鍦�");
+                //}
+                //鑾峰彇鎵�鏈夌墿鏂�
+                List<Dt_MaterielInfo> materielInfos = _basicRepository.MaterielInfoRepository.QueryData(x => x.WarehouseId == WarehouseEnum.LLDYL.ObjToInt() && x.MaterielInvOrgId == MaterielInvOrgEnum.鑰佸巶.ObjToInt() && x.MaterialSourceId != 0);
+                SGOutOrderDTO? sGOutOrderDTO = outOrderDTOs.FirstOrDefault(x => !materielInfos.Select(x => x.MaterielCode).Contains(x.MaterialNo));
+                //SGOutOrderDTO? sGOutOrderDTO = outOrderDTOs.FirstOrDefault(x => materielInfos.FirstOrDefault(t=>t.MaterielCode.StartsWith(x.MaterialNo))==null);
+                if (sGOutOrderDTO != null)
                 {
-                    //鑾峰彇鎵�鏈夋帓绋嬪崟
-                    List<Dt_OutSGOrder> outSGOrders = BaseDal.Db.Queryable<Dt_OutSGOrder>().Includes(x => x.Details).ToList();
-                    //鍒ゆ柇鍗曟嵁
-                    Dt_OutSGOrder? ExistAddOutOrder = outSGOrders.FirstOrDefault(x => outOrderDTOs.Select(x => x.OrderId).Distinct().Contains(x.OrderId));
-                    if (ExistAddOutOrder != null)
+                    return content.Error($"鐢熶骇鎺掔▼{sGOutOrderDTO.OrderId}鐗╂枡:{sGOutOrderDTO.MaterialNo}涓嶅瓨鍦�");
+                }
+                List<Dt_OutSGOrder> AddOutSGOrders = new List<Dt_OutSGOrder>();
+                foreach (var item in outOrderDTOs.OrderBy(x=>x.Number))
+                {
+                    //鑾峰彇宸ュ崟
+                    Dt_OutSGOrder? ExistOutSGOrder = AddOutSGOrders.FirstOrDefault(x => x.OrderId == item.OrderId);
+                    
+                    //鏄庣粏鎻愬墠杞崲
+                    Dt_OutSGOrderDetail outSGOrderDetail = _mapper.Map<Dt_OutSGOrderDetail>(item);
+                    //鑾峰彇鐗╂枡
+                    Dt_MaterielInfo? materielInfo = materielInfos.FirstOrDefault(x => x.MaterielCode == item.MaterialNo);
+                    string code = ExtractFirstPercentContent(outSGOrderDetail.Remark);
+                    //澶勭悊鐗规畩鎸囧畾鎺掔▼鍒ゆ柇
+                    if (!code.IsNullOrEmpty() && code.StartsWith(outSGOrderDetail.MaterialNo))
                     {
-                        return content.Error($"鍑哄簱鎺掔▼鍗曞彿{nameof(SGOutOrderDTO.OrderId)}:{ExistAddOutOrder.OrderId}宸插瓨鍦�");
-                    }
-                    //鑾峰彇鎵�鏈夌墿鏂� 
-                    List<Dt_MaterielInfo> materielInfos = _basicRepository.MaterielInfoRepository.QueryData(x => x.WarehouseId == WarehouseEnum.LLDYL.ObjToInt() && x.MaterielInvOrgId == MaterielInvOrgEnum.鑰佸巶.ObjToInt() && x.MaterialSourceId != 0);
-                    SGOutOrderDTO? sGOutOrderDTO = outOrderDTOs.FirstOrDefault(x => !materielInfos.Select(x => x.MaterielCode).Contains(x.MaterialNo));
-                    if (sGOutOrderDTO != null)
-                    {
-                        return content.Error($"鐢熶骇鎺掔▼{sGOutOrderDTO.OrderId}鐗╂枡:{sGOutOrderDTO.MaterialNo}涓嶅瓨鍦�");
-                    }
-                    List<Dt_OutSGOrder> AddOutSGOrders = new List<Dt_OutSGOrder>();
-                    foreach (var item in outOrderDTOs)
-                    {
-                        //鑾峰彇宸ュ崟
-                        Dt_OutSGOrder? ExistOutSGOrder = AddOutSGOrders.FirstOrDefault(x => x.OrderId == item.OrderId);
-                        //鑾峰彇鐗╂枡
-                        Dt_MaterielInfo materielInfo = materielInfos.FirstOrDefault(x => x.MaterielCode == item.MaterialNo);
-                        //鏄庣粏鎻愬墠杞崲
-                        Dt_OutSGOrderDetail outSGOrderDetail = _mapper.Map<Dt_OutSGOrderDetail>(item);
-                        outSGOrderDetail.MaterialName = materielInfo.MaterielName;
-                        //鍒ゆ柇宸ュ崟鏄惁宸茬粡瀛樺湪
-                        if (ExistOutSGOrder != null)
+                        materielInfo = materielInfos.FirstOrDefault(x => x.MaterielCode == code);
+                        if (materielInfo==null)
                         {
-                            ExistOutSGOrder.Details.Add(outSGOrderDetail);
+                            return content.Error($"鐢熶骇鎺掔▼{item.OrderId}鎸囧畾鎺掔▼鐗╂枡:{code}涓嶅瓨鍦�");
                         }
-                        else
-                        {
+                        outSGOrderDetail.MaterialNo = code;
+                    }
+                    outSGOrderDetail.MaterialName = materielInfo.MaterielName;
+                    
+                    //鍒ゆ柇宸ュ崟鏄惁宸茬粡瀛樺湪
+                    if (ExistOutSGOrder != null)
+                    {
+                        ExistOutSGOrder.Details.Add(outSGOrderDetail);
+                    }
+                    else
+                    {
+                        Dt_OutSGOrder outSGOrder = _mapper.Map<Dt_OutSGOrder>(item);
+                        outSGOrder.Details = new List<Dt_OutSGOrderDetail>() { outSGOrderDetail };
+                        AddOutSGOrders.Add(outSGOrder);
+                    }
+                }
+                BaseDal.Db.InsertNav(AddOutSGOrders).Include(x => x.Details).ExecuteCommand();
+                content.OK("鎺ユ敹鎺掔▼鎴愬姛");
+            }
+            catch (Exception ex)
+            {
+                content.Error(ex.Message);
+            }
+            return content;
+        }
+        public static string ExtractFirstPercentContent(string input)
+        {
+            if (string.IsNullOrEmpty(input))
+                return null;
 
-                            Dt_OutSGOrder outSGOrder = _mapper.Map<Dt_OutSGOrder>(item);
-                            outSGOrder.Details = new List<Dt_OutSGOrderDetail>() { outSGOrderDetail };
-                            AddOutSGOrders.Add(outSGOrder);
-                        }
-                    }
-                    BaseDal.Db.InsertNav(AddOutSGOrders).Include(x => x.Details).ExecuteCommand();
-                    content.OK("鎺ユ敹鎺掔▼鎴愬姛");
-                }
-                catch (Exception ex)
-                {
-                    content.Error(ex.Message);
-                }
-                return content;
+            Regex regex = new Regex(@"%(.*?)%");
+            Match match = regex.Match(input);
+
+            if (match.Success && match.Groups[1].Success)
+            {
+                return match.Groups[1].Value.Trim();
+            }
+
+            return null;
         }
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutStockLockInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutStockLockInfoService.cs"
index 4a07cb9..1a663c2 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutStockLockInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutStockLockInfoService.cs"
@@ -75,20 +75,22 @@
                 PalletCode = outStock.PalletCode,
                 AssignQuantity = assignQuantity,
                 MaterielCode = ouMESOrder.MaterialCode,
-                BatchNo = ouMESOrder.MaterialLot,
+                BatchNo = outStock.BatchNo,
                 LocationCode = outStock.LocationCode,
                 MaterielName = outStock.MaterielName,
                 OrderDetailId = ouMESOrder.OutDetailId,
                 OrderNo = ouMESOrder.OutMESOrderNo,
                 MakeCode = ouMESOrder.MakeCode,
                 MachineName=ouMESOrder.MakeArea.ToString(),
+                OrderType=OutOrderTypeEnum.OutMESPick.ObjToInt(),
                 MaterielId = outStock.MaterielId,
                 OriginalQuantity = outStock.StockLength,
                 Status = taskNum == null ? OutLockStockStatusEnum.宸插垎閰�.ObjToInt() : OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt(),
                 StockId = outStock.Id,
                 TaskNum = taskNum,
                 OrderQuantity = ouMESOrder.ReqQuantity,
-                Unit = outStock.Unit
+                Unit = outStock.Unit,
+                AssistUnit= ouMESOrder.AssistUnitCode
             };
 
             return outStockLockInfo;
@@ -115,6 +117,8 @@
                 StockId = outStock.Id,
                 TaskNum = taskNum,
                 OrderQuantity = outSGOrderDetail.XqLen,
+                MaterialWeight=outStock.MaterielWeight,
+                MaterialWide=outStock.MaterielWide,
                 Unit = outStock.Unit,
                 MachineName=outSGOrderDetail.MachineName,
             };
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutboundService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutboundService.cs"
index 4250bda..7941cbd 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutboundService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutboundService.cs"
@@ -28,12 +28,17 @@
         /// 鍑哄簱璇︽儏涓氬姟鎺ュ彛灞�
         /// </summary>
         public IOutStockLockInfoService OutStockLockInfoService { get; }
-        public OutboundService(IOutMESOrderService outMESOrderService, IOutSGOrderService outSGOrderService, IOutSGOrderDetailService outSGOrderDetailService, IOutStockLockInfoService outStockLockInfoService)
+        /// <summary>
+        /// 鑰佸巶绾夸綋缂撳瓨涓氬姟鎺ュ彛灞�
+        /// </summary>
+        public IOutLineViewService OutLineViewService { get; }
+        public OutboundService(IOutMESOrderService outMESOrderService, IOutSGOrderService outSGOrderService, IOutSGOrderDetailService outSGOrderDetailService, IOutStockLockInfoService outStockLockInfoService, IOutLineViewService outLineViewService)
         {
             OutMESOrderService = outMESOrderService;
             OutSGOrderService = outSGOrderService;
             OutSGOrderDetailService = outSGOrderDetailService;
             OutStockLockInfoService = outStockLockInfoService;
+            OutLineViewService = outLineViewService;
         }
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/StockInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/StockInfoService.cs"
index 46b9905..247c7aa 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/StockInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/StockInfoService.cs"
@@ -1,21 +1,27 @@
 锘縰sing AutoMapper;
 using MailKit.Search;
 using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup;
+using OfficeOpenXml.FormulaParsing.Excel.Operators;
 using SqlSugar;
 using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using WIDESEA_Common.CommonEnum;
 using WIDESEA_Common.MaterielEnum;
 using WIDESEA_Common.StockEnum;
+using WIDESEA_Common.WareHouseEnum;
 using WIDESEA_Core;
 using WIDESEA_Core.BaseRepository;
 using WIDESEA_Core.BaseServices;
 using WIDESEA_Core.Enums;
 using WIDESEA_Core.Helper;
 using WIDESEA_DTO.Basic;
+using WIDESEA_DTO.ERP;
 using WIDESEA_DTO.Stock;
+using WIDESEA_External.ERPService;
+using WIDESEA_External.Model;
 using WIDESEA_IBasicRepository;
 using WIDESEA_IRecordRepository;
 using WIDESEA_IRecordService;
@@ -31,13 +37,15 @@
         private readonly IMapper _mapper;
         private readonly IBasicRepository _basicRepository;
         private readonly IUnitOfWorkManage _unitOfWorkManage;
+        private readonly IInvokeERPService _invokeERPService;
         public IStockInfoRepository Repository => BaseDal;
 
-        public StockInfoService(IStockInfoRepository BaseDal, IMapper mapper, IBasicRepository basicRepository, IUnitOfWorkManage unitOfWorkManage) : base(BaseDal)
+        public StockInfoService(IStockInfoRepository BaseDal, IMapper mapper, IBasicRepository basicRepository, IUnitOfWorkManage unitOfWorkManage,IInvokeERPService invokeERPService) : base(BaseDal)
         {
             _mapper = mapper;
             _basicRepository = basicRepository;
             _unitOfWorkManage = unitOfWorkManage;
+            _invokeERPService = invokeERPService;
         }
 
 
@@ -123,6 +131,65 @@
             }
             return content;
         }
+        /// <summary>
+        /// 鏇存柊鑰佸巶绔嬪簱娈嬪嵎搴撳瓨
+        /// </summary>
+        /// <returns></returns>
+        public WebResponseContent UpBSTStock(int operate)
+        {
+            WebResponseContent content=new WebResponseContent();
+            try
+            {
+                DateTime dateTime = Convert.ToDateTime("2025-11-01 00:00:00");
+                //鑾峰彇鎵�鏈夌殑娈嬪嵎绔嬪簱搴撳瓨
+                List<Dt_StockInfo> stockInfos = BaseDal.QueryData(x => x.IsFull == WhetherEnum.True.ObjToInt() && x.MaterielInvOrgId == MaterielInvOrgEnum.鑰佸巶.ObjToInt() && x.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt() && x.ModifyDate> dateTime);
+                if (operate>0)
+                {
+                    //鑾峰彇鎵�鏈夌殑鑰佸巶缂撳瓨鍖哄簱瀛�
+                    stockInfos = BaseDal.QueryData(x => x.MaterielInvOrgId == MaterielInvOrgEnum.鑰佸巶.ObjToInt() && x.WarehouseId==WarehouseEnum.LLDOldCache.ObjToInt());
+                }
+                List<Dt_StockInfo> stockInfosUp = new List<Dt_StockInfo>();
+                List<Dt_StockInfo> stockInfosDel = new List<Dt_StockInfo>();
+                foreach (var item in stockInfos)
+                {
+                    BSTResponse<BSTStockInfoDTO> bSTResponse = _invokeERPService.BSTStockAsync(item.PalletCode).DeserializeObject<BSTResponse<BSTStockInfoDTO>>();
+                    if (bSTResponse.Code == 500)
+                    {
+                        content.Message += $"鏉$爜{item.PalletCode}涓�鏈烢RP搴撳瓨涓嶅瓨鍦�,";
+                        continue;
+                    }
+                    BSTStockInfoDTO bSTStockInfoDTO = bSTResponse.Data ?? throw new Exception($"涓�鏈烢RP鏈繑鍥瀧item.PalletCode}鐨勫簱瀛樹俊鎭�");
+                    if (item.StockLength != bSTStockInfoDTO.StockMeter && bSTStockInfoDTO.StockMeter>0)
+                    {
+                        item.MaterielThickness = bSTStockInfoDTO.Thick;
+                        item.MaterielWeight = bSTStockInfoDTO.Qty;
+                        item.MaterielWide = bSTStockInfoDTO.W;
+                        item.Remark = $"{item.StockLength}-{bSTStockInfoDTO.StockMeter}";
+                        item.StockLength = bSTStockInfoDTO.StockMeter;
+                        stockInfosUp.Add(item);
+                    }
+                    else if(item.StockLength != bSTStockInfoDTO.StockMeter && bSTStockInfoDTO.StockMeter == 0)
+                    {
+                        stockInfosDel.Add(item);
+                    }
+                }
+                //鏁版嵁搴撴搷浣�
+                _unitOfWorkManage.BeginTran();
+                BaseDal.UpdateData(stockInfosUp);
+                if (stockInfosDel.Count>0)
+                {
+                    BaseDal.DeleteAndMoveIntoHty(stockInfosDel, App.User.UserId > 0 ? OperateTypeEnum.浜哄伐瀹屾垚 : OperateTypeEnum.鑷姩瀹屾垚);
+                }
+                _unitOfWorkManage.CommitTran();
+                content.OK();
+            }
+            catch (Exception ex)
+            {
+                _unitOfWorkManage.RollbackTran();
+                content.Error(ex.Message);
+            }
+            return content;
+        }
 
         public List<Dt_StockInfo> GetUseableStocks(int materielId,decimal width, int warehoseId)
         {
@@ -181,5 +248,34 @@
             }
             return outStocks;
         }
+        /// <summary>
+        /// 鍒嗛厤鑰佸巶搴撳瓨
+        /// </summary>
+        /// <returns></returns>
+        public List<Dt_StockInfo> GetOutOldStocks(List<Dt_StockInfo> stockInfos, decimal needQuantity)
+        {
+            List<Dt_StockInfo> outStocks = new List<Dt_StockInfo>();
+            //鑾峰彇搴撳瓨鍙敤鏁伴噺
+            decimal stockTotalQuantity = stockInfos.Sum(x => x.StockLength - x.StockOutLength);
+            int index = 0;
+            while (needQuantity > 0 && (index + 1 <= stockInfos.Count))
+            {
+                Dt_StockInfo stockInfo = stockInfos[index];
+                decimal useableStockQuantity = stockInfo.StockLength - stockInfo.StockOutLength;
+                if (useableStockQuantity < needQuantity && useableStockQuantity > 0)
+                {
+                    stockInfo.StockOutLength = stockInfo.StockLength;
+                    needQuantity -= useableStockQuantity;
+                }
+                else
+                {
+                    stockInfo.StockOutLength += needQuantity;
+                    needQuantity = 0;
+                }
+                outStocks.Add(stockInfo);
+                index++;
+            }
+            return outStocks;
+        }
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/WIDESEA_StockService.csproj" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/WIDESEA_StockService.csproj"
index c08afd6..3fb8fdd 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/WIDESEA_StockService.csproj"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/WIDESEA_StockService.csproj"
@@ -7,6 +7,7 @@
   </PropertyGroup>
 
   <ItemGroup>
+    <ProjectReference Include="..\WIDESEA_External\WIDESEA_External.csproj" />
     <ProjectReference Include="..\WIDESEA_IBasicRepository\WIDESEA_IBasicRepository.csproj" />
     <ProjectReference Include="..\WIDESEA_IOutboundRepository\WIDESEA_IOutboundRepository.csproj" />
     <ProjectReference Include="..\WIDESEA_IRecordRepository\WIDESEA_IRecordRepository.csproj" />
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs"
index 4a23a1a..1f47085 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs"
@@ -33,12 +33,16 @@
 using WIDESEA_External.Model;
 using System.Text.Json;
 using System.Text.RegularExpressions;
+using WIDESEA_Common.MaterielEnum;
+using MailKit.Search;
 
 namespace WIDESEA_TaskInfoService
 {
     public partial class TaskService
     {
-        static object lock_out = new object();
+        static object lock_autoIssue = new object();
+        static object lock_manualIssue = new object();
+        static object lock_returnIssue = new object();
         /// <summary>
         /// MES鑷姩鍙枡鎺ュ彛
         /// </summary>
@@ -48,63 +52,66 @@
             WebResponseContent content = new WebResponseContent();
             try
             {
-                if (autoIssueDTO == null)
+                lock (lock_autoIssue)
                 {
-                    return content.Error("浼犲叆淇℃伅涓嶈兘涓虹┖");
+                    if (autoIssueDTO == null)
+                    {
+                        return content.Error("浼犲叆淇℃伅涓嶈兘涓虹┖");
+                    }
+                    //鑾峰彇瀵瑰簲鍗曟嵁
+                    Dt_OutMESOrder? outMESOrder = _outboundRepository.OutMESOrderRepository.QueryFirst(x => x.OutDetailId == autoIssueDTO.OutDetailId);
+                    if (outMESOrder == null)
+                    {
+                        return content.Error($"棰嗘枡璁″垝{nameof(MESAutoIssueDTO.OutDetailId)}{autoIssueDTO.OutDetailId}涓嶅瓨鍦�");
+                    }
+                    if (outMESOrder.OutMESOrderStatus == OutOrderStatusEnum.鍑哄簱瀹屾垚.ObjToInt())
+                    {
+                        return content.Error($"棰嗘枡璁″垝{nameof(MESAutoIssueDTO.OutDetailId)}{outMESOrder.ProductOrderNo}宸ュ崟宸插嚭搴撳畬鎴�");
+                    }
+                    //鑾峰彇鍛ㄨ浆浣嶇疆缂栧彿
+                    Dt_AGVStationInfo? stationInfo = _basicRepository.AGVStationInfoRepository.QueryFirst(x => x.MESPointCode == autoIssueDTO.PointCode);
+                    if (stationInfo == null)
+                    {
+                        return content.Error($"棰嗘枡璁″垝鍛ㄨ浆浣峽nameof(MESAutoIssueDTO.PointCode)}{autoIssueDTO.PointCode}涓嶅瓨鍦�");
+                    }
+                    if (autoIssueDTO.IsEmptyPallet > 0)
+                    {
+                        return content.Error($"棰嗘枡璁″垝鍛ㄨ浆浣峽nameof(MESAutoIssueDTO.PointCode)}{autoIssueDTO.PointCode}瀛樺湪绌烘墭");
+                    }
+                    Dt_Task? task = BaseDal.QueryData(x => x.OrderNo == outMESOrder.OutMESOrderNo && x.TaskStatus == TaskStatusEnum.CallPending.ObjToInt()).OrderByDescending(x => x.Grade).ThenBy(x => x.TaskNum).FirstOrDefault();
+                    //鑾峰彇浠诲姟
+                    if (task == null)
+                    {
+                        return content.Error($"鏈壘鍒伴鏂欒鍒掔紪鍙穥outMESOrder.ProductOrderNo}鍙厤閫佷换鍔�");
+                    }
+                    //鑾峰彇浠诲姟鍑哄簱璇︽儏
+                    Dt_OutStockLockInfo outStockLockInfo = _outboundRepository.OutStockLockInfoRepository.QueryFirst(x => x.TaskNum == task.TaskNum);
+                    //璋冪敤MES閰嶉�佸嚭鍙戞寚浠�
+                    PlanDistributionInfo planDistribution = new PlanDistributionInfo()
+                    {
+                        DispatchPlanMaterialId = autoIssueDTO.OutDetailId,
+                        InvItemCode = task.MaterielCode,
+                        Quantity = outStockLockInfo.AssignQuantity,
+                        SendOutTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
+                        ArrivalTime = DateTime.Now.AddMinutes(15).ToString("yyyy-MM-dd HH:mm:ss")
+                    };
+                    MESDispatchModel dispatchModel = new MESDispatchModel()
+                    {
+                        PRO_DispachPlanDistributionInfos = new List<PlanDistributionInfo>() { planDistribution }
+                    };
+                    _unitOfWorkManage.BeginTran();
+                    task.TaskStatus = TaskStatusEnum.New.ObjToInt();
+                    task.TargetAddress = autoIssueDTO.PointCode.StartsWith("YS") ? stationInfo.AGVStationCode : autoIssueDTO.PointCode;
+                    BaseDal.UpdateData(task);
+                    MESResponse mESResponse = _invokeMESService.MESDispatchUp(dispatchModel).DeserializeObject<MESResponse>() ?? throw new Exception("鏈幏鍙栧埌杩斿洖淇℃伅");
+                    if (!mESResponse.Result)
+                    {
+                        throw new Exception($"MES閰嶉�佸嚭鍙戞帴鍙h皟鐢ㄦ姤閿�,MES杩斿洖淇℃伅{DecodeUnicode(mESResponse.Msg)}");
+                    }
+                    _unitOfWorkManage.CommitTran();
+                    PushTasksToWCS(new List<Dt_Task> { task });
+                    return content.OK("鍙枡鎴愬姛");
                 }
-                //鑾峰彇瀵瑰簲鍗曟嵁
-                Dt_OutMESOrder? outMESOrder = _outboundRepository.OutMESOrderRepository.QueryFirst(x=>x.OutDetailId==autoIssueDTO.OutDetailId);
-                if (outMESOrder==null)
-                {
-                    return content.Error($"棰嗘枡璁″垝{nameof(MESAutoIssueDTO.OutDetailId)}{autoIssueDTO.OutDetailId}涓嶅瓨鍦�");
-                }
-                if (outMESOrder.OutMESOrderStatus==OutOrderStatusEnum.鍑哄簱瀹屾垚.ObjToInt())
-                {
-                    return content.Error($"棰嗘枡璁″垝{nameof(MESAutoIssueDTO.OutDetailId)}{outMESOrder.ProductOrderNo}宸ュ崟宸插嚭搴撳畬鎴�");
-                }
-                //鑾峰彇鍛ㄨ浆浣嶇疆缂栧彿
-                Dt_AGVStationInfo? stationInfo = _basicRepository.AGVStationInfoRepository.QueryFirst(x=>x.MESPointCode==autoIssueDTO.PointCode);
-                if (stationInfo == null)
-                {
-                    return content.Error($"棰嗘枡璁″垝鍛ㄨ浆浣峽nameof(MESAutoIssueDTO.PointCode)}{autoIssueDTO.PointCode}涓嶅瓨鍦�");
-                }
-                if (autoIssueDTO.IsEmptyPallet>0)
-                {
-                    return content.Error($"棰嗘枡璁″垝鍛ㄨ浆浣峽nameof(MESAutoIssueDTO.PointCode)}{autoIssueDTO.PointCode}瀛樺湪绌烘墭");
-                }
-                Dt_Task? task = BaseDal.QueryData(x => x.OrderNo == outMESOrder.OutMESOrderNo && x.TaskStatus == TaskStatusEnum.CallPending.ObjToInt()).OrderByDescending(x => x.Grade).ThenBy(x => x.TaskNum).FirstOrDefault();
-                //鑾峰彇浠诲姟
-                if (task == null)
-                {
-                    return content.Error($"鏈壘鍒伴鏂欒鍒掔紪鍙穥outMESOrder.ProductOrderNo}鍙厤閫佷换鍔�");
-                }
-                //鑾峰彇浠诲姟鍑哄簱璇︽儏
-                Dt_OutStockLockInfo outStockLockInfo = _outboundRepository.OutStockLockInfoRepository.QueryFirst(x => x.TaskNum == task.TaskNum);
-                //璋冪敤MES閰嶉�佸嚭鍙戞寚浠�
-                PlanDistributionInfo planDistribution = new PlanDistributionInfo()
-                {
-                    DispatchPlanMaterialId = autoIssueDTO.OutDetailId,
-                    InvItemCode = task.MaterielCode,
-                    Quantity = outStockLockInfo.AssignQuantity,
-                    SendOutTime = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"),
-                    ArrivalTime = DateTime.Now.AddMinutes(10).ToString("yyyy-MM-dd hh:mm:ss")
-                };
-                MESDispatchModel dispatchModel= new MESDispatchModel()
-                {
-                    PRO_DispachPlanDistributionInfos=new List<PlanDistributionInfo> (){ planDistribution }
-                };
-                _unitOfWorkManage.BeginTran();
-                task.TaskStatus = TaskStatusEnum.New.ObjToInt();
-                task.TargetAddress = stationInfo.AGVStationCode;
-                BaseDal.UpdateData(task);
-                MESResponse mESResponse = _invokeMESService.MESDispatchUp(dispatchModel).DeserializeObject<MESResponse>() ?? throw new Exception("鏈幏鍙栧埌杩斿洖淇℃伅");
-                if (!mESResponse.Result)
-                {
-                    throw new Exception($"MES閰嶉�佸嚭鍙戞帴鍙h皟鐢ㄦ姤閿�,MES杩斿洖淇℃伅{DecodeUnicode(mESResponse.Msg)}");
-                }
-                PushTasksToWCS(new List<Dt_Task> { task });
-                _unitOfWorkManage.CommitTran();
-                return content.OK("鍙枡鎴愬姛");
             }
             catch (Exception ex)
             {
@@ -126,59 +133,62 @@
             WebResponseContent content = new WebResponseContent();
             try
             {
-                if (manualIssueDTO == null)
+                lock (lock_manualIssue)
                 {
-                    return content.Error("浼犲叆淇℃伅涓嶈兘涓虹┖");
+                    if (manualIssueDTO == null)
+                    {
+                        return content.Error("浼犲叆淇℃伅涓嶈兘涓虹┖");
+                    }
+                    //鑾峰彇瀵瑰簲鍗曟嵁
+                    Dt_OutMESOrder? outMESOrder = _outboundRepository.OutMESOrderRepository.QueryFirst(x => x.OutDetailId == manualIssueDTO.OutDetailId);
+                    if (outMESOrder == null)
+                    {
+                        return content.Error($"棰嗘枡璁″垝{nameof(MESAutoIssueDTO.OutDetailId)}{manualIssueDTO.OutDetailId}涓嶅瓨鍦�");
+                    }
+                    if (outMESOrder.OutMESOrderStatus == OutOrderStatusEnum.鍏抽棴.ObjToInt())
+                    {
+                        return content.Error($"棰嗘枡璁″垝{nameof(MESAutoIssueDTO.OutDetailId)}{outMESOrder.ProductOrderNo}宸ュ崟宸插叧闂�");
+                    }
+                    //鑾峰彇鍛ㄨ浆浣嶇疆缂栧彿
+                    Dt_AGVStationInfo? stationInfo = _basicRepository.AGVStationInfoRepository.QueryFirst(x => x.MESPointCode == manualIssueDTO.PointCode);
+                    if (stationInfo == null)
+                    {
+                        return content.Error($"棰嗘枡璁″垝鍛ㄨ浆浣峽nameof(MESAutoIssueDTO.PointCode)}{manualIssueDTO.PointCode}涓嶅瓨鍦�");
+                    }
+                    Dt_Task? task = BaseDal.QueryData(x => x.OrderNo == outMESOrder.OutMESOrderNo && x.TaskStatus == TaskStatusEnum.CallPending.ObjToInt()).OrderByDescending(x => x.Grade).ThenBy(x => x.TaskNum).FirstOrDefault();
+                    //鑾峰彇浠诲姟
+                    if (task == null)
+                    {
+                        return content.Error($"鏈壘鍒伴鏂欒鍒掔紪鍙穥outMESOrder.ProductOrderNo}鍙厤閫佷换鍔�");
+                    }
+                    //鑾峰彇浠诲姟鍑哄簱璇︽儏
+                    Dt_OutStockLockInfo outStockLockInfo = _outboundRepository.OutStockLockInfoRepository.QueryFirst(x => x.TaskNum == task.TaskNum);
+                    //璋冪敤MES閰嶉�佸嚭鍙戞寚浠�
+                    PlanDistributionInfo planDistribution = new PlanDistributionInfo()
+                    {
+                        DispatchPlanMaterialId = manualIssueDTO.OutDetailId,
+                        InvItemCode = task.MaterielCode,
+                        Quantity = outStockLockInfo.AssignQuantity,
+                        SendOutTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
+                        ArrivalTime = DateTime.Now.AddMinutes(15).ToString("yyyy-MM-dd HH:mm:ss")
+                    };
+                    MESDispatchModel dispatchModel = new MESDispatchModel()
+                    {
+                        PRO_DispachPlanDistributionInfos = new List<PlanDistributionInfo>() { planDistribution }
+                    };
+                    _unitOfWorkManage.BeginTran();
+                    task.TaskStatus = TaskStatusEnum.New.ObjToInt();
+                    task.TargetAddress = manualIssueDTO.PointCode.StartsWith("YS") ? stationInfo.AGVStationCode : manualIssueDTO.PointCode;
+                    BaseDal.UpdateData(task);
+                    MESResponse mESResponse = _invokeMESService.MESDispatchUp(dispatchModel).DeserializeObject<MESResponse>() ?? throw new Exception("鏈幏鍙栧埌杩斿洖淇℃伅");
+                    if (!mESResponse.Result)
+                    {
+                        throw new Exception($"MES閰嶉�佸嚭鍙戞帴鍙h皟鐢ㄦ姤閿�,MES杩斿洖淇℃伅{DecodeUnicode(mESResponse.Msg)}");
+                    }
+                    _unitOfWorkManage.CommitTran();
+                    PushTasksToWCS(new List<Dt_Task> { task });
+                    return content.OK("鍙枡鎴愬姛");
                 }
-                //鑾峰彇瀵瑰簲鍗曟嵁
-                Dt_OutMESOrder? outMESOrder = _outboundRepository.OutMESOrderRepository.QueryFirst(x => x.OutDetailId == manualIssueDTO.OutDetailId);
-                if (outMESOrder == null)
-                {
-                    return content.Error($"棰嗘枡璁″垝{nameof(MESAutoIssueDTO.OutDetailId)}{manualIssueDTO.OutDetailId}涓嶅瓨鍦�");
-                }
-                if (outMESOrder.OutMESOrderStatus == OutOrderStatusEnum.鍏抽棴.ObjToInt())
-                {
-                    return content.Error($"棰嗘枡璁″垝{nameof(MESAutoIssueDTO.OutDetailId)}{outMESOrder.ProductOrderNo}宸ュ崟宸插叧闂�");
-                }
-                //鑾峰彇鍛ㄨ浆浣嶇疆缂栧彿
-                Dt_AGVStationInfo? stationInfo = _basicRepository.AGVStationInfoRepository.QueryFirst(x => x.MESPointCode == manualIssueDTO.PointCode);
-                if (stationInfo == null)
-                {
-                    return content.Error($"棰嗘枡璁″垝鍛ㄨ浆浣峽nameof(MESAutoIssueDTO.PointCode)}{manualIssueDTO.PointCode}涓嶅瓨鍦�");
-                }
-                Dt_Task? task = BaseDal.QueryData(x => x.OrderNo == outMESOrder.OutMESOrderNo && x.TaskStatus == TaskStatusEnum.CallPending.ObjToInt()).OrderByDescending(x => x.Grade).ThenBy(x => x.TaskNum).FirstOrDefault();
-                //鑾峰彇浠诲姟
-                if (task == null)
-                {
-                    return content.Error($"鏈壘鍒伴鏂欒鍒掔紪鍙穥outMESOrder.ProductOrderNo}鍙厤閫佷换鍔�");
-                }
-                //鑾峰彇浠诲姟鍑哄簱璇︽儏
-                Dt_OutStockLockInfo outStockLockInfo = _outboundRepository.OutStockLockInfoRepository.QueryFirst(x => x.TaskNum == task.TaskNum);
-                //璋冪敤MES閰嶉�佸嚭鍙戞寚浠�
-                PlanDistributionInfo planDistribution = new PlanDistributionInfo()
-                {
-                    DispatchPlanMaterialId = manualIssueDTO.OutDetailId,
-                    InvItemCode = task.MaterielCode,
-                    Quantity = outStockLockInfo.AssignQuantity,
-                    SendOutTime = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"),
-                    ArrivalTime = DateTime.Now.AddMinutes(10).ToString("yyyy-MM-dd hh:mm:ss")
-                };
-                MESDispatchModel dispatchModel = new MESDispatchModel()
-                {
-                    PRO_DispachPlanDistributionInfos = new List<PlanDistributionInfo>() { planDistribution }
-                };
-                _unitOfWorkManage.BeginTran();
-                task.TaskStatus = TaskStatusEnum.New.ObjToInt();
-                task.TargetAddress = stationInfo.AGVStationCode;
-                BaseDal.UpdateData(task);
-                MESResponse mESResponse = _invokeMESService.MESDispatchUp(dispatchModel).DeserializeObject<MESResponse>() ?? throw new Exception("鏈幏鍙栧埌杩斿洖淇℃伅");
-                if (!mESResponse.Result)
-                {
-                    throw new Exception($"MES閰嶉�佸嚭鍙戞帴鍙h皟鐢ㄦ姤閿�,MES杩斿洖淇℃伅{DecodeUnicode(mESResponse.Msg)}");
-                }
-                PushTasksToWCS(new List<Dt_Task> { task });
-                _unitOfWorkManage.CommitTran();
-                return content.OK("鍙枡鎴愬姛");
             }
             catch (Exception ex)
             {
@@ -186,31 +196,138 @@
             }
             return content;
         }
-
+        /// <summary>
+        /// MES绌烘墭/浣欐枡鍛煎彨鎺ュ彛
+        /// </summary>
+        /// <returns></returns>
         public WebResponseContent ReceiveReturnIssue(List<MESReturnIssueDTO> returnIssueDTOs)
         {
             WebResponseContent content = new WebResponseContent();
             try
             {
-                if (returnIssueDTOs==null || returnIssueDTOs.Count<=0)
+                lock (lock_returnIssue)
                 {
-                    return content.Error("浼犲叆淇℃伅涓嶈兘涓虹┖");
+                    if (returnIssueDTOs == null || returnIssueDTOs.Count <= 0)
+                    {
+                        return content.Error("浼犲叆淇℃伅涓嶈兘涓虹┖");
+                    }
+                    //鑾峰彇鎵�鏈堿GV鐐逛綅
+                    List<Dt_AGVStationInfo> aGVStationInfos = _basicRepository.AGVStationInfoRepository.QueryData(x => !string.IsNullOrEmpty(x.MESPointCode));
+                    MESReturnIssueDTO? returnIssueDTO = returnIssueDTOs.FirstOrDefault(x => !aGVStationInfos.Select(x => x.MESPointCode).Contains(x.PointCode));
+                    if (returnIssueDTO != null)
+                    {
+                        return content.Error($"鍛ㄨ浆浣峽nameof(MESReturnIssueDTO.PointCode)}{returnIssueDTO.PointCode}涓嶅瓨鍦�");
+                    }
+                    //鑾峰彇鎵�鏈夊簱瀛�
+                    List<Dt_StockInfo> stockInfosOld = _stockRepository.StockInfoRepository.QueryData();
+                    ////绌烘墭
+                    //foreach (var item in returnIssueDTOs.Where(x=>x.ReturnMaterial==null))
+                    //{
+
+                    //}
+                    //閫�鏂�
+                    List<Dt_StockInfo> stockInfos=new List<Dt_StockInfo>();
+                    List<Dt_Task> tasksNew = new List<Dt_Task>();
+                    foreach (var item in returnIssueDTOs.Where(x => x.ReturnMaterial != null))
+                    {
+                        MESReturnMaterial? returnMaterial = item.ReturnMaterial;
+                        if (returnMaterial.BarCode.IsNullOrEmpty())
+                        {
+                            return content.Error($"閫�鏂欎紶鍏ユ潯鐮佷笉鑳戒负绌�");
+                        }
+
+                        Dt_AGVStationInfo aGVStationInfo = aGVStationInfos.FirstOrDefault(x => x.MESPointCode == item.PointCode);
+                        Dt_MaterielInfo? materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterielCode == returnMaterial.MaterialCode);
+                        if (materielInfo == null)
+                        {
+                            return content.Error($"鏈壘鍒版潯鐮亄returnMaterial.BarCode}鐗╂枡淇℃伅");
+                        }
+                        //鍒ゆ柇
+                        if (returnMaterial.Thickness <= 0 && materielInfo.WarehouseId==WarehouseEnum.LLDYL.ObjToInt())
+                        {
+                            return content.Error($"鐗╂枡{returnMaterial.MaterialCode}鏉$爜{returnMaterial.BarCode}鐩村緞涓嶈兘灏忎簬0");
+                        }
+                        if (returnMaterial.Wide <= 0 && materielInfo.WarehouseId == WarehouseEnum.LLDYL.ObjToInt())
+                        {
+                            return content.Error($"鐗╂枡{returnMaterial.MaterialCode}鏉$爜{returnMaterial.BarCode}鐩村緞涓嶈兘灏忎簬0");
+                        }
+                        Dt_StockInfo? stockInfoOld = stockInfosOld.FirstOrDefault(x => x.PalletCode == returnMaterial.BarCode);
+                        if (stockInfoOld != null)
+                        {
+                            return content.Error($"鏉$爜{returnMaterial.BarCode}淇℃伅宸插瓨鍦�");
+                        }
+                        //鐢熸垚搴撳瓨缁勭洏淇℃伅
+                        Dt_StockInfo stockInfo = new Dt_StockInfo()
+                        {
+                            MaterielInvOrgId = materielInfo.MaterielInvOrgId,
+                            PalletCode = returnMaterial.BarCode,
+                            LocationCode = "",
+                            PalletType = 1,
+                            WarehouseId = materielInfo.WarehouseId,
+                            StockAttribute = materielInfo.MaterielSourceType,
+                            StockStatus = StockStatusEmun.MES浣欐枡閫�搴�.ObjToInt(),
+                            MaterielSpec = materielInfo.MaterielSpec,
+                            BatchNo = returnMaterial.MaterialLot,
+                            Unit = materielInfo.MaterielUnit,
+                            MaterielThickness = returnMaterial.Thickness,
+                            MaterielWide = returnMaterial.Wide,
+                            MaterielWeight = returnMaterial.Weight,
+                            MaterielCode = materielInfo.MaterielCode,
+                            StockLength = returnMaterial.ReturnQuantity,
+                            OrderNo = returnMaterial.ReturnOrderNo,
+                            MaterielName = materielInfo.MaterielName,
+                            IsFull = WhetherEnum.True.ObjToInt(),
+                            IsPick = returnMaterial.Whether == 0 ? WhetherEnum.True.ObjToInt() : WhetherEnum.False.ObjToInt(),
+                            Remark = StockStatusEmun.MES浣欐枡閫�搴�.ToString()
+                        };
+                        if (stockInfo.MaterielWide > 1200)
+                        {
+                            stockInfo.PalletType = 2;
+                        }
+                        stockInfos.Add(stockInfo);
+                        //鐢熸垚浣欐枡閫�鏂欎换鍔�
+                        Dt_Task newTask = new Dt_Task()
+                        {
+                            CurrentAddress = item.PointCode.StartsWith("YS") ? aGVStationInfo.AGVStationCode : item.PointCode,
+                            Grade = 0,
+                            NextAddress = "",
+                            PalletCode = stockInfo.PalletCode,
+                            Roadway = "",
+                            SourceAddress = item.PointCode.StartsWith("YS") ? aGVStationInfo.AGVStationCode : item.PointCode,
+                            TargetAddress = "",
+                            TaskStatus = TaskStatusEnum.New.ObjToInt(),
+                            WarehouseId = materielInfo.WarehouseId,
+                            PalletType = stockInfo.PalletType,
+                            MaterielCode=stockInfo.MaterielCode,
+                            Quantity=stockInfo.StockLength,
+                            OrderNo=stockInfo.OrderNo,
+                            TaskLength = (int)stockInfo.MaterielWide,
+                            GroupId= item.IssueId,
+                            WorkCentreCode=item.MakeCode
+                        };
+                        TaskTypeEnum taskTypeEnum = aGVStationInfo.StationArea switch
+                        {
+                            nameof(StationAreaEnum.涓�妤煎嵃鍒�) => TaskTypeEnum.PrintYLBackInbound,
+                            _ => throw new Exception("鏈壘鍒板搴斾换鍔�")
+                        };
+                        newTask.TaskType = taskTypeEnum.ObjToInt();
+                        tasksNew.Add(newTask);
+                    }
+                    _unitOfWorkManage.BeginTran();
+                    BaseDal.AddData(tasksNew);
+                    _stockRepository.StockInfoRepository.AddData(stockInfos);
+                    _unitOfWorkManage.CommitTran();
+                    //鎺ㄩ�佷换鍔�
+                    PushTasksToWCS(tasksNew);
+                    content.OK("鍛煎彨鎴愬姛");
                 }
-                //鑾峰彇鎵�鏈堿GV鐐逛綅
-                List<Dt_AGVStationInfo> aGVStationInfos= _basicRepository.AGVStationInfoRepository.QueryData(x => !string.IsNullOrEmpty(x.MESPointCode));
-                MESReturnIssueDTO? returnIssueDTO = returnIssueDTOs.FirstOrDefault(x=> !aGVStationInfos.Select(x=>x.MESPointCode).Contains(x.PointCode));
-                if (returnIssueDTO != null)
-                {
-                    return content.Error($"鍛ㄨ浆浣峽nameof(MESReturnIssueDTO.PointCode)}{returnIssueDTO.PointCode}涓嶅瓨鍦�");
-                }
-                content.OK("鍛煎彨鎴愬姛");
             }
             catch (Exception ex)
             {
+                _unitOfWorkManage.RollbackTran();
                 content.Error(ex.Message);
             }
             return content;
         }
-        
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
index f36d870..c02eb9c 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
@@ -164,7 +164,9 @@
                     TaskStatus = TaskStatusEnum.New.ObjToInt(),
                     WarehouseId = stockInfo.WarehouseId,
                     PalletType = stockInfo.PalletType,
-                    TaskLength = (int)stockInfo.MaterielWide
+                    TaskLength = (int)stockInfo.MaterielWide,
+                    MaterielCode=stockInfo.MaterielCode,
+                    Quantity=stockInfo.StockLength
                 };
                 //鏇存柊鐘舵��
                 if (stockInfo.StockStatus == StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt())
@@ -213,22 +215,25 @@
                     }
                     else if (stockInfoOld != null && stockInfoOld.MaterielInvOrgId == MaterielInvOrgEnum.鑰佸巶.ObjToInt() && stockInfoOld.StockStatus == StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt() && stockInfoOld.IsPick==WhetherEnum.False.ObjToInt() && stationCode.IsNotEmptyOrNull())
                     {
-                        stockInfoOld.StockStatus = StockStatusEmun.鑰佸巶閫�搴�.ObjToInt();
-                        stockInfoOld.IsFull = WhetherEnum.True.ObjToInt();
-                        stockInfoOld.StockOutLength = 0;
-                        stockInfoOld.WarehouseId = WarehouseEnum.LLDYL.ObjToInt();
+                        decimal oldQty = stockInfoOld.StockLength;
+                        //璋冪敤鏇存柊閫�鏂欏簱瀛�
+                        stockInfoOld = ReturnStockUp(stockInfoOld, thickness);
+                        //鏇存柊鏁版嵁
                         UpdateStock(stockInfoOld, weight, thickness, wide);
-                        return content.OK($"鑰佸巶鏈鏂欓��搴搟stockInfoOld.RfidCode}");
+                        //璁板綍搴撳瓨鍙樺姩
+                        _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfoOld, oldQty, oldQty < stockInfoOld.StockLength ? stockInfoOld.StockLength - oldQty : oldQty - stockInfoOld.StockLength, StockChangeTypeEnum.MaterielGroup);
+                        return content.OK($"鑰佸巶鏈鏂欓��搴揜FID{stockInfoOld.RfidCode}鏉$爜{stockInfoOld.PalletCode}");
                     }
                     else if (stockInfoOld != null && stockInfoOld.MaterielInvOrgId == MaterielInvOrgEnum.鑰佸巶.ObjToInt() && stockInfoOld.StockStatus == StockStatusEmun.鑰佸巶閫�鏂欐殏瀛�.ObjToInt() && stationCode.IsNotEmptyOrNull())
                     {
-                        stockInfoOld.StockStatus = StockStatusEmun.鑰佸巶閫�搴�.ObjToInt();
-                        stockInfoOld.IsFull = WhetherEnum.True.ObjToInt();
-                        stockInfoOld.IsPick = WhetherEnum.False.ObjToInt();
-                        stockInfoOld.StockOutLength = 0;
-                        stockInfoOld.WarehouseId = WarehouseEnum.LLDYL.ObjToInt();
+                        decimal oldQty = stockInfoOld.StockLength;
+                        //璋冪敤鏇存柊閫�鏂欏簱瀛�
+                        stockInfoOld = ReturnStockUp(stockInfoOld, thickness);
+                        //鏇存柊鏁版嵁
                         UpdateStock(stockInfoOld, weight, thickness, wide);
-                        return content.OK($"鑰佸巶棰嗘枡閫�搴搟stockInfoOld.RfidCode}");
+                        //璁板綍搴撳瓨鍙樺姩
+                        _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfoOld, oldQty, oldQty < stockInfoOld.StockLength ? stockInfoOld.StockLength- oldQty: oldQty- stockInfoOld.StockLength, StockChangeTypeEnum.MaterielGroup);
+                        return content.OK($"鑰佸巶棰嗘枡閫�搴揜FID{stockInfoOld.RfidCode}鏉$爜{stockInfoOld.PalletCode}");
                     }
                     else if (stockInfoOld != null)
                     {
@@ -263,7 +268,7 @@
                                     UpdateStock(ExistStockInfo, weight, thickness, wide);
                                     _inboundRepository.YLInboundCacheRepository.UpdateData(yLInboundCache);
                                     _unitOfWorkManage.CommitTran();
-                                    return content.OK($"閲囪喘鍏ュ簱{ExistStockInfo.RfidCode}");
+                                    return content.OK($"閲囪喘鍏ュ簱RFID{ExistStockInfo.RfidCode}缁戝畾{ExistStockInfo.PalletCode}");
                                 }
                                 else
                                 {
@@ -339,6 +344,37 @@
                 content.Error(ex.Message);
             }
             return content;
+        }
+        /// <summary>
+        /// 鏇存柊閫�鏂欏簱瀛�
+        /// </summary>
+        /// <returns></returns>
+        public Dt_StockInfo ReturnStockUp(Dt_StockInfo stockInfoOld,decimal thickness)
+        {
+            BSTResponse<BSTStockInfoDTO> bSTResponse = _invokeERPService.BSTStockAsync(stockInfoOld.PalletCode).DeserializeObject<BSTResponse<BSTStockInfoDTO>>();
+            if (bSTResponse.Code == 500)
+            {
+                throw new Exception($"鏈壘鍒版潯鐮亄stockInfoOld.PalletCode}涓�鏈烢RP搴撳瓨涓嶅瓨鍦�");
+            }
+
+            BSTStockInfoDTO bSTStockInfoDTO = bSTResponse.Data ?? throw new Exception($"涓�鏈烢RP鏈繑鍥瀧stockInfoOld.PalletCode}鐨勫簱瀛樹俊鎭�");
+            if (stockInfoOld.StockStatus == StockStatusEmun.鑰佸巶閫�鏂欐殏瀛�.ObjToInt())
+            {
+                stockInfoOld.IsPick = WhetherEnum.False.ObjToInt();
+            }
+            stockInfoOld.StockStatus = StockStatusEmun.鑰佸巶閫�搴�.ObjToInt();
+            stockInfoOld.MaterielThickness = bSTStockInfoDTO.Thick;
+            stockInfoOld.MaterielWeight = bSTStockInfoDTO.Qty;
+            stockInfoOld.MaterielWide = bSTStockInfoDTO.W;
+            stockInfoOld.StockLength = bSTStockInfoDTO.StockMeter;
+            stockInfoOld.IsFull = WhetherEnum.True.ObjToInt();
+            stockInfoOld.StockOutLength = 0;
+            stockInfoOld.WarehouseId = WarehouseEnum.LLDYL.ObjToInt();
+            if (thickness < 800)
+            {
+                throw new Exception($"RFID{stockInfoOld.RfidCode}鏉$爜{stockInfoOld.PalletCode}鐩村緞灏忎簬800mm");
+            }
+            return stockInfoOld;
         }
         public void UpdateStock(Dt_StockInfo stockInfo, decimal weight = 0, decimal thickness = 0, decimal wide = 0)
         {
@@ -453,6 +489,7 @@
                         }
                         _unitOfWorkManage.CommitTran();
                         Dt_StockInfo stockInfoAdd = _stockRepository.StockInfoRepository.QueryFirst(x => x.PalletCode == stockInfo.PalletCode);
+                        //璁板綍搴撳瓨鍙樺姩
                         _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfoAdd, 0, stockInfoAdd.StockLength, StockChangeTypeEnum.MaterielGroup);
                         return content.OK("鎴愬姛", yLInboundCache);
                     }
@@ -524,6 +561,7 @@
                             }
                             _unitOfWorkManage.CommitTran();
                             Dt_StockInfo stockInfoAdd = _stockRepository.StockInfoRepository.QueryFirst(x => x.PalletCode == stockInfo.PalletCode);
+                            //璁板綍搴撳瓨鍙樺姩
                             _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfoAdd, 0, stockInfoAdd.StockLength, StockChangeTypeEnum.MaterielGroup);
                             return content.OK("鎴愬姛", yLInboundCache);
                         }
@@ -601,6 +639,7 @@
                             }
                             _unitOfWorkManage.CommitTran();
                             Dt_StockInfo stockInfoAdd = _stockRepository.StockInfoRepository.QueryFirst(x => x.PalletCode == stockInfo.PalletCode);
+                            //璁板綍搴撳瓨鍙樺姩
                             _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfoAdd, 0, stockInfoAdd.StockLength, StockChangeTypeEnum.MaterielGroup);
                             return content.OK("鎴愬姛", yLInboundCache);
                         }
@@ -671,7 +710,7 @@
                     if (stockInfo.MaterielThickness >= 300 && stockInfo.MaterielThickness <= 1300 && stockInfo.MaterielWide >= 700 && stockInfo.MaterielWide <= 2700)
                     {
                         //鑾峰彇鍒嗛厤
-                        List<LocationCount> locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => x.WarehouseId == warehouse.WarehouseId && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.RoadwayNo.Contains("YLDual") && (stockInfo.PalletType == LocationTypeEnum.MediumPallet.ObjToInt() ? x.LocationType == LocationTypeEnum.MediumPallet.ObjToInt(): x.LocationType == LocationTypeEnum.SmallPallet.ObjToInt())).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).ToList();
+                        List<LocationCount> locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => x.WarehouseId == warehouse.WarehouseId && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.RoadwayNo.Contains("YLDual") && (stockInfo.PalletType == LocationTypeEnum.MediumPallet.ObjToInt() ? x.LocationType == LocationTypeEnum.MediumPallet.ObjToInt(): x.LocationType == LocationTypeEnum.SmallPallet.ObjToInt())).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).OrderBy(x => x.RoadwayNo).ToList();
 
                         roadwayNo = HandleRoadway(locationCounts, warehouse);
                     }
@@ -679,7 +718,7 @@
                 else
                 {
                     //闄愬埗
-                    if (stockInfo.MaterielThickness >= 800 && stockInfo.MaterielThickness <= 1500 && stockInfo.MaterielWide >= 700 && stockInfo.MaterielWide <= 2500)
+                    if ((stockInfo.MaterielThickness >= 800 || (stockInfo.CheckThickness >= 800 && stockInfo.StockStatus==StockStatusEmun.鑰佸巶閫�搴�.ObjToInt())) && stockInfo.MaterielThickness <= 1500 && stockInfo.MaterielWide >= 700 && stockInfo.MaterielWide <= 2500)
                     {
                         bool LayerLimit = false;
                         if (stockInfo.MaterielThickness>1300)
@@ -687,10 +726,10 @@
                             LayerLimit = true;
                         }
                         //鑾峰彇鍒嗛厤
-                        List<LocationCount> locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => x.WarehouseId == warehouse.WarehouseId && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() &&  x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.RoadwayNo.Contains("YL") && !x.RoadwayNo.Contains("YLDual") && (LayerLimit ? x.Columns>=56 : x.Columns<=55)).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).ToList();
+                        List<LocationCount> locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => x.WarehouseId == warehouse.WarehouseId && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() &&  x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.RoadwayNo.Contains("YL") && !x.RoadwayNo.Contains("YLDual") && (LayerLimit ? x.Columns>=56 : x.Columns<=55)).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).OrderBy(x => x.RoadwayNo).ToList();
                         if (stockInfo.MaterielWide > 2200)
                         {
-                            locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => x.WarehouseId == warehouse.WarehouseId && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.RoadwayNo == "SC02_YL" && (LayerLimit ? x.Columns >= 56 : x.Columns <= 55)).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).ToList();
+                            locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => x.WarehouseId == warehouse.WarehouseId && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.RoadwayNo == "SC02_YL" && (LayerLimit ? x.Columns >= 56 : x.Columns <= 55)).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).OrderBy(x => x.RoadwayNo).ToList();
                         }
 
                         roadwayNo = HandleRoadway(locationCounts, warehouse);
@@ -778,7 +817,7 @@
                         _basicService.LocationInfoService.UpdateLocationStatus(locationInfoEnd, proStockInfo.PalletType, LocationStatusEnum.InStock, proStockInfo.WarehouseId);
                         BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? WIDESEA_Core.Enums.OperateTypeEnum.浜哄伐瀹屾垚 : WIDESEA_Core.Enums.OperateTypeEnum.鑷姩瀹屾垚);
                         _unitOfWorkManage.CommitTran();
-                        _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(proStockInfo, 0, proStockInfo.proStockInfoDetails.Sum(x => x.StockQty), StockChangeTypeEnum.MaterielGroup);
+                        _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(proStockInfo, 0, proStockInfo.proStockInfoDetails.Sum(x => x.StockQty), StockChangeTypeEnum.Inbound);
                     }
                     else
                     {
@@ -816,8 +855,11 @@
                     _stockService.StockInfoService.Repository.UpdateData(stockInfo);
                     _basicService.LocationInfoService.UpdateLocationStatus(locationInfoEnd, stockInfo.PalletType, LocationStatusEnum.InStock, stockInfo.WarehouseId);
                     BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? WIDESEA_Core.Enums.OperateTypeEnum.浜哄伐瀹屾垚 : WIDESEA_Core.Enums.OperateTypeEnum.鑷姩瀹屾垚);
+                    _unitOfWorkManage.CommitTran();
+                    //璁板綍搴撳瓨鍙樺姩
+                    _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfo.StockLength, 0, StockChangeTypeEnum.Inbound,taskNum:task.TaskNum);
                     //涓婃姤鑰佸巶ERP
-                    if (stockInfo.MaterielInvOrgId == MaterielInvOrgEnum.鑰佸巶.ObjToInt() && task.TaskType==TaskTypeEnum.Inbound.ObjToInt())
+                    if (stockInfo.MaterielInvOrgId == MaterielInvOrgEnum.鑰佸巶.ObjToInt() && task.TaskType == TaskTypeEnum.Inbound.ObjToInt())
                     {
                         int Qty = Convert.ToInt32(stockInfo.MaterielWeight);
                         BSTPurchaseUpModel bSTPurchaseUpModel = new BSTPurchaseUpModel()
@@ -828,16 +870,10 @@
                             RfidUpdateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")
                         };
                         BSTResponse<object> bSTResponse = _invokeERPService.BSTPurchaseUp(bSTPurchaseUpModel).DeserializeObject<BSTResponse<object>>();
-                        if (bSTResponse.Code == 500)
-                        {
-                            throw new Exception($"BST涓�鏈烢RP鍚屾鍏ュ簱淇℃伅澶辫触,閿欒淇℃伅锛歿bSTResponse.Msg}");
-                        }
-                        content.Message = bSTResponse.Msg;
+                        content.Message = bSTResponse?.Msg;
                     }
-                    _unitOfWorkManage.CommitTran();
-                    _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfo.StockLength, 0, StockChangeTypeEnum.Inbound,taskNum:task.TaskNum);
                 }
-                return content.OK();
+                content.OK();
             }
             catch (Exception ex)
             {
@@ -1137,97 +1173,208 @@
             WebResponseContent content=new WebResponseContent();
             try
             {
-                //鑾峰彇涓诲崟
-                Dt_InboundOrder inboundOrder = BaseDal.Db.Queryable<Dt_InboundOrder>().Where(x => x.OrderType == orderType).Includes(x => x.Details).Where(x => x.Details.Any(v => v.BarCode == bindCode)).First();
-                if (inboundOrder == null)
+                InOrderTypeEnum inOrderTypeEnum = (InOrderTypeEnum)orderType;
+                if (inOrderTypeEnum == InOrderTypeEnum.InventoryIn)
                 {
-                    throw new Exception($"鏈壘鍒版潯鐮亄bindCode}鍏ュ簱鍗曟嵁淇℃伅");
-                }
-                Dt_InboundOrderDetail inboundOrderDetail = inboundOrder.Details.FirstOrDefault(x => x.BarCode == bindCode);
-                if (inboundOrderDetail == null)
-                {
-                    throw new Exception($"鏈壘鍒板叆搴撳崟鍙蜂负{inboundOrder.UpperOrderNo}鏉$爜{bindCode}鍗曟嵁淇℃伅");
-                }
-                if (inboundOrderDetail.OrderDetailStatus != InOrderStatusEnum.鏈紑濮�.ObjToInt())
-                {
-                    throw new Exception($"鏉$爜{bindCode}淇℃伅宸插叆搴撴垨鍏ュ簱涓�");
-                }
-                Dt_AGVStationInfo agvstation = _basicRepository.AGVStationInfoRepository.QueryFirst(x => x.AGVStationCode == startPoint);
-                if (agvstation == null)
-                {
-                    return content.Error($"璧风偣閿欒{startPoint}");
-                }
-                //鍒ゆ柇褰撳墠鐐逛綅鏄惁閲嶅
-                Dt_Task taskOldPoint = BaseDal.QueryFirst(x => x.SourceAddress == startPoint && (x.TaskStatus == TaskStatusEnum.New.ObjToInt() || x.TaskStatus == TaskStatusEnum.AGV_Executing.ObjToInt()));
-                if (taskOldPoint != null)
-                {
-                    return content.Error($"绔欑偣{startPoint}宸插瓨鍦ㄤ换鍔�");
-                }
-                Dt_Task taskOld = BaseDal.QueryFirst(x => x.PalletCode == barCode);
-                if (taskOld != null)
-                {
-                    return content.Error($"鎵樼洏{barCode}浠诲姟宸插瓨鍦�");
-                }
-                Dt_ProStockInfo proStockInfoOld = _stockRepository.ProStockInfoRepository.QueryFirst(x => x.PalletCode == barCode);
-                if (proStockInfoOld != null)
-                {
-                    return content.Error($"鎵樼洏{barCode}宸插瓨鍦�");
-                }
-                //鍒嗛厤宸烽亾
-                string roadWay = AssignCPRoadwayNo();
-                //鑾峰彇鐗╂枡
-                Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x =>x.WarehouseId==inboundOrder.WarehouseId && x.MaterielCode == inboundOrderDetail.MaterialCode);
-                Dt_ProStockInfoDetail proStockInfoDetail = new Dt_ProStockInfoDetail()
-                {
-                    ProductCode = materielInfo.MaterielCode,
-                    ProductNo=bindCode,
-                    ProductName = materielInfo.MaterielName,
-                    ProductSpec = materielInfo.MaterielSpec,
-                    LotNumber = inboundOrderDetail.MaterialLot,
-                    ProductUnit = materielInfo.MaterielUnit,
-                    StockQty = inboundOrderDetail.OrderQuantity,
-                    ProStockDetailStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt()
-                };
-                Dt_ProStockInfo proStockInfo = new Dt_ProStockInfo()
-                {
-                    PalletCode = barCode,
-                    ProStockAttribute = materielInfo.MaterielSourceType,
-                    PalletType = 1,
-                    LocationCode = "",
-                    WarehouseId = materielInfo.WarehouseId,
-                    StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt(),
-                    proStockInfoDetails = new List<Dt_ProStockInfoDetail> { proStockInfoDetail }
-                };
+                    //鑾峰彇涓诲崟
+                    Dt_InboundOrder inboundOrder = BaseDal.Db.Queryable<Dt_InboundOrder>().Includes(x => x.Details).Where(x => x.Details.Any(v => v.BarCode == bindCode)).First();
 
-                Dt_Task newTask = new Dt_Task()
-                {
-                    CurrentAddress = startPoint,
-                    Grade = 0,
-                    NextAddress = "",
-                    PalletCode = barCode,
-                    Roadway = roadWay,
-                    SourceAddress = startPoint,
-                    TargetAddress = "",
-                    TaskType = TaskTypeEnum.Inbound.ObjToInt(),
-                    TaskStatus = TaskStatusEnum.New.ObjToInt(),
-                    WarehouseId = inboundOrder.WarehouseId,
-                    PalletType = 1,
-                    Remark="鍒濇湡鍏ュ簱"
-                };
-                inboundOrderDetail.OrderDetailStatus=InOrderStatusEnum.鍏ュ簱涓�.ObjToInt();
-                _unitOfWorkManage.BeginTran();
-                if (inboundOrder.InboundOrderStatus==InOrderStatusEnum.鏈紑濮�.ObjToInt())
-                {
-                    inboundOrder.InboundOrderStatus = InOrderStatusEnum.鍏ュ簱涓�.ObjToInt();
-                    _inboundRepository.InboundOrderRepository.UpdateData(inboundOrder);
+                    if (inboundOrder == null)
+                    {
+                        throw new Exception($"鏈壘鍒版潯鐮亄bindCode}鍏ュ簱鍗曟嵁淇℃伅");
+                    }
+                    Dt_InboundOrderDetail inboundOrderDetail = inboundOrder.Details.FirstOrDefault(x => x.BarCode == bindCode);
+                    if (inboundOrderDetail == null)
+                    {
+                        throw new Exception($"鏈壘鍒板叆搴撳崟鍙蜂负{inboundOrder.UpperOrderNo}鏉$爜{bindCode}鍗曟嵁淇℃伅");
+                    }
+                    if (inboundOrderDetail.OrderDetailStatus != InOrderStatusEnum.鏈紑濮�.ObjToInt())
+                    {
+                        throw new Exception($"鏉$爜{bindCode}淇℃伅宸插叆搴撴垨鍏ュ簱涓�");
+                    }
+                    Dt_AGVStationInfo agvstation = _basicRepository.AGVStationInfoRepository.QueryFirst(x => x.AGVStationCode == startPoint);
+                    if (agvstation == null)
+                    {
+                        return content.Error($"璧风偣閿欒{startPoint}");
+                    }
+                    //鍒ゆ柇褰撳墠鐐逛綅鏄惁閲嶅
+                    Dt_Task taskOldPoint = BaseDal.QueryFirst(x => x.SourceAddress == startPoint && (x.TaskStatus == TaskStatusEnum.New.ObjToInt() || x.TaskStatus == TaskStatusEnum.AGV_Executing.ObjToInt()));
+                    if (taskOldPoint != null)
+                    {
+                        return content.Error($"绔欑偣{startPoint}宸插瓨鍦ㄤ换鍔�");
+                    }
+                    Dt_Task taskOld = BaseDal.QueryFirst(x => x.PalletCode == barCode);
+                    if (taskOld != null)
+                    {
+                        return content.Error($"鎵樼洏{barCode}浠诲姟宸插瓨鍦�");
+                    }
+                    Dt_ProStockInfo proStockInfoOld = _stockRepository.ProStockInfoRepository.QueryFirst(x => x.PalletCode == barCode);
+                    if (proStockInfoOld != null)
+                    {
+                        return content.Error($"鎵樼洏{barCode}宸插瓨鍦�");
+                    }
+                    //鍒嗛厤宸烽亾
+                    string roadWay = AssignCPRoadwayNo();
+                    //鑾峰彇鐗╂枡
+                    Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.WarehouseId == inboundOrder.WarehouseId && x.MaterielCode == inboundOrderDetail.MaterialCode);
+                    Dt_ProStockInfoDetail proStockInfoDetail = new Dt_ProStockInfoDetail()
+                    {
+                        ProductCode = materielInfo.MaterielCode,
+                        ProductNo = bindCode,
+                        ProductName = materielInfo.MaterielName,
+                        ProductSpec = materielInfo.MaterielSpec,
+                        LotNumber = inboundOrderDetail.MaterialLot,
+                        ProductUnit = materielInfo.MaterielUnit,
+                        StockQty = inboundOrderDetail.OrderQuantity,
+                        ProStockDetailStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt()
+                    };
+                    Dt_ProStockInfo proStockInfo = new Dt_ProStockInfo()
+                    {
+                        PalletCode = barCode,
+                        ProInOrderNo = inboundOrder.UpperOrderNo,
+                        ProStockAttribute = materielInfo.MaterielSourceType,
+                        PalletType = 1,
+                        LocationCode = "",
+                        WarehouseId = materielInfo.WarehouseId,
+                        StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt(),
+                        proStockInfoDetails = new List<Dt_ProStockInfoDetail> { proStockInfoDetail }
+                    };
+                    //鐢熸垚浠诲姟
+                    Dt_Task newTask = new Dt_Task()
+                    {
+                        CurrentAddress = startPoint,
+                        Grade = 0,
+                        NextAddress = "",
+                        PalletCode = barCode,
+                        Roadway = roadWay,
+                        SourceAddress = startPoint,
+                        TargetAddress = "",
+                        TaskType = TaskTypeEnum.Inbound.ObjToInt(),
+                        TaskStatus = TaskStatusEnum.New.ObjToInt(),
+                        WarehouseId = inboundOrder.WarehouseId,
+                        OrderNo = inboundOrder.UpperOrderNo,
+                        MaterielCode = inboundOrderDetail.MaterialCode,
+                        Quantity = inboundOrderDetail.OrderQuantity,
+                        PalletType = 1
+                    };
+                    inboundOrderDetail.OrderDetailStatus = InOrderStatusEnum.鍏ュ簱涓�.ObjToInt();
+                    _unitOfWorkManage.BeginTran();
+                    if (inboundOrder.InboundOrderStatus == InOrderStatusEnum.鏈紑濮�.ObjToInt())
+                    {
+                        inboundOrder.InboundOrderStatus = InOrderStatusEnum.鍏ュ簱涓�.ObjToInt();
+                        _inboundRepository.InboundOrderRepository.UpdateData(inboundOrder);
+                    }
+                    _inboundRepository.InboundOrderDetailRepository.UpdateData(inboundOrderDetail);
+                    int taskId = BaseDal.AddData(newTask);
+                    BaseDal.Db.InsertNav(proStockInfo).Include(x => x.proStockInfoDetails).ExecuteCommand();
+                    newTask.TaskId = taskId;
+                    _unitOfWorkManage.CommitTran();
+                    //鎺ㄩ�佷换鍔�
+                    PushTasksToWCS(new List<Dt_Task> { newTask }, "AGV");
                 }
-                _inboundRepository.InboundOrderDetailRepository.UpdateData(inboundOrderDetail);
-                int taskId = BaseDal.AddData(newTask);
-                BaseDal.Db.InsertNav(proStockInfo).Include(x => x.proStockInfoDetails).ExecuteCommand();
-                newTask.TaskId = taskId;
-                _unitOfWorkManage.CommitTran();
-                //鎺ㄩ�佷换鍔�
-                PushTasksToWCS(new List<Dt_Task> { newTask }, "AGV");
+                else if (inOrderTypeEnum == InOrderTypeEnum.PurchaseIn)
+                {
+                    //鑾峰彇涓诲崟
+                    Dt_PurchaseOrder inboundOrder = BaseDal.Db.Queryable<Dt_PurchaseOrder>().Includes(x => x.Details).Where(x => x.Details.Any(v => v.BarCode == bindCode)).First();
+
+                    if (inboundOrder == null)
+                    {
+                        throw new Exception($"鏈壘鍒版潯鐮亄bindCode}閲囪喘鍏ュ簱鍗曟嵁淇℃伅");
+                    }
+                    Dt_PurchaseOrderDetail inboundOrderDetail = inboundOrder.Details.FirstOrDefault(x => x.BarCode == bindCode);
+                    if (inboundOrderDetail == null)
+                    {
+                        throw new Exception($"鏈壘鍒板叆搴撳崟鍙蜂负{inboundOrder.PurchaseOrderNo}鏉$爜{bindCode}鍗曟嵁淇℃伅");
+                    }
+                    if (inboundOrderDetail.PurchaseDetailStatus != InOrderStatusEnum.鏈紑濮�.ObjToInt())
+                    {
+                        throw new Exception($"鏉$爜{bindCode}淇℃伅宸插叆搴撴垨鍏ュ簱涓�");
+                    }
+                    Dt_AGVStationInfo agvstation = _basicRepository.AGVStationInfoRepository.QueryFirst(x => x.AGVStationCode == startPoint);
+                    if (agvstation == null)
+                    {
+                        return content.Error($"璧风偣閿欒{startPoint}");
+                    }
+                    //鍒ゆ柇褰撳墠鐐逛綅鏄惁閲嶅
+                    Dt_Task taskOldPoint = BaseDal.QueryFirst(x => x.SourceAddress == startPoint && (x.TaskStatus == TaskStatusEnum.New.ObjToInt() || x.TaskStatus == TaskStatusEnum.AGV_Executing.ObjToInt()));
+                    if (taskOldPoint != null)
+                    {
+                        return content.Error($"绔欑偣{startPoint}宸插瓨鍦ㄤ换鍔�");
+                    }
+                    Dt_Task taskOld = BaseDal.QueryFirst(x => x.PalletCode == barCode);
+                    if (taskOld != null)
+                    {
+                        return content.Error($"鎵樼洏{barCode}浠诲姟宸插瓨鍦�");
+                    }
+                    Dt_ProStockInfo proStockInfoOld = _stockRepository.ProStockInfoRepository.QueryFirst(x => x.PalletCode == barCode);
+                    if (proStockInfoOld != null)
+                    {
+                        return content.Error($"鎵樼洏{barCode}宸插瓨鍦�");
+                    }
+                    //鍒嗛厤宸烽亾
+                    string roadWay = AssignCPRoadwayNo();
+                    //鑾峰彇鐗╂枡
+                    Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.WarehouseId == inboundOrder.WarehouseId && x.MaterielCode == inboundOrderDetail.MaterialCode);
+                    Dt_ProStockInfoDetail proStockInfoDetail = new Dt_ProStockInfoDetail()
+                    {
+                        ProductCode = materielInfo.MaterielCode,
+                        ProductNo = bindCode,
+                        ProductName = materielInfo.MaterielName,
+                        ProductSpec = materielInfo.MaterielSpec,
+                        LotNumber = inboundOrderDetail.MaterialLot,
+                        ProductUnit = materielInfo.MaterielUnit,
+                        StockQty = inboundOrderDetail.PurchaseDetailQuantity,
+                        ProStockDetailStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt()
+                    };
+                    Dt_ProStockInfo proStockInfo = new Dt_ProStockInfo()
+                    {
+                        PalletCode = barCode,
+                        ProInOrderNo = inboundOrder.PurchaseOrderNo,
+                        ProStockAttribute = materielInfo.MaterielSourceType,
+                        PalletType = 1,
+                        LocationCode = "",
+                        WarehouseId = materielInfo.WarehouseId,
+                        StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt(),
+                        proStockInfoDetails = new List<Dt_ProStockInfoDetail> { proStockInfoDetail }
+                    };
+                    //鐢熸垚浠诲姟
+                    Dt_Task newTask = new Dt_Task()
+                    {
+                        CurrentAddress = startPoint,
+                        Grade = 0,
+                        NextAddress = "",
+                        PalletCode = barCode,
+                        Roadway = roadWay,
+                        SourceAddress = startPoint,
+                        TargetAddress = "",
+                        TaskType = TaskTypeEnum.Inbound.ObjToInt(),
+                        TaskStatus = TaskStatusEnum.New.ObjToInt(),
+                        WarehouseId = inboundOrder.WarehouseId,
+                        OrderNo = inboundOrder.PurchaseOrderNo,
+                        MaterielCode=inboundOrderDetail.MaterialCode,
+                        Quantity=inboundOrderDetail.PurchaseDetailQuantity,
+                        PalletType = 1
+                    };
+                    inboundOrderDetail.PurchaseDetailStatus = InOrderStatusEnum.鍏ュ簱涓�.ObjToInt();
+                    _unitOfWorkManage.BeginTran();
+                    if (inboundOrder.PurchaseOrderStatus == InOrderStatusEnum.鏈紑濮�.ObjToInt())
+                    {
+                        inboundOrder.PurchaseOrderStatus = InOrderStatusEnum.鍏ュ簱涓�.ObjToInt();
+                        _inboundRepository.PurchaseOrderRepository.UpdateData(inboundOrder);
+                    }
+                    _inboundRepository.PurchaseOrderDetailRepository.UpdateData(inboundOrderDetail);
+                    int taskId = BaseDal.AddData(newTask);
+                    BaseDal.Db.InsertNav(proStockInfo).Include(x => x.proStockInfoDetails).ExecuteCommand();
+                    newTask.TaskId = taskId;
+                    _unitOfWorkManage.CommitTran();
+                    //鎺ㄩ�佷换鍔�
+                    PushTasksToWCS(new List<Dt_Task> { newTask }, "AGV");
+                }
+                else
+                {
+                    return content.Error($"鏈壘鍒板搴斿崟鎹被鍨�");
+                }
+                
                 content.OK("鍙戦�佹垚鍔�");
 
             }
@@ -1458,6 +1605,10 @@
                             return content.Error($"鍛ㄨ浆浣峽nameof(MESReturnIssueDTO.PointCode)}{item?.PointCode}涓嶅瓨鍦�,浠呮垚鍝佺墿鏂欏彲涓嶄紶");
                         }
                     }
+                    if (materielInfo.MaterielSourceType == MaterielTypeEnum.鎴愬搧.ObjToInt() && (item.Length <= 0 || item.Width <= 0 || item.Height<=0))
+                    {
+                        return content.Error($"绠辩爜{item.ProPackCode}锛岄暱搴�/瀹藉害/楂樺害涓嶈兘涓�0");
+                    }
                     Dt_MESProInOrderInfo AddproInOrderInfo = _mapper.Map<Dt_MESProInOrderInfo>(item);
                     AddproInOrderInfo.WarehouseId = materielInfo.WarehouseId;
                     AddproInOrderInfo.MESProOrderType = materielInfo.MaterielSourceType;
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
index 8a462a4..bc8997a 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
@@ -25,6 +25,7 @@
 using WIDESEA_DTO.MES;
 using WIDESEA_DTO.Outbound;
 using Microsoft.IdentityModel.Tokens;
+using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup;
 
 namespace WIDESEA_TaskInfoService
 {
@@ -137,13 +138,13 @@
                         task.TaskStatus = TaskStatusEnum.Finish.ObjToInt();
                         _unitOfWorkManage.BeginTran();
                         proStockInfo.StockStatus = StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt();
-                        _stockRepository.ProStockInfoRepository.DeleteAndMoveIntoHty(proStockInfo,App.User.UserId > 0 ? WIDESEA_Core.Enums.OperateTypeEnum.浜哄伐瀹屾垚 : WIDESEA_Core.Enums.OperateTypeEnum.鑷姩瀹屾垚);
+                        _stockRepository.ProStockInfoRepository.DeleteAndMoveIntoHty(proStockInfo,App.User.UserId > 0 ? OperateTypeEnum.浜哄伐瀹屾垚 : OperateTypeEnum.鑷姩瀹屾垚);
                         if (proStockInfo.proStockInfoDetails!=null && proStockInfo.proStockInfoDetails.Count>0)
                         {
-                            _stockRepository.ProStockInfoDetailRepository.DeleteAndMoveIntoHty(proStockInfo.proStockInfoDetails, App.User.UserId > 0 ? WIDESEA_Core.Enums.OperateTypeEnum.浜哄伐瀹屾垚 : WIDESEA_Core.Enums.OperateTypeEnum.鑷姩瀹屾垚);
+                            _stockRepository.ProStockInfoDetailRepository.DeleteAndMoveIntoHty(proStockInfo.proStockInfoDetails, App.User.UserId > 0 ? OperateTypeEnum.浜哄伐瀹屾垚 : OperateTypeEnum.鑷姩瀹屾垚);
                         }
                         _basicService.LocationInfoService.UpdateLocationStatus(locationInfoStart, proStockInfo.PalletType, LocationStatusEnum.Free, proStockInfo.WarehouseId);
-                        BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? WIDESEA_Core.Enums.OperateTypeEnum.浜哄伐瀹屾垚 : WIDESEA_Core.Enums.OperateTypeEnum.鑷姩瀹屾垚);
+                        BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? OperateTypeEnum.浜哄伐瀹屾垚 : OperateTypeEnum.鑷姩瀹屾垚);
                         _unitOfWorkManage.CommitTran();
                     }
                     else
@@ -180,7 +181,7 @@
                         else
                         {
                             stockInfo.StockStatus = StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt();
-                            _stockRepository.StockInfoRepository.DeleteAndMoveIntoHty(stockInfo, App.User.UserId > 0 ? WIDESEA_Core.Enums.OperateTypeEnum.浜哄伐瀹屾垚 : WIDESEA_Core.Enums.OperateTypeEnum.鑷姩瀹屾垚);
+                            _stockRepository.StockInfoRepository.DeleteAndMoveIntoHty(stockInfo, App.User.UserId > 0 ? OperateTypeEnum.浜哄伐瀹屾垚 : OperateTypeEnum.鑷姩瀹屾垚);
                         }
                         if (outStockLockInfos!=null && outStockLockInfos.Count>0)
                         {
@@ -189,9 +190,25 @@
                                 x.Status=OutLockStockStatusEnum.鍑哄簱瀹屾垚.ObjToInt();
                             });
                             _outboundRepository.OutStockLockInfoRepository.UpdateData(outStockLockInfos);
+                            List<Dt_OutStockLockInfo> outStockLockInfosSG = outStockLockInfos.Where(x => x.OrderType == OutOrderTypeEnum.OutSGPick.ObjToInt()).ToList();
+                            List<Dt_OutStockLockInfo> outStockLockInfosMES = outStockLockInfos.Where(x => x.OrderType == OutOrderTypeEnum.OutMESPick.ObjToInt()).ToList();
+                            if (outStockLockInfosSG !=null && outStockLockInfosSG.Count()>0)
+                            {
+                                _outboundService.OutLineViewService.SaveLineView(outStockLockInfosSG);
+                            }
+                            if (outStockLockInfosMES != null && outStockLockInfosMES.Count() > 0)
+                            {
+                                Dt_AGVStationInfo aGVStationInfo = _basicRepository.AGVStationInfoRepository.QueryFirst(x=>x.AGVStationCode==task.TargetAddress);
+                                MESDeliveryModel mESDeliveryModel = MESDeliveryUp(outStockLockInfosMES, aGVStationInfo.MESPointCode);
+                                MESResponse response = _invokeMESService.MESDelivery(mESDeliveryModel).DeserializeObject<MESResponse>() ?? throw new Exception("鏈幏鍙栧埌杩斿洖淇℃伅");
+                                if (!response.Result)
+                                {
+                                    throw new Exception($"MES閰嶉�佸嚭鍙戞帴鍙h皟鐢ㄦ姤閿�,MES杩斿洖淇℃伅{DecodeUnicode(response.Msg)}");
+                                }
+                            }
                         }
                         _basicService.LocationInfoService.UpdateLocationStatus(locationInfoStart, stockInfo.PalletType, LocationStatusEnum.Free, stockInfo.WarehouseId);
-                        BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? WIDESEA_Core.Enums.OperateTypeEnum.浜哄伐瀹屾垚 : WIDESEA_Core.Enums.OperateTypeEnum.鑷姩瀹屾垚);
+                        BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? OperateTypeEnum.浜哄伐瀹屾垚 : OperateTypeEnum.鑷姩瀹屾垚);
                         _unitOfWorkManage.CommitTran();
                     }
                     else
@@ -206,6 +223,34 @@
                 _unitOfWorkManage.RollbackTran();
                 return content.Error(ex.Message);
             }
+        }
+        /// <summary>
+        /// 閰嶉�侀�佽揪淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        public MESDeliveryModel MESDeliveryUp(List<Dt_OutStockLockInfo> outStockLockInfos,string address)
+        {
+            MESDeliveryModel mESDeliveryModel = new MESDeliveryModel()
+            {
+                PRO_DispatchPlanMaterialsInfoNew= new List<MESDeliveryInfo>()
+            };
+            foreach (var item in outStockLockInfos)
+            {
+                MESDeliveryInfo mESDeliveryInfo = new MESDeliveryInfo()
+                {
+                    InvItemCode=item.MaterielCode,
+                    DispatchPlanMaterialId=item.OrderDetailId,
+                    UnitCode=item.Unit,
+                    GradeCode="001",
+                    MainQuantity=item.AssignQuantity,
+                    AssistUnitCode=item.AssistUnit,
+                    LocationCode= address,
+                    LotNumber=item.BatchNo,
+                    MaterialBarCode=item.PalletCode
+                };
+                mESDeliveryModel.PRO_DispatchPlanMaterialsInfoNew.Add(mESDeliveryInfo);
+            }
+            return mESDeliveryModel;
         }
         /// <summary>
         /// 搴撳瓨鏁版嵁杞嚭搴撲换鍔�(鍘熸枡/鍗婃垚鍝�)
@@ -257,7 +302,7 @@
         /// </summary>
         /// <param name="stockInfos"></param>
         /// <returns></returns>
-        public List<Dt_Task> GetTasks(List<Dt_StockInfo> stockInfos,List<Dt_OutStockLockInfo> outStockLockInfos, TaskTypeEnum taskType)
+        public List<Dt_Task> GetTasks(List<Dt_StockInfo> stockInfos,List<Dt_OutStockLockInfo> outStockLockInfos, TaskTypeEnum taskType=new TaskTypeEnum())
         {
             List<Dt_Task> tasks = new List<Dt_Task>();
             for (int i = 0; i < stockInfos.Count; i++)
@@ -293,7 +338,9 @@
                             MaterielCode = stockInfo.MaterielCode,
                             RfidCode = stockInfo.RfidCode,
                             Quantity = stockInfo.StockLength,
-                            OrderNo= outStockLockInfo.OrderNo
+                            OrderNo= outStockLockInfo.OrderNo,
+                            DispatchPlanId=outStockLockInfo.OrderDetailId,
+                            WorkCentreCode=outStockLockInfo.MakeCode
                         };
                         if (stockInfo.MaterielWide > 0)
                         {
@@ -620,10 +667,12 @@
             {
                 //鑾峰彇浠诲姟
                 tasks = GetTasks(result.Item1, TaskTypeEnum.OldYLOutbound);
-                
                 result.Item2.ForEach(x =>
                 {
-                    x.OutSGOrderDetailStatus = OutOrderStatusEnum.鍑哄簱涓�.ObjToInt();
+                    if (result.Item3.FirstOrDefault(t=>t.OrderDetailId==x.Id)!=null)
+                    {
+                        x.OutSGOrderDetailStatus = OutOrderStatusEnum.鍑哄簱涓�.ObjToInt();
+                    }
                 });
                 result.Item3.ForEach(x =>
                 {
@@ -656,7 +705,7 @@
                 {
                     tasks.ForEach(x =>
                     {
-                        string orderNos = string.Join(",", outStockLockInfos.Where(x => x.PalletCode == x.PalletCode).Select(x => x.OrderNo).Distinct());
+                        string orderNos = string.Join(",", outStockLockInfos.Where(t => t.PalletCode == x.PalletCode).Select(x => x.OrderNo).Distinct());
                         x.OrderNo = orderNos;
                     });
                 }
@@ -667,11 +716,7 @@
                     {
                         x.StockStatus = StockStatusEmun.鍑哄簱閿佸畾.ObjToInt();
                     });
-                    outboundOrderDetails.ForEach(x =>
-                    {
-                        x.OutSGOrderDetailStatus = OutOrderStatusEnum.鍑哄簱涓�.ObjToInt();
-                    });
-                    List<Dt_OutSGOrder> outSGOrders = _outboundRepository.OutSGOrderRepository.QueryData(x => outboundOrderDetails.Select(x=>x.OutSGOrderId).Distinct().Contains(x.Id));
+                    List<Dt_OutSGOrder> outSGOrders = _outboundRepository.OutSGOrderRepository.QueryData(x => outStockLockInfos.Select(x=>x.OrderNo).Distinct().Contains(x.OrderId));
                     if (outSGOrders.Count<=0)
                     {
                         throw new Exception("鏈壘鍒板崟鎹俊鎭�");
@@ -704,16 +749,79 @@
         /// </summary>
         /// <param name="bSTPickInfoDTO"></param>
         /// <returns></returns>
-        public WebResponseContent ReceivePicking(BSTPickInfoDTO bSTPickInfoDTO)
+        public WebResponseContent ReceivePicking(List<BSTPickInfoDTO> bSTPickInfoDTOs)
         {
             WebResponseContent content = new WebResponseContent();
             try
             {
+                //鏂板
+                List<BSTPickInfoDTO> bSTPickInfosAdd = bSTPickInfoDTOs.Where(x => x.Way == 1).ToList();
+                //鑾峰彇鏂板鏄庣粏棰嗘枡
+                List<PaperMattakeDetailItem>? paperMattakeDetailItemsAdd = null;
+                //淇敼
+                List<BSTPickInfoDTO> bSTPickInfosUp = bSTPickInfoDTOs.Where(x => x.Way == 2).ToList();
+                //鑾峰彇鏂板鏄庣粏棰嗘枡
+                List<PaperMattakeDetailItem>? paperMattakeDetailItemsUp = null;
+                if (bSTPickInfosAdd != null && bSTPickInfosAdd.Count > 0)
+                {
+                    paperMattakeDetailItemsAdd = bSTPickInfosAdd.SelectMany(x => x.PaperMattakeDetails).ToList();
+                }
+                if (bSTPickInfosUp != null && bSTPickInfosUp.Count > 0)
+                {
+                    paperMattakeDetailItemsUp = bSTPickInfosUp.SelectMany(x => x.PaperMattakeDetails).ToList();
+                }
                 //鑾峰彇鎵�鏈夊緟棰嗘枡鐨勫嚭搴撹鎯�
-                List<Dt_OutStockLockInfo> outStockLockInfos = _outboundRepository.OutStockLockInfoRepository.QueryData(x=>x.OrderType==OutOrderTypeEnum.OutSGPick.ObjToInt());
+                List<Dt_OutStockLockInfo> outStockLockInfos = _outboundRepository.OutStockLockInfoRepository.QueryData(x => x.OrderType == OutOrderTypeEnum.OutSGPick.ObjToInt() && x.Status==OutLockStockStatusEnum.鍑哄簱瀹屾垚.ObjToInt());
+                #region 棰嗘枡閫昏緫
+                if (paperMattakeDetailItemsAdd != null && paperMattakeDetailItemsAdd.Count > 0)
+                {
+                    foreach (var item in paperMattakeDetailItemsAdd)
+                    {
+                        //鑾峰彇瀵瑰簲鐨�
+                    }
+                }
+                
+                if (paperMattakeDetailItemsUp != null && paperMattakeDetailItemsUp.Count > 0)
+                {
+                    foreach (var item in paperMattakeDetailItemsUp)
+                    {
+                        
+                    }
+
+                }
+                #endregion
             }
             catch (Exception ex)
             {
+                _unitOfWorkManage.RollbackTran();
+                content.Error(ex.Message);
+            }
+            return content;
+        }
+        /// <summary>
+        /// 鍒涘缓鐢熺鎵嬪姩鍑哄簱
+        /// </summary>
+        /// <param name="ids"></param>
+        /// <returns></returns>
+        public WebResponseContent CreateSGManualTasks(List<int> ids)
+        {
+            WebResponseContent content=new WebResponseContent();
+            try
+            {
+                //鑾峰彇鎵�鏈夋槑缁�
+                List<Dt_OutSGOrder> outSGOrders = BaseDal.Db.Queryable<Dt_OutSGOrder>().Where(x=>ids.Contains(x.Id)).Includes(x=>x.Details).ToList();
+                List<Dt_OutSGOrderDetail> outSGOrderDetails = outSGOrders.SelectMany(x=>x.Details.Where(t=>t.OutSGOrderDetailStatus==OutOrderStatusEnum.鏈紑濮�.ObjToInt())).ToList();
+                List<int> ints = outSGOrderDetails.Select(x => x.Id).ToList();
+                int[] reseponse = new int[ints.Count];
+                for (int i = 0; i < ints.Count; i++)
+                {
+                    reseponse[i] = ints[i];
+                }
+                content = CreateSGOutboundTasks(reseponse);
+            }
+            catch (Exception ex)
+            {
+                _unitOfWorkManage.RollbackTran();
                 content.Error(ex.Message);
             }
             return content;
@@ -735,22 +843,21 @@
                 {
                     return content.Error("棰嗘枡璁″垝浼犲叆淇℃伅涓虹┖");
                 }
-                outMESOrderDTOs.Select(x => x.OutDetailId);
                 List<Dt_Warehouse> warehouses = _basicRepository.WarehouseRepository.QueryData();
                 OutMESOrderDTO? CheckGradeCode = outMESOrderDTOs.FirstOrDefault(x => !GradeCodes.Contains(x.GradeCode));
                 if (CheckGradeCode != null)
                 {
-                    return content.Error($"棰嗘枡璁″垝搴撳尯{nameof(OutMESOrderDTO.GradeCode)}:{CheckGradeCode.GradeCode}涓嶅瓨鍦�");
+                    return content.Error($"棰嗘枡璁″垝绛夌骇{nameof(OutMESOrderDTO.GradeCode)}:{CheckGradeCode.GradeCode}涓嶅瓨鍦�");
                 }
                 OutMESOrderDTO? CheckOutDetailId = outMESOrderDTOs.FirstOrDefault(x => x.OutDetailId <= 0);
                 if (CheckOutDetailId != null)
                 {
-                    return content.Error($"棰嗘枡璁″垝{nameof(OutMESOrderDTO.OutDetailId)}:{CheckOutDetailId.ProductOrderNo}闇�瑕佸ぇ浜�0");
+                    return content.Error($"棰嗘枡璁″垝ID:{CheckOutDetailId.OutDetailId}闇�澶т簬0");
                 }
                 OutMESOrderDTO? CheckReqQuantity = outMESOrderDTOs.FirstOrDefault(x => x.ReqQuantity <= 0);
                 if (CheckReqQuantity != null)
                 {
-                    return content.Error($"棰嗘枡璁″垝{nameof(OutMESOrderDTO.ReqQuantity)}:{CheckReqQuantity.ProductOrderNo}闇�瑕佸ぇ浜�0");
+                    return content.Error($"棰嗘枡璁″垝ID:{CheckReqQuantity.OutDetailId},{CheckReqQuantity.ProductOrderNo}鐗╂枡闇�姹傞渶瑕佸ぇ浜�0");
                 }
                 //鑾峰彇鎵�鏈夌墿鏂欎俊鎭�
                 List<Dt_MaterielInfo> materielInfos = _basicRepository.MaterielInfoRepository.QueryData(x => x.MaterielInvOrgId == MaterielInvOrgEnum.鏂板巶.ObjToInt());
@@ -781,11 +888,12 @@
                     Dt_MakeCenterInfo makeCenterInfo=makeCenterInfos.FirstOrDefault(x => x.MakeCode == item.MakeCode);
                     item.MakeArea = makeCenterInfo.MakeArea;
                     item.WarehouseId = materielInfo.WarehouseId;
+                    item.MaterielUnit = materielInfo.MaterielUnit;
+                    item.AssistUnitCode = materielInfo.AssistUnitCode;
                 }
-
                 
                 _unitOfWorkManage.BeginTran();
-
+                //鎿嶄綔鏁版嵁锛屽苟鍒嗛厤闇�姹傚簱瀛�
                 _outboundRepository.OutMESOrderRepository.AddData(AddoutMESOrders);
                 List<Dt_OutMESOrder> mESOrders = _outboundRepository.OutMESOrderRepository.QueryData(x => AddoutMESOrders.Select(x => x.OutDetailId).Contains(x.OutDetailId));
                 List<Dt_Task> tasks = new List<Dt_Task>();
@@ -799,7 +907,7 @@
                     if (result.Item1 != null && result.Item1.Count > 0)
                     {
                         //鍒涘缓浠诲姟
-                        tasks = GetTasks(result.Item1, result.Item3, TaskTypeEnum.PrintYLOutbound);
+                        tasks = GetTasks(result.Item1, result.Item3);
                         result.Item2.ForEach(x =>
                         {
                             OutOrderStatusEnum.鍑哄簱涓�.ObjToInt();
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/ERP/ErpBSTController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/ERP/ErpBSTController.cs"
index c179db1..9a53c52 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/ERP/ErpBSTController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/ERP/ErpBSTController.cs"
@@ -92,9 +92,9 @@
         /// </summary>
         /// <returns></returns>
         [HttpPost, HttpGet, Route("ReceivePicking"), AllowAnonymous]
-        public WebResponseContent ReceivePicking(BSTPickInfoDTO bSTPickInfoDTO)
+        public WebResponseContent ReceivePicking([FromBody] List<BSTPickInfoDTO> bSTPickInfoDTOs)
         {
-            return _taskService.ReceivePicking(bSTPickInfoDTO);
+            return _taskService.ReceivePicking(bSTPickInfoDTOs);
         }
 
         /// <summary>
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/MES/MesController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/MES/MesController.cs"
index 9a43bd8..e7d6612 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/MES/MesController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/MES/MesController.cs"
@@ -144,9 +144,9 @@
         /// <param name="boxCode"></param>
         /// <returns></returns>
         [HttpPost,HttpGet, Route("MESBoxCodeNotice"), AllowAnonymous]
-        public string MESBoxCodeNotice(string boxCode)
+        public WebResponseContent MESBoxCodeNotice(string boxCode)
         {
-            return _invokeMESService.MESBoxCodeNotice(boxCode);
+            return _proInOrderInfoService.MESBoxCode(boxCode);
         }
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Outbound/OutLineViewController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Outbound/OutLineViewController.cs"
new file mode 100644
index 0000000..8d68782
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Outbound/OutLineViewController.cs"
@@ -0,0 +1,30 @@
+锘縰sing Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc;
+using WIDESEA_Core;
+using WIDESEA_Core.BaseController;
+using WIDESEA_IOutboundService;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_WMSServer.Controllers.Outbound
+{
+    /// <summary>
+    /// 鍑哄簱绾夸綋缂撳瓨
+    /// </summary>
+    [Route("api/OutLineView")]
+    [ApiController]
+    public class OutLineViewController : ApiBaseController<IOutLineViewService, Dt_OutLineView>
+    {
+        public OutLineViewController(IOutLineViewService service) : base(service)
+        {
+        }
+        /// <summary>
+        /// 鑾峰彇绾夸綋鍘熺焊
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost, HttpGet, Route("GetOutLineView"), AllowAnonymous]
+        public WebResponseContent GetOutLineView()
+        {
+            return Service.GetOutLineView();
+        }
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs"
index 2ea8602..f9f9bc5 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs"
@@ -41,5 +41,14 @@
         {
             return Service.ManualMaterielGroup(saveModel);
         }
+        /// <summary>
+        /// 鏇存柊鑰佸巶娈嬪嵎搴撳瓨
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost, HttpGet, Route("UpBSTStock"),AllowAnonymous]
+        public WebResponseContent UpBSTStock(int operate)
+        {
+            return Service.UpBSTStock(operate);
+        }
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
index 43844a5..6b27ca9 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
@@ -68,7 +68,7 @@
         /// <param name="startPoint"></param>
         /// <returns></returns>
         [HttpPost, HttpGet, Route("EmptyBackTask"), AllowAnonymous]
-        public WebResponseContent EmptyBackTask(string barCode, string startPoint)
+        public WebResponseContent EmptyBackTask(string barCode, string startPoint,int target)
         {
             return Service.EmptyBackTask(barCode, startPoint);
         }
@@ -82,6 +82,7 @@
         {
             return Service.InboundFLOrCPTask(barCode, startPoint, matCode, matCount,oneCount);
         }
+
         /// <summary>
         /// 杈呮枡(鎴愬搧)閲囪喘/鏈熷垵鍏ュ簱
         /// </summary>
@@ -139,6 +140,17 @@
         }
 
         /// <summary>
+        /// 鍒涘缓鐢熺鎵嬪姩鍑哄簱
+        /// </summary>
+        /// <param name="ids"></param>
+        /// <returns></returns>
+        [HttpPost, Route("CreateSGManualTasks"), AllowAnonymous]
+        public WebResponseContent CreateSGManualTasks([FromBody] List<int> ids)
+        {
+            return Service.CreateSGManualTasks(ids);
+        }
+
+        /// <summary>
         /// 淇敼浠诲姟鐘舵��
         /// </summary>
         /// <param name="task"></param>
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs"
index 52ab4c2..17c5bec 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs"
@@ -83,6 +83,8 @@
             CreateMap<InboundDetailItem, Dt_InboundOrderDetail>().ForMember(x => x.OrderQuantity, b => b.MapFrom(b => b.MaterialQty)).ForMember(x => x.OrderDetailStatus, b => b.MapFrom(b => InOrderStatusEnum.鏈紑濮�.ObjToInt())).ForMember(x => x.MaterialThick, b => b.MapFrom(b => b.Thickness)).ForMember(x => x.MaterialWide, b => b.MapFrom(b => b.Wide)).ForMember(x => x.MaterialWeight, b => b.MapFrom(b => b.Weight)).ForMember(x => x.OrderQuantity, b => b.MapFrom(b => b.MaterialQty));
             //鍗氭�濋�氱紦瀛橀噰璐浆鎹�
             CreateMap<Dt_InboundOrderDetail, Dt_YLInboundCache>().ForMember(x => x.Id, b => b.MapFrom(b => 0)).ForMember(x => x.BindStatus, b => b.MapFrom(b => WhetherEnum.False.ObjToInt())).ForMember(x => x.RfidCode, b => b.MapFrom(b => "")).ForMember(x => x.MaterialNo, b => b.MapFrom(b => b.MaterialCode)).ForMember(x => x.InvOrg, b => b.MapFrom(b => MaterielInvOrgEnum.鏂板巶.ToString()));
+            //鍗氭�濋�氬嚭搴撹鎯呰�佸巶鍑哄簱绾夸綋缂撳瓨杞崲
+            CreateMap<Dt_OutStockLockInfo, Dt_OutLineView>().ForMember(x => x.Id, b => b.MapFrom(b => 0));
         }
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/appsettings.json" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/appsettings.json"
index 256cc54..0c8bd96 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/appsettings.json"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/appsettings.json"
@@ -13,7 +13,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=WIDESEA_WMSLLD;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+"ConnectionString": "Data Source=.;Initial Catalog=WIDESEA_WMSLLD;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
   //"ConnectionString": "Data Source=192.168.35.3;Initial Catalog=WIDESEA_WMSLLD;User ID=sa;Password=Sa123456;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",
@@ -30,7 +30,7 @@
   "LogAopEnable": false,
   "PrintSql": true, //鎵撳嵃SQL璇彞
   "ApiName": "WIDESEA",
-  "ExpMinutes": 120,
+  "ExpMinutes": 360,
   "QuartzJobAutoStart": true,
   "PDAVersion": "4",
   "WebSocketPort": 9296
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\351\276\231\345\210\251\345\276\227PDA/common/config.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\351\276\231\345\210\251\345\276\227PDA/common/config.js"
index 03b55ec..8831f24 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/\351\276\231\345\210\251\345\276\227PDA/common/config.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\351\276\231\345\210\251\345\276\227PDA/common/config.js"
@@ -1,6 +1,6 @@
 let config = {
-	baseUrl: 'http://192.168.35.3:9283',
-	//baseUrl: 'http://127.0.0.1:9293',
+	//baseUrl: 'http://192.168.35.3:9283',
+	baseUrl: 'http://127.0.0.1:9293',
 	urls: [
 		'http://192.168.35.3:9283',
 		'http://192.168.35.3:9283'
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\351\276\231\345\210\251\345\276\227PDA/pages/stash/boxing.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\351\276\231\345\210\251\345\276\227PDA/pages/stash/boxing.vue"
index 3999008..ba86532 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/\351\276\231\345\210\251\345\276\227PDA/pages/stash/boxing.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\351\276\231\345\210\251\345\276\227PDA/pages/stash/boxing.vue"
@@ -84,8 +84,11 @@
 							<uni-easyinput type="text" v-model="addressEmpty" placeholder="璇锋壂鎻忓湴鍧�鏉$爜" ref='midInput'
 								:focus="addressEmptyFocus" />
 						</uni-forms-item>
+						<uni-forms-item label="鍙犵洏/绔嬪簱">
+							<uni-data-checkbox v-model="target" :localdata="targetAddress" style="margin-top: 5px;"/>
+						</uni-forms-item>
 						<uni-forms-item>
-							<button @click="inEmpty" type="primary" size="default" style="margin-top: 2%;">鍏ュ簱纭</button>
+							<button @click="inEmpty" type="primary" size="default" style="margin-top: 2%;">鍛煎彨纭</button>
 						</uni-forms-item>
 					</uni-forms>
 				</view>
@@ -147,6 +150,14 @@
 				bindCode: "",
 				rfidCode: "",
 				rfid:"",
+				targetAddress: [{
+						text: '鍙犵洏',
+						value: 0
+					}, {
+						text: '绔嬪簱',
+						value: 1
+					}],
+				target: 0,
 				outCount: 0,
 				addressEmptyFocus: false,
 				startPointRange: []
@@ -194,12 +205,6 @@
 				} else {
 					this.addressEmptyFocus = false;
 				}
-
-				if (this.inboundCode) {
-					this.addressEmptyFocus = true;
-				} else {
-					this.addressEmptyFocus = false;
-				}
 			},
 			inEmpty() {
 				if (this.emptyCode == "") {
@@ -216,11 +221,13 @@
 					})
 					return;
 				}
-				var url = "?barCode=" + this.emptyCode + "&startPoint=" + this.addressEmpty;
+				var url = "?barCode=" + this.emptyCode + "&startPoint=" + this.addressEmpty + "&target=" + this.target;
 				this.$u.post('/api/Task/EmptyBackTask' + url, {}).then(res => {
 					if (res.status) {
 						this.emptyCode = "";
 						this.addressEmpty = "";
+						this.target=0;
+						this.addressEmptyFocus=false;
 						//鑾峰彇鎬绘暟閲�
 						setTimeout(() => {
 							this.addressEmptyFocus = false;
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\345\215\232\346\226\257\351\200\232\345\210\251\346\213\223\346\216\245\345\217\243.V2.xlsx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\345\215\232\346\226\257\351\200\232\345\210\251\346\213\223\346\216\245\345\217\243.V2.xlsx"
index b23990d..f5acce2 100644
--- "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\345\215\232\346\226\257\351\200\232\345\210\251\346\213\223\346\216\245\345\217\243.V2.xlsx"
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\345\215\232\346\226\257\351\200\232\345\210\251\346\213\223\346\216\245\345\217\243.V2.xlsx"
Binary files differ
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\351\276\231\345\210\251\345\276\227MES\346\216\245\345\217\243.xlsx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\351\276\231\345\210\251\345\276\227MES\346\216\245\345\217\243.xlsx"
index 13da281..683739a 100644
--- "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\351\276\231\345\210\251\345\276\227MES\346\216\245\345\217\243.xlsx"
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\351\276\231\345\210\251\345\276\227MES\346\216\245\345\217\243.xlsx"
Binary files differ
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\345\216\237\346\226\231\345\272\223\350\276\223\351\200\201\347\272\277\351\200\232\350\256\257\345\215\217\350\256\256.xlsx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\345\216\237\346\226\231\345\272\223\350\276\223\351\200\201\347\272\277\351\200\232\350\256\257\345\215\217\350\256\256.xlsx"
index d3bf96b..7a1639b 100644
--- "a/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\345\216\237\346\226\231\345\272\223\350\276\223\351\200\201\347\272\277\351\200\232\350\256\257\345\215\217\350\256\256.xlsx"
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\345\216\237\346\226\231\345\272\223\350\276\223\351\200\201\347\272\277\351\200\232\350\256\257\345\215\217\350\256\256.xlsx"
Binary files differ
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\346\216\245\351\251\263\345\217\260\344\270\216\344\270\212\344\275\215\346\234\272WCS\344\272\244\344\272\222.xls" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\346\216\245\351\251\263\345\217\260\344\270\216\344\270\212\344\275\215\346\234\272WCS\344\272\244\344\272\222.xls"
index 6fe08e6..23ca51a 100644
--- "a/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\346\216\245\351\251\263\345\217\260\344\270\216\344\270\212\344\275\215\346\234\272WCS\344\272\244\344\272\222.xls"
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\346\216\245\351\251\263\345\217\260\344\270\216\344\270\212\344\275\215\346\234\272WCS\344\272\244\344\272\222.xls"
Binary files differ
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\346\235\257\347\272\270\347\256\261\344\270\212\346\226\231\346\241\201\346\236\266\351\200\232\350\256\257\345\215\217\350\256\256.xlsx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\346\235\257\347\272\270\347\256\261\344\270\212\346\226\231\346\241\201\346\236\266\351\200\232\350\256\257\345\215\217\350\256\256.xlsx"
index b869c39..0df087e 100644
--- "a/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\346\235\257\347\272\270\347\256\261\344\270\212\346\226\231\346\241\201\346\236\266\351\200\232\350\256\257\345\215\217\350\256\256.xlsx"
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\346\235\257\347\272\270\347\256\261\344\270\212\346\226\231\346\241\201\346\236\266\351\200\232\350\256\257\345\215\217\350\256\256.xlsx"
Binary files differ
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\347\211\207\344\270\211\345\217\260\346\226\231\346\236\266DB\345\235\227\346\225\260\346\215\256/\344\274\201\344\270\232\345\276\256\344\277\241\346\210\252\345\233\276_1763189335703.png" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\347\211\207\344\270\211\345\217\260\346\226\231\346\236\266DB\345\235\227\346\225\260\346\215\256/\344\274\201\344\270\232\345\276\256\344\277\241\346\210\252\345\233\276_1763189335703.png"
new file mode 100644
index 0000000..92c7acc
--- /dev/null
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\347\211\207\344\270\211\345\217\260\346\226\231\346\236\266DB\345\235\227\346\225\260\346\215\256/\344\274\201\344\270\232\345\276\256\344\277\241\346\210\252\345\233\276_1763189335703.png"
Binary files differ
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\347\211\207\344\270\211\345\217\260\346\226\231\346\236\266DB\345\235\227\346\225\260\346\215\256/\344\274\201\344\270\232\345\276\256\344\277\241\346\210\252\345\233\276_17631893492052.png" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\347\211\207\344\270\211\345\217\260\346\226\231\346\236\266DB\345\235\227\346\225\260\346\215\256/\344\274\201\344\270\232\345\276\256\344\277\241\346\210\252\345\233\276_17631893492052.png"
new file mode 100644
index 0000000..851a511
--- /dev/null
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\347\211\207\344\270\211\345\217\260\346\226\231\346\236\266DB\345\235\227\346\225\260\346\215\256/\344\274\201\344\270\232\345\276\256\344\277\241\346\210\252\345\233\276_17631893492052.png"
Binary files differ
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\347\211\207\344\270\212\346\226\231\346\241\201\346\236\266\346\225\260\351\207\217.xlsx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\347\211\207\344\270\212\346\226\231\346\241\201\346\236\266\346\225\260\351\207\217.xlsx"
new file mode 100644
index 0000000..8a1f340
--- /dev/null
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\347\211\207\344\270\212\346\226\231\346\241\201\346\236\266\346\225\260\351\207\217.xlsx"
Binary files differ
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\347\211\207\344\270\244\345\217\260\346\226\231\346\236\266DB\345\235\227\346\225\260\346\215\256/\344\274\201\344\270\232\345\276\256\344\277\241\346\210\252\345\233\276_17631892881691.png" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\347\211\207\344\270\244\345\217\260\346\226\231\346\236\266DB\345\235\227\346\225\260\346\215\256/\344\274\201\344\270\232\345\276\256\344\277\241\346\210\252\345\233\276_17631892881691.png"
new file mode 100644
index 0000000..aa7355c
--- /dev/null
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\347\211\207\344\270\244\345\217\260\346\226\231\346\236\266DB\345\235\227\346\225\260\346\215\256/\344\274\201\344\270\232\345\276\256\344\277\241\346\210\252\345\233\276_17631892881691.png"
Binary files differ
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\347\211\207\344\270\244\345\217\260\346\226\231\346\236\266DB\345\235\227\346\225\260\346\215\256/\344\274\201\344\270\232\345\276\256\344\277\241\346\210\252\345\233\276_17631893013030.png" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\347\211\207\344\270\244\345\217\260\346\226\231\346\236\266DB\345\235\227\346\225\260\346\215\256/\344\274\201\344\270\232\345\276\256\344\277\241\346\210\252\345\233\276_17631893013030.png"
new file mode 100644
index 0000000..7dd9d97
--- /dev/null
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\347\211\207\344\270\244\345\217\260\346\226\231\346\236\266DB\345\235\227\346\225\260\346\215\256/\344\274\201\344\270\232\345\276\256\344\277\241\346\210\252\345\233\276_17631893013030.png"
Binary files differ
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\347\211\207\345\233\233\345\217\260\346\226\231\346\236\266DB\345\235\227\346\225\260\346\215\256/\344\274\201\344\270\232\345\276\256\344\277\241\346\210\252\345\233\276_17631895456628.png" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\347\211\207\345\233\233\345\217\260\346\226\231\346\236\266DB\345\235\227\346\225\260\346\215\256/\344\274\201\344\270\232\345\276\256\344\277\241\346\210\252\345\233\276_17631895456628.png"
new file mode 100644
index 0000000..be057d4
--- /dev/null
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\347\211\207\345\233\233\345\217\260\346\226\231\346\236\266DB\345\235\227\346\225\260\346\215\256/\344\274\201\344\270\232\345\276\256\344\277\241\346\210\252\345\233\276_17631895456628.png"
Binary files differ
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\347\211\207\345\233\233\345\217\260\346\226\231\346\236\266DB\345\235\227\346\225\260\346\215\256/\344\274\201\344\270\232\345\276\256\344\277\241\346\210\252\345\233\276_17631895685290.png" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\347\211\207\345\233\233\345\217\260\346\226\231\346\236\266DB\345\235\227\346\225\260\346\215\256/\344\274\201\344\270\232\345\276\256\344\277\241\346\210\252\345\233\276_17631895685290.png"
new file mode 100644
index 0000000..2c56713
--- /dev/null
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\347\211\207\345\233\233\345\217\260\346\226\231\346\236\266DB\345\235\227\346\225\260\346\215\256/\344\274\201\344\270\232\345\276\256\344\277\241\346\210\252\345\233\276_17631895685290.png"
Binary files differ

--
Gitblit v1.9.3