From 547436626cfe9cb01ae95b0bde9886b9cf46a9f2 Mon Sep 17 00:00:00 2001
From: qinchulong <qinchulong@hnkhzn.com>
Date: 星期日, 02 三月 2025 23:51:05 +0800
Subject: [PATCH] 第一版完成

---
 项目代码/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v17/DocumentLayout.json                 |   94 ++++----
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/WMSPart/Dt_StockInfo.cs               |    4 
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/BatchController.cs       |   37 +++
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/dt_errormsginfoService.cs           |   10 
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_IWMSPart/ILocationInfoService.cs                   |    7 
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/GZJ/GZJJob.cs                                |  140 +++++++------
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_WMSPart/LocationInfoService.cs                     |   51 ++++
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/dt_outstockinfoService.cs           |   24 ++
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/dt_storagemodeService.cs            |   26 ++
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/dt_storagemode.cs              |   24 ++
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemServices/Idt_BatchinfoService.cs            |    4 
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemServices/Idt_StoragemodeService.cs          |   14 +
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs                     |    5 
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemServices/Idt_OutstockinfoService.cs         |    3 
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/OHT/OHTJob.cs                                |    4 
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/dt_batchinfoService.cs              |   69 ++++++
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/dt_batchInfo.cs                |   12 
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/dt_outstockinfo.cs             |    2 
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskStatusEnum.cs                  |   14 +
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/OutStockController.cs    |   12 +
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/StoragemodeController.cs |   18 +
 21 files changed, 439 insertions(+), 135 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v17/DocumentLayout.json" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v17/DocumentLayout.json"
