From ea3b8223434673ca6d911bfcd6cdcafa773cb5f0 Mon Sep 17 00:00:00 2001
From: qinchulong <qinchulong@hnkhzn.com>
Date: 星期一, 03 三月 2025 22:01:01 +0800
Subject: [PATCH] 更新入库逻辑

---
 项目代码/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v17/DocumentLayout.json   |   49 ++++++++++++++++--------
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs       |    2 
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/GZJ/GZJJob.cs                  |   16 +++++++
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/OHT/OHTJob.cs                  |    1 
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_WMSPart/LocationInfoService.cs       |   18 +++++++++
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task_hty.cs |    2 
 6 files changed, 67 insertions(+), 21 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 ab32964..e35fa0b 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,23 +3,27 @@
   "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\\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:{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:{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:{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:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|F:\\Git\u9879\u76EE\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\wideseawcs_tasks\\zxj\\zxjjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
       "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\zxj\\zxjjob.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\\ohttaskcommand.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\\ohttaskcommand.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
       "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\oht\\ohttaskcommand.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
     }
   ],
@@ -30,24 +34,37 @@
       "DocumentGroups": [
         {
           "DockedWidth": 200,
-          "SelectedChildIndex": 4,
+          "SelectedChildIndex": 1,
           "Children": [
             {
               "$type": "Document",
-              "DocumentIndex": 1,
+              "DocumentIndex": 3,
+              "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": "AQIAAHEAAAAAAAAAAADwv4oAAAAVAAAA",
+              "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
+              "WhenOpened": "2025-03-03T13:49:04.249Z",
+              "EditorCaption": ""
+            },
+            {
+              "$type": "Document",
+              "DocumentIndex": 0,
               "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": "AQIAAI0CAAAAAAAAAAAuwKICAAAUAAAA",
+              "ViewState": "AQIAAGECAAAAAAAAAADwv3sCAABQAAAA",
               "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
               "WhenOpened": "2025-03-03T08:49:39.365Z",
               "EditorCaption": ""
             },
             {
               "$type": "Document",
-              "DocumentIndex": 4,
+              "DocumentIndex": 5,
               "Title": "OHTTaskCommand.cs",
               "DocumentMoniker": "F:\\Git\u9879\u76EE\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\OHT\\OHTTaskCommand.cs",
               "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\OHT\\OHTTaskCommand.cs",
@@ -55,12 +72,11 @@
               "RelativeToolTip": "WIDESEAWCS_Tasks\\OHT\\OHTTaskCommand.cs",
               "ViewState": "AQIAACkAAAAAAAAAAAAswDoAAAAeAAAA",
               "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
-              "WhenOpened": "2025-03-03T08:27:17.639Z",
-              "EditorCaption": ""
+              "WhenOpened": "2025-03-03T08:27:17.639Z"
             },
             {
               "$type": "Document",
-              "DocumentIndex": 3,
+              "DocumentIndex": 4,
               "Title": "ZXJJob.cs",
               "DocumentMoniker": "F:\\Git\u9879\u76EE\\YangJiPingKu\\\u9879\u76EE\u4EE3\u7801\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\ZXJ\\ZXJJob.cs",
               "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\ZXJ\\ZXJJob.cs",
@@ -68,8 +84,7 @@
               "RelativeToolTip": "WIDESEAWCS_Tasks\\ZXJ\\ZXJJob.cs",
               "ViewState": "AQIAAD0AAAAAAAAAAAAIwGAAAAAcAAAA",
               "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
-              "WhenOpened": "2025-03-03T06:27:45.31Z",
-              "EditorCaption": ""
+              "WhenOpened": "2025-03-03T06:27:45.31Z"
             },
             {
               "$type": "Document",
@@ -79,20 +94,20 @@
               "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": "AQIAAE8AAAAAAAAAAAAuwNUAAAAUAAAA",
+              "ViewState": "AQIAAHQAAAAAAAAAAAApwJQAAAADAAAA",
               "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
               "WhenOpened": "2025-03-02T07:23:03.899Z",
               "EditorCaption": ""
             },
             {
               "$type": "Document",
-              "DocumentIndex": 0,
+              "DocumentIndex": 1,
               "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": "AQIAAE4AAAAAAAAAAAAuwGkAAAAZAAAA",
+              "ViewState": "AQIAAFEAAAAAAAAAAAAuwGYAAABLAAAA",
               "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_Model/Models/TaskInfo/Dt_Task_hty.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task_hty.cs"
index 3a4d14a..df23548 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task_hty.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task_hty.cs"
@@ -26,7 +26,7 @@
 
 namespace WIDESEAWCS_Model.Models
 {
-    [SugarTable(nameof(Dt_Task), "浠诲姟淇℃伅")]
+    [SugarTable(nameof(Dt_Task_hty), "浠诲姟淇℃伅")]
     public class Dt_Task_hty : BaseEntity
     {
         /// <summary>
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 dd4b366..4b4aad7 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"
@@ -669,7 +669,7 @@
                     _stockRepository.DeleteData(Towstock);
                     _locationRepository.UpdateData(location);
                     _locationRepository.UpdateData(locationTow);
-                    //_taskhtyRepository.AddData(taskhty);
+                    _taskhtyRepository.AddData(taskhty);
                     BaseDal.DeleteData(nawtask);
                     //鎻愪氦浜嬪姟
                     _unitOfWorkManage.CommitTran();
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 674b8c5..549a68f 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"
@@ -95,6 +95,7 @@
                         var station=_dt_stationInfoRepository.QueryFirst(v=>v.msg== "涓滆法鏋跺瓙");
                         task.SourceAddress = station.Row + "-" + station.Column + "-1";
                         task.TargetAddress = _locationInfoService.GetInLocation(storagemode.storagemode).LocationCode;
+                        
                         task.Grade = 1;
                         task.Remark = (int)MateTypeEnum.ZiChan;
                     }
@@ -146,10 +147,23 @@
                     {
                         throw new Exception($"瑙勬暣鏈哄綋鍓嶄俊鍙蜂笉婊¤冻鍏ュ簱浠诲姟鐢熸垚鏉′欢");
                     }
+                    //鏌ユ壘鐩搁偦鐨勫簱浣�
+                    Dt_LocationInfo Towlocation = new Dt_LocationInfo();
+                    var Onelocation = _LocationInfoRepository.QueryFirst(v => v.LocationCode == task.TargetAddress);
+                    if (Onelocation.Depth == 1)
+                    {
+                        Towlocation = _LocationInfoRepository.QueryFirst(v => v.Row == Onelocation.Row && v.Column == Onelocation.Column && v.Depth == 2);
+                    }
+                    else
+                    {
+                        Towlocation = _LocationInfoRepository.QueryFirst(v => v.Row == Onelocation.Row && v.Column == Onelocation.Column && v.Depth == 1);
+                    }
+                    task.NextAddress = Towlocation.LocationCode;
                     task.Roadway = "TC01";
                     task.TaskType = (int)TaskInboundTypeEnum.Inbound;
                     task.TaskState = (int)TaskInStatusEnum.InNew;
-
+                    task.PalletCode = "text";
+                    task.CurrentAddress = "text";
                     _dt_taskRepositiry.AddData(task);
 
                     #endregion
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 64f7259..f71d2ff 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"
@@ -45,7 +45,6 @@
         }
         public Task Execute(IJobExecutionContext context)
         {
-           
             bool flag = context.JobDetail.JobDataMap.TryGetValue("JobParams", out object? value);
             if (flag && value != null)
             {
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 6a6a56d..422dc1b 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"
@@ -124,6 +124,24 @@
                     }
                     location = locations[0];
                 }
+                if (location!=null)
+                {
+                    //鏌ユ壘鐩搁偦鐨勫簱浣�
+                    Dt_LocationInfo Towlocation = new Dt_LocationInfo();
+                    var Onelocation = BaseDal.QueryFirst(v => v.LocationCode == location.LocationCode);
+                    if (Onelocation.Depth == 1)
+                    {
+                        Towlocation = BaseDal.QueryFirst(v => v.Row == Onelocation.Row && v.Column == Onelocation.Column && v.Depth == 2);
+                    }
+                    else
+                    {
+                        Towlocation = BaseDal.QueryFirst(v => v.Row == Onelocation.Row && v.Column == Onelocation.Column && v.Depth == 1);
+                    }
+                    location.LocationStatus = (int)LocationStatusEnum.Lock;
+                    Towlocation.LocationStatus = (int)LocationStatusEnum.Lock;
+                    BaseDal.UpdateData(location);
+                    BaseDal.UpdateData(Towlocation);
+                }
             }
             catch (Exception ex)
             {

--
Gitblit v1.9.3