index dddf4c3..091ae8d 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v17/DocumentLayout.json"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v17/DocumentLayout.json"
@@ -3,28 +3,28 @@
   "WorkspaceRootPath": "F:\\Git\u9879\u76EE\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\",
   "Documents": [
     {
-      "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|f:\\git\u9879\u76EE\\yangjipingku\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_tasks\\gzj\\gzjjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
-      "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\gzj\\gzjjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+      "AbsoluteMoniker": "D:0:0:{B17BAF3C-2BAD-4162-B6DC-46ED7A1E3D8D}|WIDESEAWCS_WMSPart\\WIDESEAWCS_WMSPart.csproj|f:\\git\u9879\u76EE\\yangjipingku\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_wmspart\\locationinfoservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+      "RelativeMoniker": "D:0:0:{B17BAF3C-2BAD-4162-B6DC-46ED7A1E3D8D}|WIDESEAWCS_WMSPart\\WIDESEAWCS_WMSPart.csproj|solutionrelative:wideseawcs_wmspart\\locationinfoservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
     },
     {
       "AbsoluteMoniker": "D:0:0:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|f:\\git\u9879\u76EE\\yangjipingku\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
       "RelativeMoniker": "D:0:0:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|solutionrelative:wideseawcs_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
     },
     {
-      "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|F:\\Git\u9879\u76EE\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\wideseawcs_tasks\\oht\\ohtjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
-      "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\oht\\ohtjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+      "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|F:\\Git\u9879\u76EE\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\wideseawcs_tasks\\gzj\\gzjjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+      "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\gzj\\gzjjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+    },
+    {
+      "AbsoluteMoniker": "D:0:0:{9FBC654C-51DE-422D-9E1E-6A38268DE1E2}|WIDESEAWCS_Common\\WIDESEAWCS_Common.csproj|f:\\git\u9879\u76EE\\yangjipingku\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_common\\locationenum\\locationenum.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+      "RelativeMoniker": "D:0:0:{9FBC654C-51DE-422D-9E1E-6A38268DE1E2}|WIDESEAWCS_Common\\WIDESEAWCS_Common.csproj|solutionrelative:wideseawcs_common\\locationenum\\locationenum.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
     },
     {
       "AbsoluteMoniker": "D:0:0:{9FBC654C-51DE-422D-9E1E-6A38268DE1E2}|WIDESEAWCS_Common\\WIDESEAWCS_Common.csproj|f:\\git\u9879\u76EE\\yangjipingku\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_common\\taskenum\\taskstatusenum.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
       "RelativeMoniker": "D:0:0:{9FBC654C-51DE-422D-9E1E-6A38268DE1E2}|WIDESEAWCS_Common\\WIDESEAWCS_Common.csproj|solutionrelative:wideseawcs_common\\taskenum\\taskstatusenum.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
     },
     {
-      "AbsoluteMoniker": "D:0:0:{9FBC654C-51DE-422D-9E1E-6A38268DE1E2}|WIDESEAWCS_Common\\WIDESEAWCS_Common.csproj|f:\\git\u9879\u76EE\\yangjipingku\\\u9879\u76EE\u4EE3\u7801\\wcs\\wideseawcs_server\\wideseawcs_common\\taskenum\\tasktypeenum.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
-      "RelativeMoniker": "D:0:0:{9FBC654C-51DE-422D-9E1E-6A38268DE1E2}|WIDESEAWCS_Common\\WIDESEAWCS_Common.csproj|solutionrelative:wideseawcs_common\\taskenum\\tasktypeenum.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
-    },
-    {
-      "AbsoluteMoniker": "D:0:0:{7F200FE8-CAF6-4131-BD25-8D438FE0ABAC}|WIDESEAWCS_Model\\WIDESEAWCS_Model.csproj|F:\\Git\u9879\u76EE\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\wideseawcs_model\\models\\system\\dt_stationinfo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
-      "RelativeMoniker": "D:0:0:{7F200FE8-CAF6-4131-BD25-8D438FE0ABAC}|WIDESEAWCS_Model\\WIDESEAWCS_Model.csproj|solutionrelative:wideseawcs_model\\models\\system\\dt_stationinfo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+      "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|F:\\Git\u9879\u76EE\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\wideseawcs_tasks\\oht\\ohtjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+      "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\oht\\ohtjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
     }
   ],
   "DocumentGroupContainers": [
@@ -38,52 +38,65 @@
           "Children": [
             {
               "$type": "Document",
+              "DocumentIndex": 3,
+              "Title": "LocationEnum.cs",
+              "DocumentMoniker": "F:\\Git\u9879\u76EE\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Common\\LocationEnum\\LocationEnum.cs",
+              "RelativeDocumentMoniker": "WIDESEAWCS_Common\\LocationEnum\\LocationEnum.cs",
+              "ToolTip": "F:\\Git\u9879\u76EE\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Common\\LocationEnum\\LocationEnum.cs",
+              "RelativeToolTip": "WIDESEAWCS_Common\\LocationEnum\\LocationEnum.cs",
+              "ViewState": "AQIAAAkAAAAAAAAAAADwvwwAAAAiAAAA",
+              "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
+              "WhenOpened": "2025-03-02T12:50:53.078Z",
+              "EditorCaption": ""
+            },
+            {
+              "$type": "Document",
               "DocumentIndex": 1,
               "Title": "TaskService.cs",
               "DocumentMoniker": "F:\\Git\u9879\u76EE\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_TaskInfoService\\TaskService.cs",
               "RelativeDocumentMoniker": "WIDESEAWCS_TaskInfoService\\TaskService.cs",
               "ToolTip": "F:\\Git\u9879\u76EE\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_TaskInfoService\\TaskService.cs",
               "RelativeToolTip": "WIDESEAWCS_TaskInfoService\\TaskService.cs",
-              "ViewState": "AQIAADUCAAAAAAAAAADgv0UCAABCAAAA",
+              "ViewState": "AQIAABsAAAAAAAAAAAAAADIAAAAIAAAA",
               "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
-              "WhenOpened": "2025-03-02T07:53:59.024Z",
-              "EditorCaption": ""
-            },
-            {
-              "$type": "Document",
-              "DocumentIndex": 3,
-              "Title": "TaskStatusEnum.cs",
-              "DocumentMoniker": "F:\\Git\u9879\u76EE\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Common\\TaskEnum\\TaskStatusEnum.cs",
-              "RelativeDocumentMoniker": "WIDESEAWCS_Common\\TaskEnum\\TaskStatusEnum.cs",
-              "ToolTip": "F:\\Git\u9879\u76EE\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Common\\TaskEnum\\TaskStatusEnum.cs",
-              "RelativeToolTip": "WIDESEAWCS_Common\\TaskEnum\\TaskStatusEnum.cs",
-              "ViewState": "AQIAAAAAAAAAAAAAAADwvwkAAAAgAAAA",
-              "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
-              "WhenOpened": "2025-03-02T07:50:10.929Z",
+              "WhenOpened": "2025-03-02T12:38:43.767Z",
               "EditorCaption": ""
             },
             {
               "$type": "Document",
               "DocumentIndex": 4,
-              "Title": "TaskTypeEnum.cs",
-              "DocumentMoniker": "F:\\Git\u9879\u76EE\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Common\\TaskEnum\\TaskTypeEnum.cs",
-              "RelativeDocumentMoniker": "WIDESEAWCS_Common\\TaskEnum\\TaskTypeEnum.cs",
-              "ToolTip": "F:\\Git\u9879\u76EE\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Common\\TaskEnum\\TaskTypeEnum.cs",
-              "RelativeToolTip": "WIDESEAWCS_Common\\TaskEnum\\TaskTypeEnum.cs",
-              "ViewState": "AQIAAAAAAAAAAAAAAADwvwkAAAAjAAAA",
+              "Title": "TaskStatusEnum.cs",
+              "DocumentMoniker": "F:\\Git\u9879\u76EE\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Common\\TaskEnum\\TaskStatusEnum.cs",
+              "RelativeDocumentMoniker": "WIDESEAWCS_Common\\TaskEnum\\TaskStatusEnum.cs",
+              "ToolTip": "F:\\Git\u9879\u76EE\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Common\\TaskEnum\\TaskStatusEnum.cs",
+              "RelativeToolTip": "WIDESEAWCS_Common\\TaskEnum\\TaskStatusEnum.cs",
+              "ViewState": "AQIAAHsAAAAAAAAAAAA1wIoAAAAfAAAA",
               "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
-              "WhenOpened": "2025-03-02T07:49:15.488Z",
+              "WhenOpened": "2025-03-02T12:35:09.785Z",
               "EditorCaption": ""
             },
             {
               "$type": "Document",
               "DocumentIndex": 0,
+              "Title": "LocationInfoService.cs",
+              "DocumentMoniker": "F:\\Git\u9879\u76EE\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_WMSPart\\LocationInfoService.cs",
+              "RelativeDocumentMoniker": "WIDESEAWCS_WMSPart\\LocationInfoService.cs",
+              "ToolTip": "F:\\Git\u9879\u76EE\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_WMSPart\\LocationInfoService.cs*",
+              "RelativeToolTip": "WIDESEAWCS_WMSPart\\LocationInfoService.cs*",
+              "ViewState": "AQIAAAgAAAAAAAAAAAASwBYAAABIAAAA",
+              "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
+              "WhenOpened": "2025-03-02T12:29:34.803Z",
+              "EditorCaption": ""
+            },
+            {
+              "$type": "Document",
+              "DocumentIndex": 2,
               "Title": "GZJJob.cs",
               "DocumentMoniker": "F:\\Git\u9879\u76EE\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\GZJ\\GZJJob.cs",
               "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\GZJ\\GZJJob.cs",
               "ToolTip": "F:\\Git\u9879\u76EE\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\GZJ\\GZJJob.cs",
               "RelativeToolTip": "WIDESEAWCS_Tasks\\GZJ\\GZJJob.cs",
-              "ViewState": "AQIAAGYAAAAAAAAAAAAYwHMAAAAZAAAA",
+              "ViewState": "AQIAAAwAAAAAAAAAAAAlwBcAAAAAAAAA",
               "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
               "WhenOpened": "2025-03-02T07:23:03.899Z",
               "EditorCaption": ""
@@ -91,25 +104,12 @@
             {
               "$type": "Document",
               "DocumentIndex": 5,
-              "Title": "dt_stationInfo.cs",
-              "DocumentMoniker": "F:\\Git\u9879\u76EE\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Model\\Models\\System\\dt_stationInfo.cs",
-              "RelativeDocumentMoniker": "WIDESEAWCS_Model\\Models\\System\\dt_stationInfo.cs",
-              "ToolTip": "F:\\Git\u9879\u76EE\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Model\\Models\\System\\dt_stationInfo.cs",
-              "RelativeToolTip": "WIDESEAWCS_Model\\Models\\System\\dt_stationInfo.cs",
-              "ViewState": "AQIAAAAAAAAAAAAAAAAAABAAAAAjAAAA",
-              "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
-              "WhenOpened": "2025-03-02T07:08:19.45Z",
-              "EditorCaption": ""
-            },
-            {
-              "$type": "Document",
-              "DocumentIndex": 2,
               "Title": "OHTJob.cs",
               "DocumentMoniker": "F:\\Git\u9879\u76EE\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\OHT\\OHTJob.cs",
               "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\OHT\\OHTJob.cs",
               "ToolTip": "F:\\Git\u9879\u76EE\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\OHT\\OHTJob.cs",
               "RelativeToolTip": "WIDESEAWCS_Tasks\\OHT\\OHTJob.cs",
-              "ViewState": "AQIAABsAAAAAAAAAAAAtwIYAAAAdAAAA",
+              "ViewState": "AQIAAEAAAAAAAAAAAAApwCUAAABGAAAA",
               "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
               "WhenOpened": "2025-03-01T14:47:49.318Z",
               "EditorCaption": ""
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskStatusEnum.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskStatusEnum.cs"
index 0cbaf20..fc426f4 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskStatusEnum.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskStatusEnum.cs"
@@ -135,4 +135,18 @@
         [Description("澶栬喘")]
         WaiGou,
     }
+
+    public enum StorageModeEnum 
+    {
+        /// <summary>
+        /// 鍑哄簱浼樺厛
+        /// </summary>
+        [Description("鍑哄簱浼樺厛")]
+        Out=1,
+        /// <summary>
+        /// 鍏ュ簱浼樺厛
+        /// </summary>
+        [Description("鍏ュ簱浼樺厛")]
+        In = 2,
+    }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemServices/Idt_BatchinfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemServices/Idt_BatchinfoService.cs"
index 0fbdd7b..4145122 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemServices/Idt_BatchinfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemServices/Idt_BatchinfoService.cs"
@@ -3,6 +3,7 @@
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using WIDESEAWCS_Core;
 using WIDESEAWCS_Core.BaseServices;
 using WIDESEAWCS_Model.Models;
 
@@ -10,5 +11,8 @@
 {
     public interface Idt_BatchinfoService : IService<dt_batchInfo>
     {
+        WebResponseContent UpdateInBatch(string batch);
+        WebResponseContent UpdateOutBatch(string batch);
+        WebResponseContent UpdateOutStorageMode(int mode);
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemServices/Idt_OutstockinfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemServices/Idt_OutstockinfoService.cs"
index 9b7993c..1ff2000 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemServices/Idt_OutstockinfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemServices/Idt_OutstockinfoService.cs"
@@ -3,6 +3,7 @@
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using WIDESEAWCS_Core;
 using WIDESEAWCS_Core.BaseServices;
 using WIDESEAWCS_Model.Models;
 
@@ -10,6 +11,6 @@
 {
     public interface Idt_OutstockinfoService : IService<dt_outstockinfo>
     {
-
+        WebResponseContent UpdateIsOutStock(int isout);
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemServices/Idt_StoragemodeService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemServices/Idt_StoragemodeService.cs"
new file mode 100644
index 0000000..99e868d
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemServices/Idt_StoragemodeService.cs"
@@ -0,0 +1,14 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEAWCS_Core.BaseServices;
+using WIDESEAWCS_Model.Models;
+
+namespace WIDESEAWCS_ISystemServices
+{
+    public interface Idt_StoragemodeService : IService<dt_storagemode>
+    {
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_IWMSPart/ILocationInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_IWMSPart/ILocationInfoService.cs"
index dad6e04..e455237 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_IWMSPart/ILocationInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_IWMSPart/ILocationInfoService.cs"
@@ -21,5 +21,12 @@
 
         WebResponseContent InitializationLocation(InitializationLocationDTO initializationLocationDTO);
         WebResponseContent getlocation();
+
+        /// <summary>
+        /// 鏍规嵁閫夋嫨鐨勫叆搴撹鍒欏垎閰嶈揣浣�
+        /// </summary>
+        /// <param name="InMode"></param>
+        /// <returns></returns>
+        Dt_LocationInfo GetInLocation(int InMode);
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/dt_batchInfo.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/dt_batchInfo.cs"
index 21332dd..d46c05a 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/dt_batchInfo.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/dt_batchInfo.cs"
@@ -21,10 +21,16 @@
         public int Id { get; set; }
 
         /// <summary>
-        /// 鎵规鍙�
+        /// 鍏ュ簱鎵规鍙�
         /// </summary>
-        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鎵规鍙�")]
-        public string Batch { get; set; }
+        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍏ュ簱鎵规鍙�")]
+        public string InBatch { get; set; }
+
+        /// <summary>
+        /// 鍑哄簱鎵规鍙�
+        /// </summary>
+        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍑哄簱鎵规鍙�")]
+        public string OutBatch { get; set; }
 
         /// <summary>
         /// 鐗╂枡淇℃伅锛岃嚜浜ф垨澶栬喘
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/dt_outstockinfo.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/dt_outstockinfo.cs"
index 62d5df6..d55fbbe 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/dt_outstockinfo.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/dt_outstockinfo.cs"
@@ -17,7 +17,7 @@
         public int Id { get; set; }
 
         /// <summary>
-        /// 鏄惁鍑哄簱
+        /// 鏄惁鍑哄簱 0涓嶅嚭搴�  1鍑哄簱
         /// </summary>
         [SugarColumn(IsNullable = false, ColumnDescription = "鏄惁鍑哄簱")]
         public int isout { get; set; }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/dt_storagemode.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/dt_storagemode.cs"
new file mode 100644
index 0000000..84c3e2c
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/System/dt_storagemode.cs"
@@ -0,0 +1,24 @@
+锘縰sing SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEAWCS_Core.DB.Models;
+
+namespace WIDESEAWCS_Model.Models
+{
+    public class dt_storagemode : BaseEntity
+    {
+        /// <summary>
+        /// 涓婚敭
+        /// </summary>
+        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")]
+        public int Id { get; set; }
+        /// <summary>
+        /// 鍏ュ簱妯″紡
+        /// </summary>
+        [SugarColumn(IsNullable = false, ColumnDescription = "鍏ュ簱妯″紡")]
+        public int storagemode { get; set; }
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/WMSPart/Dt_StockInfo.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/WMSPart/Dt_StockInfo.cs"
index 16d5c1c..7b62696 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/WMSPart/Dt_StockInfo.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/WMSPart/Dt_StockInfo.cs"
@@ -51,9 +51,9 @@
         public int StockStatus { get; set; }
 
         /// <summary>
-        /// 澶囨敞
+        /// 0鑷骇  1澶栬喘
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDescription = "澶囨敞")]
+        [SugarColumn(IsNullable = true, ColumnDescription = "0鑷骇  1澶栬喘")]
         public int Remark { get; set; }
 
         /// <summary>
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/BatchController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/BatchController.cs"
index fbbf1a4..86e5a9f 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/BatchController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/BatchController.cs"
@@ -1,4 +1,6 @@
-锘縰sing Microsoft.AspNetCore.Mvc;
+锘縰sing Autofac.Core;
+using Microsoft.AspNetCore.Mvc;
+using WIDESEAWCS_Core;
 using WIDESEAWCS_Core.BaseController;
 using WIDESEAWCS_Core.Caches;
 using WIDESEAWCS_ISystemServices;
@@ -16,5 +18,38 @@
         {
             _httpContextAccessor = httpContextAccessor;
         }
+
+        /// <summary>
+        /// 淇敼鍏ュ簱鎵规淇℃伅
+        /// </summary>
+        /// <param name="batch"></param>
+        /// <returns></returns>
+        [HttpPost, HttpGet, Route("UpdateInBatch")]
+        public WebResponseContent UpdateInBatch(string batch)
+        {
+            return Service.UpdateInBatch(batch);
+        }
+
+        /// <summary>
+        /// 淇敼鍑哄簱鎵规淇℃伅
+        /// </summary>
+        /// <param name="batch"></param>
+        /// <returns></returns>
+        [HttpPost, HttpGet, Route("UpdateOutBatch")]
+        public WebResponseContent UpdateOutBatch(string batch)
+        {
+            return Service.UpdateOutBatch(batch);
+        }
+
+        /// <summary>
+        /// 淇敼鍑哄簱鐗╂枡淇℃伅锛岄渶瑕佸嚭澶栬喘杩樻槸鑷骇 0涓嶅嚭搴�   1鍑哄簱
+        /// </summary>
+        /// <param name="batch"></param>
+        /// <returns></returns>
+        [HttpPost, HttpGet, Route("UpdateOutStorageMode")]
+        public WebResponseContent UpdateOutStorageMode(int mode)
+        {
+            return Service.UpdateOutStorageMode(mode);
+        }
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/OutStockController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/OutStockController.cs"
index 02fa68e..c74cb5a 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/OutStockController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/OutStockController.cs"
@@ -1,4 +1,5 @@
 锘縰sing Microsoft.AspNetCore.Mvc;
+using WIDESEAWCS_Core;
 using WIDESEAWCS_Core.BaseController;
 using WIDESEAWCS_ISystemServices;
 using WIDESEAWCS_Model.Models;
@@ -14,5 +15,16 @@
         {
             _httpContextAccessor = httpContextAccessor;
         }
+
+        /// <summary>
+        /// 淇敼褰撳墠鏄惁闇�瑕佸嚭搴�
+        /// </summary>
+        /// <param name="batch"></param>
+        /// <returns></returns>
+        [HttpPost, HttpGet, Route("UpdateIsOutStock")]
+        public WebResponseContent UpdateIsOutStock(int isout)
+        {
+            return Service.UpdateIsOutStock(isout);
+        }
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/StoragemodeController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/StoragemodeController.cs"
new file mode 100644
index 0000000..b5360ef
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/StoragemodeController.cs"
@@ -0,0 +1,18 @@
+锘縰sing Microsoft.AspNetCore.Mvc;
+using WIDESEAWCS_Core.BaseController;
+using WIDESEAWCS_ISystemServices;
+using WIDESEAWCS_Model.Models;
+
+namespace WIDESEAWCS_Server.Controllers.System
+{
+    [Route("api/StorageMode")]
+    [ApiController]
+    public class StoragemodeController : ApiBaseController<Idt_StoragemodeService, dt_storagemode>
+    {
+        private readonly IHttpContextAccessor _httpContextAccessor;
+        public StoragemodeController(Idt_StoragemodeService service, IHttpContextAccessor httpContextAccessor) : base(service)
+        {
+            _httpContextAccessor = httpContextAccessor;
+        }
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/dt_batchinfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/dt_batchinfoService.cs"
index 2833c26..82c998f 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/dt_batchinfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/dt_batchinfoService.cs"
@@ -5,6 +5,7 @@
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using WIDESEAWCS_Core;
 using WIDESEAWCS_Core.BaseRepository;
 using WIDESEAWCS_Core.BaseServices;
 using WIDESEAWCS_ISystemServices;
@@ -24,5 +25,73 @@
             _mapper = mapper;
         }
 
+        /// <summary>
+        /// 淇敼鍏ュ簱鎵规淇℃伅
+        /// </summary>
+        /// <param name="batch"></param>
+        /// <returns></returns>
+        public WebResponseContent UpdateInBatch(string batch) 
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                var batchibfo = BaseDal.QueryFirst(v=>v.Id==1);
+                batchibfo.InBatch = batch;
+                BaseDal.UpdateData(batchibfo);
+
+                content = WebResponseContent.Instance.OK();
+            }
+            catch (Exception ex)
+            {
+                content = WebResponseContent.Instance.Error($"淇敼鍏ュ簱鎵规鍙峰け璐�:銆恵ex.Message}銆�");
+            }
+            return content;
+        }
+
+        /// <summary>
+        /// 淇敼鍑哄簱鎵规淇℃伅
+        /// </summary>
+        /// <param name="batch"></param>
+        /// <returns></returns>
+        public WebResponseContent UpdateOutBatch(string batch)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                var batchibfo = BaseDal.QueryFirst(v => v.Id == 1);
+                batchibfo.OutBatch = batch;
+                BaseDal.UpdateData(batchibfo);
+
+                content = WebResponseContent.Instance.OK();
+            }
+            catch (Exception ex)
+            {
+                content = WebResponseContent.Instance.Error($"淇敼鍏ュ簱鎵规鍙峰け璐�:銆恵ex.Message}銆�");
+            }
+            return content;
+        }
+
+        /// <summary>
+        /// 淇敼鍑哄簱鐗╂枡淇℃伅锛岄渶瑕佸嚭澶栬喘杩樻槸鑷骇
+        /// </summary>
+        /// <param name="batch"></param>
+        /// <returns></returns>
+        public WebResponseContent UpdateOutStorageMode(int mode)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                var batchibfo = BaseDal.QueryFirst(v => v.Id == 1);
+                batchibfo.materType = mode;
+                BaseDal.UpdateData(batchibfo);
+
+                content = WebResponseContent.Instance.OK();
+            }
+            catch (Exception ex)
+            {
+                content = WebResponseContent.Instance.Error($"淇敼鍏ュ簱鎵规鍙峰け璐�:銆恵ex.Message}銆�");
+            }
+            return content;
+        }
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/dt_errormsginfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/dt_errormsginfoService.cs"
index 93e7fc7..7a135d7 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/dt_errormsginfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/dt_errormsginfoService.cs"
@@ -33,9 +33,13 @@
         {
             WebResponseContent webResponse = new WebResponseContent();
             var error = BaseDal.QueryFirst(v=>v.Id==id);
-            error.errormsg = message;
-            error.ModifyDate = DateTime.Now;
-            BaseDal.UpdateData(error);
+            DateTime dTime = (DateTime)error.ModifyDate;
+            if (error.mesg.Equals(message) && (DateTime.Now - dTime).TotalSeconds > 10) 
+            {
+                error.errormsg = message;
+                error.ModifyDate = DateTime.Now;
+                BaseDal.UpdateData(error);
+            }
             return webResponse.OK();
         }
     }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/dt_outstockinfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/dt_outstockinfoService.cs"
index bbcd970..13d12e2 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/dt_outstockinfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/dt_outstockinfoService.cs"
@@ -4,6 +4,7 @@
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using WIDESEAWCS_Core;
 using WIDESEAWCS_Core.BaseRepository;
 using WIDESEAWCS_Core.BaseServices;
 using WIDESEAWCS_ISystemServices;
@@ -22,5 +23,28 @@
         {
             _mapper = mapper;
         }
+
+        /// <summary>
+        /// 淇敼鍑哄簱鐗╂枡淇℃伅锛岄渶瑕佸嚭澶栬喘杩樻槸鑷骇
+        /// </summary>
+        /// <param name="batch"></param>
+        /// <returns></returns>
+        public WebResponseContent UpdateIsOutStock(int isout)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                var isoutstock = BaseDal.QueryFirst(v => v.Id == 1);
+                isoutstock.isout = isout;
+                BaseDal.UpdateData(isoutstock);
+
+                content = WebResponseContent.Instance.OK();
+            }
+            catch (Exception ex)
+            {
+                content = WebResponseContent.Instance.Error($"淇敼鍏ュ簱鎵规鍙峰け璐�:銆恵ex.Message}銆�");
+            }
+            return content;
+        }
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/dt_storagemodeService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/dt_storagemodeService.cs"
new file mode 100644
index 0000000..b8cb33c
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/dt_storagemodeService.cs"
@@ -0,0 +1,26 @@
+锘縰sing AutoMapper;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEAWCS_Core.BaseRepository;
+using WIDESEAWCS_Core.BaseServices;
+using WIDESEAWCS_ISystemServices;
+using WIDESEAWCS_Model.Models;
+
+namespace WIDESEAWCS_SystemServices
+{
+    public class dt_storagemodeService : ServiceBase<dt_storagemode, IRepository<dt_storagemode>>, Idt_StoragemodeService
+    {
+        private readonly IMapper _mapper;
+        /// <summary>
+        /// 浠撳偍灞�(鏁版嵁搴撹闂�)
+        /// </summary>
+        public IRepository<dt_storagemode> Repository => BaseDal;
+        public dt_storagemodeService(IRepository<dt_storagemode> BaseDal, IMapper mapper) : base(BaseDal)
+        {
+            _mapper = mapper;
+        }
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
index 86b0a6c..1fbfd07 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -19,6 +19,7 @@
 using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
 using SqlSugar;
 using System.Diagnostics.CodeAnalysis;
+using System.Threading.Tasks;
 using WIDESEAWCS_Common.LocationEnum;
 using WIDESEAWCS_Common.StockEnum;
 using WIDESEAWCS_Common.TaskEnum;
@@ -431,7 +432,7 @@
             }
             catch (Exception ex)
             {
-                _ErrormsginfoService.UpdateErrorMsg(ex.Message,1);
+                UpdateTaskExceptionMessage(taskNum, ex.Message);
             }
         }
 
@@ -578,7 +579,7 @@
                     stock.LocationCode = nawtask.TargetAddress;
                     stock.Weight = (decimal)weight;
                     stock.StockStatus = (int)stockEnum.Lock;
-                    stock.BatchNo = batck.Batch;
+                    stock.BatchNo = batck.InBatch;
                     if (nawtask.Remark== (int)MateTypeEnum.ZiChan)
                     {
                         stock.Remark = (int)MateTypeEnum.ZiChan;
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/GZJ/GZJJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/GZJ/GZJJob.cs"
index 03eda49..1ebe252 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/GZJ/GZJJob.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/GZJ/GZJJob.cs"
@@ -21,10 +21,12 @@
 using WIDESEAWCS_Core.Helper;
 using WIDESEAWCS_ISystemServices;
 using WIDESEAWCS_ITaskInfoService;
+using WIDESEAWCS_IWMSPart;
 using WIDESEAWCS_Model.Models;
 using WIDESEAWCS_QuartzJob;
 using WIDESEAWCS_QuartzJob.DeviceBase;
 using WIDESEAWCS_QuartzJob.StackerCrane.Enum;
+using WIDESEAWCS_TaskInfoService;
 using WIDESEAWCS_Tasks.OHT;
 
 namespace WIDESEAWCS_Tasks
@@ -36,18 +38,33 @@
         private readonly Idt_ErrormsginfoService _ErrormsginfoService;
         private readonly IRepository<dt_stationInfo> _dt_stationInfoRepository;
         private readonly IRepository<Dt_Task> _dt_taskRepositiry;
+        private readonly ILocationInfoService _locationInfoService;
+        private readonly IRepository<dt_storagemode> _storagemodeRepository;
+        private readonly IRepository<dt_outstockinfo> _outStockRepository;
+        private readonly IRepository<dt_batchInfo> _batchInfoRepository;
+        private readonly IRepository<Dt_StockInfo> _StockInfoRepository;
 
         WebSocketServer _webSocketServer;
         public GZJJob(ITaskService taskService, WebSocketServer webSocketServer, Idt_ErrormsginfoService errormsginfoService,
             Idt_StationinfoService stationinfoService,
             IRepository<dt_stationInfo> dt_stationInfoRepository,
-            IRepository<Dt_Task> dt_taskRepositiry)
+            IRepository<Dt_Task> dt_taskRepositiry,
+            ILocationInfoService locationInfoService,
+            IRepository<dt_outstockinfo> outStockRepository,
+            IRepository<dt_storagemode> storagemodeRepository,
+            IRepository<dt_batchInfo> batchInfoRepository,
+            IRepository<Dt_StockInfo> StockInfoRepository)
         {
             _taskService = taskService;//娉ㄥ叆
             _webSocketServer = webSocketServer;
             _ErrormsginfoService = errormsginfoService;
             _dt_stationInfoRepository = dt_stationInfoRepository;
             _dt_taskRepositiry = dt_taskRepositiry;
+            _locationInfoService = locationInfoService;
+            _storagemodeRepository = storagemodeRepository;
+            _outStockRepository = outStockRepository;
+            _batchInfoRepository = batchInfoRepository;
+            _StockInfoRepository = StockInfoRepository;
         }
 
         public Task Execute(IJobExecutionContext context)
@@ -65,12 +82,12 @@
                         throw new Exception($"瑙勬暣鏈烘姇鍏ヤ娇鐢ㄤ俊鍙蜂负false");
                     }
                     Dt_Task task = new Dt_Task();
-                    
+                    var storagemode = _storagemodeRepository.QueryFirst(v=>v.Id==1);
                     if (OHTJob.oHTReadData.R_RGVMode && OHTJob.oHTReadData.R_DK_isready)//RGV涓婃枡妯″紡锛屼笖涓滆法鏋跺瓙鏈変笂鏂欎俊鍙�
                     {
                         var station=_dt_stationInfoRepository.QueryFirst(v=>v.msg== "涓滆法鏋跺瓙");
                         task.SourceAddress = station.Row + "-" + station.Column + "-1";
-                        task.TargetAddress = "";
+                        task.TargetAddress = _locationInfoService.GetInLocation(storagemode.storagemode).LocationCode;
                         task.Grade = 1;
                         task.Remark = (int)MateTypeEnum.ZiChan;
                     }
@@ -78,7 +95,7 @@
                     {
                         var station = _dt_stationInfoRepository.QueryFirst(v => v.msg == "瑗胯法鏋跺瓙");
                         task.SourceAddress = station.Row + "-" + station.Column + "-1";
-                        task.TargetAddress = "";
+                        task.TargetAddress = _locationInfoService.GetInLocation(storagemode.storagemode).LocationCode;
                         var DKstation = _dt_stationInfoRepository.QueryFirst(v => v.msg == "涓滆法鏋跺瓙");
                         string address= DKstation.Row + "-" + DKstation.Column + "-1";
                         var oldtask = _dt_taskRepositiry.QueryFirst(v=>v.SourceAddress== address);
@@ -96,7 +113,7 @@
                     {
                         var station = _dt_stationInfoRepository.QueryFirst(v => v.msg == "瑗胯法鏋跺瓙");
                         task.SourceAddress = station.Row + "-" + station.Column + "-1";
-                        task.TargetAddress = "";
+                        task.TargetAddress = _locationInfoService.GetInLocation(storagemode.storagemode).LocationCode;
                         task.Grade = 1;
                         task.Remark = (int)MateTypeEnum.WaiGou;
                     }
@@ -104,7 +121,7 @@
                     {
                         var station = _dt_stationInfoRepository.QueryFirst(v => v.msg == "涓滆法鏋跺瓙");
                         task.SourceAddress = station.Row + "-" + station.Column + "-1";
-                        task.TargetAddress = "";
+                        task.TargetAddress = _locationInfoService.GetInLocation(storagemode.storagemode).LocationCode;
                         var XKstation = _dt_stationInfoRepository.QueryFirst(v => v.msg == "瑗胯法鏋跺瓙");
                         string address= XKstation.Row + "-" + XKstation.Column + "-1";
                         var oldtask = _dt_taskRepositiry.QueryFirst(v => v.SourceAddress == address);
@@ -134,70 +151,57 @@
                 {
                     _ErrormsginfoService.UpdateErrorMsg(ex.Message, 2);
                 }
+
+                try
+                {
+                    #region 鐢熸垚鍑哄簱浠诲姟
+                    var isout = _outStockRepository.QueryFirst(v => v.Id == 1);
+                    if (isout.isout != 1)
+                    {
+                        throw new Exception($"褰撳墠绯荤粺璁剧疆涓轰笉鍑哄簱妯″紡");
+                    }
+                    if (!OHTJob.oHTReadData.R_ZXJ_isWork)
+                    {
+                        throw new Exception($"鏁村舰鏈烘姇鍏ヤ娇鐢ㄤ俊鍙蜂负false");
+                    }
+                    if (!OHTJob.oHTReadData.R_ZXJ_TCMode || OHTJob.oHTReadData.R_HC_isReadyWork)
+                    {
+                        throw new Exception($"鏁村舰鏈轰笉灞炰簬澶╄溅涓婃枡妯″紡鎴栧ぉ杞︽斁鏉夸俊鍙蜂负false");
+                    }
+                    //鏌ヨ褰撳墠浠诲姟姹犱腑鏄惁瀛樺湪鍑哄簱浠诲姟锛屽嚭搴撲换鍔″彧鑳藉瓨鍦ㄤ竴鏉�
+                    var oldtask = _dt_taskRepositiry.QueryFirst(v => v.TaskType == (int)TaskOutboundTypeEnum.Outbound);
+                    if (oldtask != null)
+                    {
+                        throw new Exception($"褰撳墠浠诲姟姹犱腑宸插瓨鍦ㄤ竴鏉″嚭搴撲换鍔�");
+                    }
+                    //鏌ヨ褰撳墠闇�瑕佸嚭搴撶殑鎵规鍙凤紝浠ュ強鍑哄簱鐗╂枡绫诲瀷
+                    var batch = _batchInfoRepository.QueryFirst(v => v.Id == 1);
+                    //鏌ヨ搴撳瓨鐗╂枡搴撳瓨淇℃伅
+                    var stocks = _StockInfoRepository.QueryData(v => v.Remark == batch.materType && v.BatchNo == batch.OutBatch).OrderBy(v => v.CreateDate).ToList();
+                    if (stocks.Count <= 0)
+                    {
+                        throw new Exception($"褰撳墠搴撳瓨涓病鏈夈�恵batch.materType}銆戯紙0鑷骇 1澶栬喘锛変笖鎵规涓恒�恵batch.OutBatch}銆戠殑鐗╂枡");
+                    }
+                    //鏌ヨ缁堢偣绔欏彴淇℃伅
+                    var station = _dt_stationInfoRepository.QueryFirst(v => v.msg == "鏁村舰鏈烘斁鏂欎綅");
+                    //寮�濮嬪垱寤轰换鍔�
+                    Dt_Task outtask = new Dt_Task();
+                    outtask.Roadway = "TC01";
+                    outtask.TaskType = (int)TaskOutboundTypeEnum.Outbound;
+                    outtask.TaskState = (int)TaskOutStatusEnum.OutNew;
+                    outtask.SourceAddress = stocks[0].LocationCode;
+                    outtask.TargetAddress = station.Row + "-" + station.Column + "-1"; ;
+                    outtask.Grade = 1;
+                    outtask.Remark = batch.materType;
+                    _dt_taskRepositiry.AddData(outtask);
+                    #endregion
+                }
+                catch (Exception ex)
+                {
+                    _ErrormsginfoService.UpdateErrorMsg(ex.Message, 3);
+                }
             }
-
-
             return Task.CompletedTask;
         }
-
-
-        /// <summary>
-        /// 浠诲姟瀹炰綋杞崲鎴愬懡浠odel
-        /// </summary>
-        /// <param name="task">浠诲姟瀹炰綋</param>
-        /// <returns></returns>
-        /// <exception cref="Exception"></exception>
-        public OHTTaskCommand? ConvertToOHTTaskCommand([NotNull] Dt_Task task)
-        {
-            OHTTaskCommand oHtTaskCommand = new OHTTaskCommand();
-
-            oHtTaskCommand.W_Task_Type = 1;
-            oHtTaskCommand.W_Load_Layer = 0;
-            oHtTaskCommand.W_Pick_Line = 1;
-           
-            string[] SourceCodes = task.SourceAddress.Split("-");
-            if (SourceCodes.Length == 3)
-            {
-                oHtTaskCommand.W_Pick_Line = Convert.ToInt16(SourceCodes[1]);
-                oHtTaskCommand.W_Put_Column = Convert.ToInt16(SourceCodes[2]);
-                oHtTaskCommand.W_Put_Layer = Convert.ToInt16(SourceCodes[3]);
-            }
-            else
-            {
-                //鏁版嵁閰嶇疆閿欒
-                _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"浠诲姟婧愬湴鍧�閰嶇疆閿欒锛�");
-                return null;
-            }
-            string[] targetCodes = task.TargetAddress.Split("-");
-            if (targetCodes.Length == 3)
-            {
-                oHtTaskCommand.W_Put_Line = Convert.ToInt16(targetCodes[1]);
-                oHtTaskCommand.W_Put_Column = Convert.ToInt16(targetCodes[2]);
-                oHtTaskCommand.W_Put_Layer = Convert.ToInt16(targetCodes[3]);
-            }
-            else
-            {
-                //鏁版嵁閰嶇疆閿欒
-                _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"浠诲姟鐩爣鍦板潃閰嶇疆閿欒");
-                return null;
-            }
-            return oHtTaskCommand;
-        }
-
-
-        /// <summary>
-        /// 鑾峰彇浠诲姟
-        /// </summary>
-        /// <returns></returns>
-        private Dt_Task? GetTask()
-        {
-            Dt_Task task;
-            task = _taskService.QueryStackerCraneTask("R01");
-            return task;
-        }
-
-
     }
-
-
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/OHT/OHTJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/OHT/OHTJob.cs"
index 6c11c06..43608d4 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/OHT/OHTJob.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/OHT/OHTJob.cs"
@@ -224,8 +224,8 @@
                 oHtTaskCommand.W_Catch_2 = 1;
                 oHtTaskCommand.W_CheckValue += 2;
             }
-            oHtTaskCommand.W_TaskNumber = task.TaskNum;
-            oHtTaskCommand.W_CheckValue += task.TaskNum;
+            oHtTaskCommand.W_TaskNumber = task.TaskId;
+            oHtTaskCommand.W_CheckValue += task.TaskId;
             return oHtTaskCommand;
         }
 
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_WMSPart/LocationInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_WMSPart/LocationInfoService.cs"
index 9226319..6a6a56d 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_WMSPart/LocationInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_WMSPart/LocationInfoService.cs"
@@ -1,7 +1,6 @@
-锘�
-
-using OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime;
+锘縰sing AutoMapper;
 using WIDESEAWCS_Common.LocationEnum;
+using WIDESEAWCS_Common.TaskEnum;
 using WIDESEAWCS_Core;
 using WIDESEAWCS_Core.BaseRepository;
 using WIDESEAWCS_Core.BaseServices;
@@ -16,12 +15,17 @@
     /// <summary>
     /// 璐т綅淇℃伅涓氬姟鎺ュ彛瀹炵幇灞�
     /// </summary>
-    public partial class LocationInfoService : ServiceBase<Dt_LocationInfo, IRepository<Dt_LocationInfo>>, ILocationInfoService
+    public class LocationInfoService : ServiceBase<Dt_LocationInfo, IRepository<Dt_LocationInfo>>, ILocationInfoService
     {
         public IRepository<Dt_LocationInfo> Repository => BaseDal;
+        private readonly IRepository<dt_storagemode> _dt_storagemode;
+        private readonly IMapper _mapper;
+        //private readonly Idt_ErrormsginfoService _ErrormsginfoService;
 
-        public LocationInfoService(IRepository<Dt_LocationInfo> BaseDal) : base(BaseDal)
+        public LocationInfoService(IRepository<Dt_LocationInfo> BaseDal, IRepository<dt_storagemode> storagemode, IMapper mapper) : base(BaseDal)
         {
+            _dt_storagemode = storagemode;
+            _mapper = mapper;
         }
 
         public override PageGridData<Dt_LocationInfo> GetPageData(PageDataOptions options)
@@ -91,6 +95,43 @@
             }
         }
 
+        /// <summary>
+        /// 鏍规嵁閫夋嫨鐨勫叆搴撹鍒欏垎閰嶈揣浣�
+        /// </summary>
+        /// <param name="InMode"></param>
+        /// <returns></returns>
+        public Dt_LocationInfo GetInLocation(int InMode) 
+        {
+            Dt_LocationInfo location = new Dt_LocationInfo();
+            try
+            {
+                var mode = _dt_storagemode.QueryFirst(v=>v.Id==1);
+                if (mode.storagemode==(int)StorageModeEnum.Out)
+                {
+                    var locations = BaseDal.QueryData(v=>v.EnableStatus== (int)EnableStatusEnum.Normal && v.LocationStatus==(int)LocationStatusEnum.Free).OrderBy(v=>v.Row).ToList();
+                    if (locations.Count<=0) 
+                    {
+                        throw new Exception($"鍑哄簱浼樺厛璐т綅鍒嗛厤澶辫触锛屽綋鍓嶆棤绌洪棽璐т綅");
+                    }
+                    location = locations[0];
+                }
+                else if(mode.storagemode == (int)StorageModeEnum.In)
+                {
+                    var locations = BaseDal.QueryData(v => v.EnableStatus == (int)EnableStatusEnum.Normal && v.LocationStatus == (int)LocationStatusEnum.Free).OrderByDescending(v => v.Row).ToList();
+                    if (locations.Count <= 0)
+                    {
+                        throw new Exception($"鍏ュ簱浼樺厛璐т綅鍒嗛厤澶辫触锛屽綋鍓嶆棤绌洪棽璐т綅");
+                    }
+                    location = locations[0];
+                }
+            }
+            catch (Exception ex)
+            {
+                throw new Exception(ex.Message);
+            }
+            return location;
+        }
+
         public WebResponseContent GetLocationConfigs(int layer)
         {
             try

--
Gitblit v1.9.3