From 382c009ba2bb04374468e9584f262d6682841d9b Mon Sep 17 00:00:00 2001 From: pengmn <pmn@HanInfo> Date: 星期三, 28 五月 2025 18:09:41 +0800 Subject: [PATCH] 杭氧测试流程 --- HH.WCS.Mobox3.HangYang/wms/LocationHelper.cs | 31 HH.WCS.Mobox3.HangYang/util/Settings.cs | 12 .vs/HH.WCS.Mobox3/v17/DocumentLayout.backup.json | 237 ++++- .vs/HH.WCS.Mobox3/FileContentIndex/54e4b3c3-52ad-42b4-854a-16918d69ff07.vsidx | 0 HH.WCS.Mobox3.HangYang/models/OutOrder.cs | 5 .vs/HH.WCS.Mobox3/FileContentIndex/776e4f3b-874b-4552-bab6-b11e722d4f6b.vsidx | 0 .vs/HH.WCS.Mobox3/v17/DocumentLayout.json | 237 ++++- HH.WCS.Mobox3.HangYang/wms/WMSHelper.cs | 121 ++ HH.WCS.Mobox3.HangYang/wms/WCSHelper.cs | 30 HH.WCS.Mobox3.HangYang/core/WCSCore.cs | 28 HH.WCS.Mobox3.HangYang/models/TN_Material.cs | 1 HH.WCS.Mobox3.HangYang/util/HttpHelper.cs | 69 + HH.WCS.Mobox3.HangYang/models/CntrItemDetail.cs | 2 HH.WCS.Mobox3.HangYang/config/config.json | 36 HH.WCS.Mobox3.HangYang/process/TaskProcess.cs | 1243 +++++++++++++++++++++++++--------- HH.WCS.Mobox3.HangYang/models/OutOrderDetail.cs | 2 HH.WCS.Mobox3.HangYang/wms/ContainerHelper.cs | 34 17 files changed, 1,514 insertions(+), 574 deletions(-) diff --git a/.vs/HH.WCS.Mobox3/FileContentIndex/54e4b3c3-52ad-42b4-854a-16918d69ff07.vsidx b/.vs/HH.WCS.Mobox3/FileContentIndex/54e4b3c3-52ad-42b4-854a-16918d69ff07.vsidx new file mode 100644 index 0000000..b931b07 --- /dev/null +++ b/.vs/HH.WCS.Mobox3/FileContentIndex/54e4b3c3-52ad-42b4-854a-16918d69ff07.vsidx Binary files differ diff --git a/.vs/HH.WCS.Mobox3/FileContentIndex/776e4f3b-874b-4552-bab6-b11e722d4f6b.vsidx b/.vs/HH.WCS.Mobox3/FileContentIndex/776e4f3b-874b-4552-bab6-b11e722d4f6b.vsidx new file mode 100644 index 0000000..0831713 --- /dev/null +++ b/.vs/HH.WCS.Mobox3/FileContentIndex/776e4f3b-874b-4552-bab6-b11e722d4f6b.vsidx Binary files differ diff --git a/.vs/HH.WCS.Mobox3/v17/DocumentLayout.backup.json b/.vs/HH.WCS.Mobox3/v17/DocumentLayout.backup.json index 2cf6f75..548b74f 100644 --- a/.vs/HH.WCS.Mobox3/v17/DocumentLayout.backup.json +++ b/.vs/HH.WCS.Mobox3/v17/DocumentLayout.backup.json @@ -3,19 +3,7 @@ "WorkspaceRootPath": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\", "Documents": [ { - "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\util\\httphelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\util\\httphelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\api\\agvcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\api\\agvcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|d:\\\u6C49\u548C\u667A\u80FD\\git-mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\core\\wcscore.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\core\\wcscore.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\wms\\wmshelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|d:\\\u6C49\u548C\u667A\u80FD\\git-mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\wms\\wmshelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\wms\\wmshelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, { @@ -23,12 +11,48 @@ "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\process\\taskprocess.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, { - "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\api\\wmscontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\api\\wmscontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|d:\\\u6C49\u548C\u667A\u80FD\\git-mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\core\\wcscore.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\core\\wcscore.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, { "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\api\\agvcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\api\\agvcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\api\\wmscontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\api\\wmscontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|d:\\\u6C49\u548C\u667A\u80FD\\git-mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\wms\\wcshelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\wms\\wcshelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|d:\\\u6C49\u548C\u667A\u80FD\\git-mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\wms\\containerhelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\wms\\containerhelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|d:\\\u6C49\u548C\u667A\u80FD\\git-mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\wms\\locationhelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\wms\\locationhelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|d:\\\u6C49\u548C\u667A\u80FD\\git-mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\models\\outorderdetail.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\models\\outorderdetail.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|d:\\\u6C49\u548C\u667A\u80FD\\git-mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\models\\tn_material.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\models\\tn_material.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|d:\\\u6C49\u548C\u667A\u80FD\\git-mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\api\\moboxcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\api\\moboxcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\util\\httphelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\util\\httphelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, { "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\models\\inorder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", @@ -42,7 +66,7 @@ "DocumentGroups": [ { "DockedWidth": 200, - "SelectedChildIndex": 4, + "SelectedChildIndex": 7, "Children": [ { "$type": "Bookmark", @@ -60,64 +84,157 @@ "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\core\\WCSCore.cs", "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\core\\WCSCore.cs", "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\core\\WCSCore.cs", - "ViewState": "AgIAAAQAAAAAAAAAAAAswA0AAAAOAAAAAAAAAA==", + "ViewState": "AgIAAG4AAAAAAAAAAAAAAHkAAAAsAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-05-20T02:48:52.339Z", + "WhenOpened": "2025-05-27T10:24:13.523Z", "EditorCaption": "" }, { "$type": "Document", "DocumentIndex": 1, + "Title": "TaskProcess.cs", + "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\process\\TaskProcess.cs", + "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\process\\TaskProcess.cs", + "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\process\\TaskProcess.cs", + "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\process\\TaskProcess.cs", + "ViewState": "AgIAAFIFAAAAAAAAAADwv1sFAAAvAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-05-19T00:42:44.641Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 4, "Title": "AgvController.cs", "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\api\\AgvController.cs", "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\api\\AgvController.cs", "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\api\\AgvController.cs", "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\api\\AgvController.cs", - "ViewState": "AgIAABgAAAAAAAAAAAAAACUAAABJAAAAAAAAAA==", + "ViewState": "AgIAAAsAAAAAAAAAAAAqwBoAAAAiAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2025-05-20T02:48:30.565Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 0, - "Title": "HttpHelper.cs", - "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\util\\HttpHelper.cs", - "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\util\\HttpHelper.cs", - "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\util\\HttpHelper.cs", - "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\util\\HttpHelper.cs", - "ViewState": "AgIAAA4AAAAAAAAAAADwvxIAAAAAAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-05-19T08:17:19.57Z", - "EditorCaption": "" - }, - { - "$type": "Document", "DocumentIndex": 3, - "Title": "WMSHelper.cs", - "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\wms\\WMSHelper.cs", - "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\wms\\WMSHelper.cs", - "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\wms\\WMSHelper.cs", - "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\wms\\WMSHelper.cs", - "ViewState": "AgIAAN4EAAAAAAAAAAAuwE4FAAApAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-05-19T08:08:45.432Z" - }, - { - "$type": "Document", - "DocumentIndex": 6, "Title": "Program.cs", "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\Program.cs", "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\Program.cs", "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\Program.cs", "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\Program.cs", - "ViewState": "AgIAAFAAAAAAAAAAAAAuwF0AAAAxAAAAAAAAAA==", + "ViewState": "AgIAAFcAAAAAAAAAAAAqwF0AAAApAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-05-19T06:01:09.462Z" + "WhenOpened": "2025-05-19T06:01:09.462Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "WmsController.cs", + "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\api\\WmsController.cs", + "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\api\\WmsController.cs", + "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\api\\WmsController.cs", + "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\api\\WmsController.cs", + "ViewState": "AgIAADsAAAAAAAAAAAAIwEMAAAAoAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-05-19T00:41:35.255Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "WMSHelper.cs", + "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\wms\\WMSHelper.cs", + "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\wms\\WMSHelper.cs", + "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\wms\\WMSHelper.cs", + "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\wms\\WMSHelper.cs", + "ViewState": "AgIAAMICAAAAAAAAAAAAAOgCAAAfAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-05-27T09:53:43.906Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 6, + "Title": "WCSHelper.cs", + "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\wms\\WCSHelper.cs", + "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\wms\\WCSHelper.cs", + "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\wms\\WCSHelper.cs", + "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\wms\\WCSHelper.cs", + "ViewState": "AgIAAK8AAAAAAAAAAAAuwLcAAAAdAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-05-28T06:26:13.784Z", + "EditorCaption": "" }, { "$type": "Document", "DocumentIndex": 7, + "Title": "ContainerHelper.cs", + "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\wms\\ContainerHelper.cs", + "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\wms\\ContainerHelper.cs", + "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\wms\\ContainerHelper.cs", + "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\wms\\ContainerHelper.cs", + "ViewState": "AgIAADICAAAAAAAAAADwvzgCAAArAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-05-28T06:39:16.056Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 8, + "Title": "LocationHelper.cs", + "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\wms\\LocationHelper.cs", + "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\wms\\LocationHelper.cs", + "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\wms\\LocationHelper.cs", + "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\wms\\LocationHelper.cs", + "ViewState": "AgIAAN0BAAAAAAAAAAAuwPgBAACJAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-05-28T02:42:16.796Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 9, + "Title": "OutOrderDetail.cs", + "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\models\\OutOrderDetail.cs", + "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\models\\OutOrderDetail.cs", + "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\models\\OutOrderDetail.cs", + "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\models\\OutOrderDetail.cs", + "ViewState": "AgIAACYAAAAAAAAAAAAYwDQAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-05-27T06:51:12.163Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 10, + "Title": "TN_Material.cs", + "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\models\\TN_Material.cs", + "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\models\\TN_Material.cs", + "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\models\\TN_Material.cs", + "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\models\\TN_Material.cs", + "ViewState": "AgIAABQAAAAAAAAAAAA8wBkAAAALAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-05-27T06:50:41.626Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 11, + "Title": "MoboxController.cs", + "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\api\\MoboxController.cs", + "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\api\\MoboxController.cs", + "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\api\\MoboxController.cs", + "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\api\\MoboxController.cs", + "ViewState": "AgIAAH8AAAAAAAAAAAAuwI8AAAAPAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-05-26T03:21:14.486Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 13, "Title": "InOrder.cs", "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\models\\InOrder.cs", "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\models\\InOrder.cs", @@ -129,27 +246,15 @@ }, { "$type": "Document", - "DocumentIndex": 4, - "Title": "TaskProcess.cs", - "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\process\\TaskProcess.cs", - "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\process\\TaskProcess.cs", - "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\process\\TaskProcess.cs", - "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\process\\TaskProcess.cs", - "ViewState": "AgIAAFsAAAAAAAAAAAAqwGcAAAARAAAAAAAAAA==", + "DocumentIndex": 12, + "Title": "HttpHelper.cs", + "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\util\\HttpHelper.cs", + "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\util\\HttpHelper.cs", + "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\util\\HttpHelper.cs", + "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\util\\HttpHelper.cs", + "ViewState": "AgIAAJAAAAAAAAAAAAAuwLcAAAAZAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-05-19T00:42:44.641Z" - }, - { - "$type": "Document", - "DocumentIndex": 5, - "Title": "WmsController.cs", - "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\api\\WmsController.cs", - "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\api\\WmsController.cs", - "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\api\\WmsController.cs", - "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\api\\WmsController.cs", - "ViewState": "AgIAAAUAAAAAAAAAAAAuwCsAAAAqAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-05-19T00:41:35.255Z" + "WhenOpened": "2025-05-19T08:17:19.57Z" } ] } diff --git a/.vs/HH.WCS.Mobox3/v17/DocumentLayout.json b/.vs/HH.WCS.Mobox3/v17/DocumentLayout.json index 2cf6f75..548b74f 100644 --- a/.vs/HH.WCS.Mobox3/v17/DocumentLayout.json +++ b/.vs/HH.WCS.Mobox3/v17/DocumentLayout.json @@ -3,19 +3,7 @@ "WorkspaceRootPath": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\", "Documents": [ { - "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\util\\httphelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\util\\httphelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\api\\agvcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\api\\agvcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|d:\\\u6C49\u548C\u667A\u80FD\\git-mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\core\\wcscore.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\core\\wcscore.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\wms\\wmshelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|d:\\\u6C49\u548C\u667A\u80FD\\git-mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\wms\\wmshelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\wms\\wmshelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, { @@ -23,12 +11,48 @@ "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\process\\taskprocess.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, { - "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\api\\wmscontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\api\\wmscontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|d:\\\u6C49\u548C\u667A\u80FD\\git-mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\core\\wcscore.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\core\\wcscore.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, { "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\api\\agvcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\api\\agvcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\api\\wmscontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\api\\wmscontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|d:\\\u6C49\u548C\u667A\u80FD\\git-mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\wms\\wcshelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\wms\\wcshelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|d:\\\u6C49\u548C\u667A\u80FD\\git-mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\wms\\containerhelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\wms\\containerhelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|d:\\\u6C49\u548C\u667A\u80FD\\git-mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\wms\\locationhelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\wms\\locationhelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|d:\\\u6C49\u548C\u667A\u80FD\\git-mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\models\\outorderdetail.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\models\\outorderdetail.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|d:\\\u6C49\u548C\u667A\u80FD\\git-mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\models\\tn_material.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\models\\tn_material.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|d:\\\u6C49\u548C\u667A\u80FD\\git-mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\api\\moboxcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\api\\moboxcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\util\\httphelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|solutionrelative:hh.wcs.mobox3.hangyang\\util\\httphelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, { "AbsoluteMoniker": "D:0:0:{0D76040B-45FB-EB89-2535-E32E957D1429}|HH.WCS.Mobox3.HangYang\\HH.WCS.HangYang.csproj|D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\hh.wcs.mobox3.hangyang\\models\\inorder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", @@ -42,7 +66,7 @@ "DocumentGroups": [ { "DockedWidth": 200, - "SelectedChildIndex": 4, + "SelectedChildIndex": 7, "Children": [ { "$type": "Bookmark", @@ -60,64 +84,157 @@ "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\core\\WCSCore.cs", "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\core\\WCSCore.cs", "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\core\\WCSCore.cs", - "ViewState": "AgIAAAQAAAAAAAAAAAAswA0AAAAOAAAAAAAAAA==", + "ViewState": "AgIAAG4AAAAAAAAAAAAAAHkAAAAsAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-05-20T02:48:52.339Z", + "WhenOpened": "2025-05-27T10:24:13.523Z", "EditorCaption": "" }, { "$type": "Document", "DocumentIndex": 1, + "Title": "TaskProcess.cs", + "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\process\\TaskProcess.cs", + "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\process\\TaskProcess.cs", + "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\process\\TaskProcess.cs", + "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\process\\TaskProcess.cs", + "ViewState": "AgIAAFIFAAAAAAAAAADwv1sFAAAvAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-05-19T00:42:44.641Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 4, "Title": "AgvController.cs", "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\api\\AgvController.cs", "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\api\\AgvController.cs", "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\api\\AgvController.cs", "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\api\\AgvController.cs", - "ViewState": "AgIAABgAAAAAAAAAAAAAACUAAABJAAAAAAAAAA==", + "ViewState": "AgIAAAsAAAAAAAAAAAAqwBoAAAAiAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2025-05-20T02:48:30.565Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 0, - "Title": "HttpHelper.cs", - "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\util\\HttpHelper.cs", - "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\util\\HttpHelper.cs", - "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\util\\HttpHelper.cs", - "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\util\\HttpHelper.cs", - "ViewState": "AgIAAA4AAAAAAAAAAADwvxIAAAAAAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-05-19T08:17:19.57Z", - "EditorCaption": "" - }, - { - "$type": "Document", "DocumentIndex": 3, - "Title": "WMSHelper.cs", - "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\wms\\WMSHelper.cs", - "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\wms\\WMSHelper.cs", - "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\wms\\WMSHelper.cs", - "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\wms\\WMSHelper.cs", - "ViewState": "AgIAAN4EAAAAAAAAAAAuwE4FAAApAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-05-19T08:08:45.432Z" - }, - { - "$type": "Document", - "DocumentIndex": 6, "Title": "Program.cs", "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\Program.cs", "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\Program.cs", "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\Program.cs", "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\Program.cs", - "ViewState": "AgIAAFAAAAAAAAAAAAAuwF0AAAAxAAAAAAAAAA==", + "ViewState": "AgIAAFcAAAAAAAAAAAAqwF0AAAApAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-05-19T06:01:09.462Z" + "WhenOpened": "2025-05-19T06:01:09.462Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "WmsController.cs", + "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\api\\WmsController.cs", + "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\api\\WmsController.cs", + "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\api\\WmsController.cs", + "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\api\\WmsController.cs", + "ViewState": "AgIAADsAAAAAAAAAAAAIwEMAAAAoAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-05-19T00:41:35.255Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "WMSHelper.cs", + "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\wms\\WMSHelper.cs", + "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\wms\\WMSHelper.cs", + "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\wms\\WMSHelper.cs", + "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\wms\\WMSHelper.cs", + "ViewState": "AgIAAMICAAAAAAAAAAAAAOgCAAAfAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-05-27T09:53:43.906Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 6, + "Title": "WCSHelper.cs", + "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\wms\\WCSHelper.cs", + "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\wms\\WCSHelper.cs", + "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\wms\\WCSHelper.cs", + "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\wms\\WCSHelper.cs", + "ViewState": "AgIAAK8AAAAAAAAAAAAuwLcAAAAdAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-05-28T06:26:13.784Z", + "EditorCaption": "" }, { "$type": "Document", "DocumentIndex": 7, + "Title": "ContainerHelper.cs", + "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\wms\\ContainerHelper.cs", + "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\wms\\ContainerHelper.cs", + "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\wms\\ContainerHelper.cs", + "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\wms\\ContainerHelper.cs", + "ViewState": "AgIAADICAAAAAAAAAADwvzgCAAArAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-05-28T06:39:16.056Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 8, + "Title": "LocationHelper.cs", + "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\wms\\LocationHelper.cs", + "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\wms\\LocationHelper.cs", + "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\wms\\LocationHelper.cs", + "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\wms\\LocationHelper.cs", + "ViewState": "AgIAAN0BAAAAAAAAAAAuwPgBAACJAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-05-28T02:42:16.796Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 9, + "Title": "OutOrderDetail.cs", + "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\models\\OutOrderDetail.cs", + "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\models\\OutOrderDetail.cs", + "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\models\\OutOrderDetail.cs", + "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\models\\OutOrderDetail.cs", + "ViewState": "AgIAACYAAAAAAAAAAAAYwDQAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-05-27T06:51:12.163Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 10, + "Title": "TN_Material.cs", + "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\models\\TN_Material.cs", + "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\models\\TN_Material.cs", + "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\models\\TN_Material.cs", + "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\models\\TN_Material.cs", + "ViewState": "AgIAABQAAAAAAAAAAAA8wBkAAAALAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-05-27T06:50:41.626Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 11, + "Title": "MoboxController.cs", + "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\api\\MoboxController.cs", + "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\api\\MoboxController.cs", + "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\api\\MoboxController.cs", + "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\api\\MoboxController.cs", + "ViewState": "AgIAAH8AAAAAAAAAAAAuwI8AAAAPAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-05-26T03:21:14.486Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 13, "Title": "InOrder.cs", "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\models\\InOrder.cs", "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\models\\InOrder.cs", @@ -129,27 +246,15 @@ }, { "$type": "Document", - "DocumentIndex": 4, - "Title": "TaskProcess.cs", - "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\process\\TaskProcess.cs", - "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\process\\TaskProcess.cs", - "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\process\\TaskProcess.cs", - "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\process\\TaskProcess.cs", - "ViewState": "AgIAAFsAAAAAAAAAAAAqwGcAAAARAAAAAAAAAA==", + "DocumentIndex": 12, + "Title": "HttpHelper.cs", + "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\util\\HttpHelper.cs", + "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\util\\HttpHelper.cs", + "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\util\\HttpHelper.cs", + "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\util\\HttpHelper.cs", + "ViewState": "AgIAAJAAAAAAAAAAAAAuwLcAAAAZAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-05-19T00:42:44.641Z" - }, - { - "$type": "Document", - "DocumentIndex": 5, - "Title": "WmsController.cs", - "DocumentMoniker": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\api\\WmsController.cs", - "RelativeDocumentMoniker": "HH.WCS.Mobox3.HangYang\\api\\WmsController.cs", - "ToolTip": "D:\\\u6C49\u548C\u667A\u80FD\\Git-Mobox3\\\u676D\u6C27\\HH.WCS.Mobox3.HangYang\\api\\WmsController.cs", - "RelativeToolTip": "HH.WCS.Mobox3.HangYang\\api\\WmsController.cs", - "ViewState": "AgIAAAUAAAAAAAAAAAAuwCsAAAAqAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-05-19T00:41:35.255Z" + "WhenOpened": "2025-05-19T08:17:19.57Z" } ] } diff --git a/HH.WCS.Mobox3.HangYang/config/config.json b/HH.WCS.Mobox3.HangYang/config/config.json index ca6dc48..fb5f142 100644 --- a/HH.WCS.Mobox3.HangYang/config/config.json +++ b/HH.WCS.Mobox3.HangYang/config/config.json @@ -3,13 +3,16 @@ "HASeverUrl": "http://172.16.10.41", "GZSeverUrl": "http://192.192.209.241", + "MoboxSeverUrl": "http://192.168.1.54:5103/api/wms/", + "AppKey": "OpenInfo", + "AppSecret": "OpenInfoSecret", - "SqlServer": "Data Source=192.168.1.144;Initial Catalog=hyMobox;User ID=sa;Password=Am123123", + "SqlServer": "Data Source=192.168.1.247;Initial Catalog=HY_OIMobox;User ID=sa;Password=Am123123", "ApiPort": 7801, - "FacCode": "HY", - "WHCode": "HYCK", + "FacCode": "HYCK", + "WHCode": "CK001", "ReservoirArea": [ @@ -23,7 +26,11 @@ }, { "areaName": "鍏ュ簱鎺ラ┏浣�, - "areaCode": "AGVJB" + "areaCode": "AGVRJB" + }, + { + "areaName": "鍑哄簱鎺ラ┏浣�, + "areaCode": "AGVCJB" }, { "areaName": "鎵樼洏绔嬪簱鍖�, @@ -36,6 +43,10 @@ { "areaName": "鏂欑鐮佺洏鍖�, "areaCode": "SSX" + }, + { + "areaName": "鎷i�缂撳瓨鍖�, + "areaCode": "JXHCQ" } ], "Relevancy": [ @@ -52,8 +63,23 @@ "OutLoc": "HTCKQ-03" } ], + "OutRelevancy": [ + { + "conLoc": "TPJXQ-1-01", + "sorLoc": [ "TPJXQ-1-02", "TPJXQ-1-03", "TPJXQ-1-04" ] + }, + { + "conLoc": "TPJXQ-2-01", + "sorLoc": [ "TPJXQ-2-02", "TPJXQ-2-03", "TPJXQ-2-04" ] + }, + { + "conLoc": "TPJXQ-3-01", + "sorLoc": [ "TPJXQ-3-02", "TPJXQ-3-03", "TPJXQ-3-04" ] + } + ], + "CompleteTask": { - "taskType": [ "鏂欑缂撳瓨浣嶅叆搴�, "鐮佺洏鍚堟墭鍏ュ簱", "鎵樼洏鍏ュ簱", "鏂欑鍏ュ簱", "浜烘満鎺ラ┏鍏ュ簱", "鏂欑鍑哄簱" ] + "taskType": [ "鏂欑缂撳瓨浣嶅叆搴�, "鐮佺洏鍚堟墭鍏ュ簱", "鎵樼洏鍏ュ簱", "鏂欑鍏ュ簱", "浜烘満鎺ラ┏鍏ュ簱", "鏂欑鍑哄簱", "閰嶇洏鍑哄簱" ] } } \ No newline at end of file diff --git a/HH.WCS.Mobox3.HangYang/core/WCSCore.cs b/HH.WCS.Mobox3.HangYang/core/WCSCore.cs index 8f4b425..fb28d63 100644 --- a/HH.WCS.Mobox3.HangYang/core/WCSCore.cs +++ b/HH.WCS.Mobox3.HangYang/core/WCSCore.cs @@ -48,10 +48,17 @@ if (taskList.taskType.Contains(TN_Task.S_TYPE)) { //瀹屾垚浣滀笟 - WMSHelper.UpdateWmsTask(TN_Task, 3); + WMSHelper.UpdateWmsTask(TN_Task, 2); + WMSHelper.UpdateDistributionCntrState(2, 3, TN_Task.S_CNTR_CODE); } - WMSHelper.AddChange(TN_Task); - WMSHelper.DeleteChange(TN_Task); + if (new List<string> { "鏂欑鍏ュ簱", "鎵樼洏鍏ュ簱" }.Contains(TN_Task.S_TYPE)) + { + ContainerHelper.UpdateCntrItem(TN_Task.S_CNTR_CODE); + } + //if (WMSHelper.DeleteChange(TN_Task)) + //{ + // WMSHelper.AddChange(TN_Task); + //} break; case 7: TaskProcess.OperateStatus(TN_Task, 7); @@ -94,7 +101,7 @@ { //鏌ヨ浠诲姟 //鑾峰彇鎵�湁绛夊緟鐨勪綔涓�- var list = WMSHelper.GetWmsTaskListByState("绛夊緟"); ; + var list = WMSHelper.GetWmsTaskListByState("绛夊緟"); if (list.Count > 0) { @@ -102,6 +109,17 @@ { //鐢熸垚鍏ュ簱浠诲姟 TaskProcess.CreateInTask(task); + }); + } + //鏌ヨ浠诲姟 + //鑾峰彇鎵�湁鎵ц鐨勪綔涓�+ var exelist = WMSHelper.GetWmsTaskListByState("鎵ц"); + if (exelist.Count > 0) + { + exelist.ForEach(task => + { + //鐢熸垚鍏ュ簱浠诲姟 + TaskProcess.exeCreateInTask(task); }); } } @@ -158,7 +176,7 @@ try { //鏌ヨ宸查厤鐩樼殑閰嶇洏鍗�- var list = WMSHelper.GetPickingListByState("閰嶈揣瀹屾垚"); + var list = WMSHelper.GetPickingListByState(1); if (list.Count > 0) { TaskProcess.GenerateFromPicking(list); diff --git a/HH.WCS.Mobox3.HangYang/models/CntrItemDetail.cs b/HH.WCS.Mobox3.HangYang/models/CntrItemDetail.cs index c4b1036..ec4bc27 100644 --- a/HH.WCS.Mobox3.HangYang/models/CntrItemDetail.cs +++ b/HH.WCS.Mobox3.HangYang/models/CntrItemDetail.cs @@ -38,6 +38,8 @@ /// 分配量,被其它 /// </summary> public float F_ALLOC_QTY { get; set; } + public DateTime T_INBOUND_TIME { get; set; } + public string C_ITEM_MERGE { get; set; } = "N"; /// <summary> diff --git a/HH.WCS.Mobox3.HangYang/models/OutOrder.cs b/HH.WCS.Mobox3.HangYang/models/OutOrder.cs index 8635fac..892a7a8 100644 --- a/HH.WCS.Mobox3.HangYang/models/OutOrder.cs +++ b/HH.WCS.Mobox3.HangYang/models/OutOrder.cs @@ -66,6 +66,11 @@ /// </summary> public string S_AREA_CODE { get; set; } + /// <summary> + /// 鏄惁娓呮礂锛堟槸:Y ? 鍚�N锛�+ /// </summary> + public string C_CLEAN { get; set; } + [SugarColumn(IsIgnore = true)] [Navigate(NavigateType.OneToMany, nameof(S_NO))] public List<OutOrderDetail> OutOrderDetail { get; set; } diff --git a/HH.WCS.Mobox3.HangYang/models/OutOrderDetail.cs b/HH.WCS.Mobox3.HangYang/models/OutOrderDetail.cs index 68a0408..6ef648b 100644 --- a/HH.WCS.Mobox3.HangYang/models/OutOrderDetail.cs +++ b/HH.WCS.Mobox3.HangYang/models/OutOrderDetail.cs @@ -51,5 +51,7 @@ /// </summary> public string S_ERP_WH_CODE { get; set; } + public string C_CLEAN { get; set; } + } } diff --git a/HH.WCS.Mobox3.HangYang/models/TN_Material.cs b/HH.WCS.Mobox3.HangYang/models/TN_Material.cs index fd6f280..b33c172 100644 --- a/HH.WCS.Mobox3.HangYang/models/TN_Material.cs +++ b/HH.WCS.Mobox3.HangYang/models/TN_Material.cs @@ -24,6 +24,7 @@ public DateTime? T_PBOM_UPDATE { get; set; } public string C_MULTI_ROUTE { get; set; } public string S_ROUTE_MAKE { get; set; } + public string C_CLEAN { get; set; } public string S_ROUTE_ASSEMBLY { get; set; } public string S_DMODE { get; set; } public string S_STATE_PRE { get; set; } diff --git a/HH.WCS.Mobox3.HangYang/process/TaskProcess.cs b/HH.WCS.Mobox3.HangYang/process/TaskProcess.cs index 294b195..b5b0ab4 100644 --- a/HH.WCS.Mobox3.HangYang/process/TaskProcess.cs +++ b/HH.WCS.Mobox3.HangYang/process/TaskProcess.cs @@ -15,9 +15,11 @@ using System.Linq; using System.Reflection; using System.Security.Cryptography; +using System.Text; using System.Threading.Tasks; using static HH.WCS.HangYang.api.OtherModel.Putaway_Order_In; using static HH.WCS.HangYang.LISTA.process.HttpModel; +using static HH.WCS.HangYang.util.Settings; using static HH.WCS.HangYang.wms.WMSHelper; using static System.Runtime.CompilerServices.RuntimeHelpers; @@ -45,7 +47,7 @@ { LogHelper.Info($"浠诲姟{mst.S_CODE} 璐т綅{mst.S_END_LOC}鍗歌揣瀹屾垚锛岀粓鐐圭粦瀹氬鍣▄mst.S_CNTR_CODE}"); - LocationHelper.BindingLoc(mst.S_END_LOC, mst.S_CNTR_CODE.Split(',').ToList(),mst.S_NOTE); + LocationHelper.BindingLoc(mst.S_END_LOC, mst.S_CNTR_CODE.Split(',').ToList(), mst.S_NOTE); } } @@ -84,7 +86,7 @@ internal static bool Intercept(WCSTask mst) { var result = false; - + return result; } @@ -521,7 +523,7 @@ /// <returns></returns> public static Result GetOutboundOrder(OutOrder model) { - Result result = new Result() { success = false, }; + Result result = new Result() { success = false }; try { if (model == null || !model.OutOrderDetail.Any()) @@ -530,6 +532,7 @@ return result; } + // 绗竴姝ワ細璁剧疆鐗╂枡灞炴�淇℃伅 foreach (var item in model.OutOrderDetail) { var itemType = WMSHelper.GetItemType(item.S_ITEM_CODE); @@ -539,31 +542,40 @@ return result; } item.S_EXT_ATTR1 = itemType.S_ITEM_TYPE; - item.S_ITEM_NAME = itemType.S_ITEM_NAME; + item.S_ITEM_NAME = itemType.S_ITEM_NAME; + item.C_CLEAN = itemType.C_CLEAN; } - var groupedInOrders = model.OutOrderDetail - .GroupBy(detail => detail.S_EXT_ATTR1) // 鎸夌墿鏂欏睘鎬у垎缁�- .Select((group, index) => new OutOrder - { - S_NO = $"{model.S_BS_NO}_{index + 1}", // 鎷兼帴鏉ユ簮鍗曞彿 - S_BS_NO = model.S_BS_NO, - S_OP_TYPE = model.S_OP_TYPE, - S_NOTE = model.S_NOTE, - S_BS_TYPE = "ERP", - S_FACTORY = "HY001", - S_WH_CODE = "CK001", - S_AREA_CODE = group.Key.Equals("鏂欑搴�) ? "LXLKQ" : "TPLKQ", - OutOrderDetail = group.Select(detail => - { - // 淇敼 group 涓殑 S_IO_NO 瀛楁涓�S_NO 鐨勫� - detail.S_OO_NO = $"{model.S_BS_NO}_{index + 1}"; - detail.S_BS_NO = model.S_BS_NO; - return detail; - }).ToList() // 鍒嗙粍鍚庣殑鏄庣粏 - }) - .ToList(); - var res = WMSHelper.CreateOrderOut(groupedInOrders); + // 绗簩姝ワ細鍏堟寜鐗╂枡灞炴�鍒嗙粍锛屽啀鎸夋槸鍚︽竻娲楀垎缁�+ var groupedOrders = model.OutOrderDetail + .GroupBy(detail => new + { + MaterialType = detail.S_EXT_ATTR1, + IsClean = detail.C_CLEAN + }) // 鎸夌墿鏂欏睘鎬у拰鏄惁娓呮礂鍙岄噸鍒嗙粍 + .Select((group, index) => new OutOrder + { + S_NO = $"{model.S_BS_NO}_{index + 1}", + S_BS_NO = model.S_BS_NO, + S_OP_TYPE = model.S_OP_TYPE, + S_OUT_TO = model.S_OUT_TO, + S_NOTE = model.S_NOTE, + S_BS_TYPE = "ERP", + S_FACTORY = "HY001", + S_WH_CODE = "CK001", + S_AREA_CODE = group.Key.MaterialType.Equals("鏂欑搴�) ? "LXLKQ" : "TPLKQ", + C_CLEAN = group.Key.IsClean, // 娣诲姞鏄惁娓呮礂鏍囪 + OutOrderDetail = group.Select(detail => + { + detail.S_OO_NO = $"{model.S_BS_NO}_{index + 1}"; + detail.S_BS_NO = model.S_BS_NO; + return detail; + }).ToList() + }) + .ToList(); + + // 绗笁姝ワ細璋冪敤鍒涘缓鍑哄簱鍗曟柟娉�+ var res = WMSHelper.CreateOrderOut(groupedOrders); if (res) { result.success = true; @@ -575,18 +587,337 @@ result.success = false; result.errMsg = ex.Message; var st = new System.Diagnostics.StackTrace(ex, true); - var frame = st.GetFrame(0); // 鑾峰彇绗竴涓爢鏍堝抚 + var frame = st.GetFrame(0); if (frame != null) { - LogHelper.Error($"GetInboundOrder鍏ュ簱鍗曟柊澧炲嚭鐜伴敊璇紒锛�, ex); + LogHelper.Error($"GetOutboundOrder鍑哄簱鍗曟柊澧炲嚭鐜伴敊璇紒", ex); LogHelper.Error($"鏂囦欢鍚� {frame.GetFileName()}", ex); LogHelper.Error($"琛屽彿: {frame.GetFileLineNumber()}", ex); LogHelper.Error($"鍒楀彿: {frame.GetFileColumnNumber()}", ex); } return result; } - } + + ///// <summary> + ///// 鑾峰彇浣滀笟鍒涘缓鍏ュ簱浠诲姟 + ///// </summary> + ///// <param name="mst"></param> + ///// <returns></returns> + //internal static bool CreateInTask(WMSTask mst) + //{ + // try + // { + // var result = false; + // var taskState = mst.S_B_STATE.Trim(); + // if (taskState == "绛夊緟") + // { + // if (!string.IsNullOrEmpty(mst.S_START_LOC)) + // { + // //鏉哀鎵�湁搴撳尯 + // var reservoirs = Settings.ReservoirAreas.ToList(); + // if (!reservoirs.Any() || reservoirs == null) + // { + // LogHelper.Info("Settings鍑虹幇閿欒鏈煡璇㈠埌鏉哀鐨勫簱鍖猴紒", "鏉哀"); + // return false; + // } + // if (mst.S_TYPE == "鎵樼洏杞繍") + // { + // var lxAnyLoc = LocationHelper.GetLocAreaList(reservoirs.Where(s => s.areaName == "鏂欑鍏ュ簱缂撳瓨浣�).FirstOrDefault().areaCode); + // if (lxAnyLoc.Any()) + // { + // var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, lxAnyLoc.FirstOrDefault().S_CODE, "鏂欑缂撳瓨浣嶅叆搴�, mst.S_CNTR_CODE, mst.S_CODE); + // if (!res) + // { + // LogHelper.Info("鏂欑缂撳瓨浣嶅叆搴撲换鍔″垱寤哄け璐ワ紒", "鏉哀"); + // return false; + // } + // WMSHelper.UpdateStatus(mst, 1); + // } + // else + // { + // var rkAnyLoc = LocationHelper.GetLocAreaList(reservoirs.Where(s => s.areaName == "鍏ュ簱缂撳瓨鍖�).FirstOrDefault().areaCode); + // if (rkAnyLoc.Any()) + // { + // var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, rkAnyLoc.FirstOrDefault().S_CODE, "鏂欑鐮佺洏缂撳瓨鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); + // if (!res) + // { + // LogHelper.Info("鐮佺洏缂撳瓨鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); + // return false; + // } + // WMSHelper.UpdateStatus(mst, 1); + // //鏍囪涓哄悎鎵�+ // ContainerHelper.UpdateCntrAbouts(mst.S_CNTR_CODE, "鏂欑鍚堟墭"); + // } + // else + // { + // LogHelper.Info("鍏ュ簱缂撳瓨鍖烘病鏈夌┖璐т綅锛�, "鏉哀"); + // return false; + // } + // } + // } + // if (mst.S_TYPE == "鎵樼洏鍏ュ簱") + // { + // //1.鏌ヨ涓嬩笅搴撻噷闈㈡槸鍚︽湁瑕佸悎鎵樼殑鎵樼洏 + // var locMerge = WMSHelper.GetLocMerge(mst.S_CNTR_CODE); + // if (locMerge != null) + // { + // //锛�.1锛夊鏋滄湁瑕佸悎鎵樼殑鎵樼洏灏卞幓鍒ゆ柇涓�笅鍚堟墭宸ヤ綅鏄惁涓虹┖ + // var anyLoc = LocationHelper.GetLocAreaList(reservoirs.Where(s => s.areaName == "鍚堟墭鍖�).FirstOrDefault().areaCode); + // if (anyLoc.Any()) + // { + + // foreach (var item in anyLoc) + // { + // //鐢熸垚涓�潯鍑哄簱鐨勪换鍔�+ // var relevancys = Settings.Relevancys.Where(s => s.InLoc == item.S_CODE).FirstOrDefault(); + // if (relevancys == null) + // { + // LogHelper.Info($"Settings鏈煡璇㈠埌鍚堟墭鍏ュ簱浣峽item.S_CODE}瀵瑰簲鐨勫嚭搴撲綅锛�, "鏉哀"); + // continue; + // } + // //鐢熸垚鍒板悎鎵樺尯鐨勪换鍔�+ // var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, item.S_CODE, "鐮佺洏鍚堟墭鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); + // if (!res) + // { + // LogHelper.Info("鐮佺洏鍚堟墭鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); + // return false; + // } + // res = TaskProcess.HYCreateTransport(locMerge.S_LOC_CODE, relevancys.OutLoc, "鐮佺洏鍚堟墭鍑哄簱", locMerge.S_CNTR_CODE, mst.S_CODE); + // if (!res) + // { + // LogHelper.Info("鐮佺洏鍚堟墭鍑哄簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); + // return false; + // } + // //锛�.2锛夊鏋滃悎鎵樺伐浣嶄负绌哄氨鐩存帴鍚堟墭鍒板悎鎵樺伐浣嶉噷闈紝鍚屾椂鐢熸垚涓�釜鍑哄簱浠诲姟鎶婅鍚堟墭鐨勬墭鐩樺嚭鍑烘潵锛堟爣璁颁负瑕佸悎鎵橈級 + // ContainerHelper.UpdateCntrAbouts(mst.S_CNTR_CODE, "鍚堟墭"); + // WMSHelper.UpdateStatus(mst, 1); + // break; + // } + + + // } + // else + // { + // //锛�.3锛夊鏋滃悎鎵樺伐浣嶄笉涓虹┖灏卞幓鍏ュ簱缂撳瓨鍖猴紙鏍囪涓鸿鍚堟墭锛�+ // //鐢熸垚鍒板叆搴撶紦瀛樺尯鐨勪换鍔�+ // var rkAnyLoc = LocationHelper.GetLocAreaList(reservoirs.Where(s => s.areaName == "鍏ュ簱缂撳瓨鍖�).FirstOrDefault().areaCode); + // if (rkAnyLoc.Any()) + // { + // var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, rkAnyLoc.FirstOrDefault().S_CODE, "鐮佺洏缂撳瓨鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); + // if (!res) + // { + // LogHelper.Info("鐮佺洏缂撳瓨鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); + // return false; + // } + // WMSHelper.UpdateStatus(mst, 1); + // //鏍囪涓哄悎鎵�+ // ContainerHelper.UpdateCntrAbouts(mst.S_CNTR_CODE, "鍚堟墭"); + // } + // else + // { + // LogHelper.Info("鍏ュ簱缂撳瓨鍖烘病鏈夌┖璐т綅锛�, "鏉哀"); + // return false; + // } + // } + + // } + // else + // { + // //2.濡傛灉娌℃湁瑕佸悎鎵樼殑鎵樼洏 + // var area = reservoirs.Where(s => s.areaName == "鍏ュ簱鎺ラ┏浣�).FirstOrDefault(); + // if (area == null) + // { + // LogHelper.Info("Settings鍑虹幇閿欒鏈煡璇㈠埌鍏ュ簱鎺ラ┏浣嶏紒", "鏉哀"); + // return false; + // } + // //(2.1)鍏堟煡璇㈠叆搴撴帴椹充綅鏄惁涓虹┖锛屽鏋滀负绌虹洿鎺ョ敓鎴愬埌鍏ュ簱鐨勪换鍔�+ // var anyLoc = LocationHelper.GetLocAreaList(area.areaCode); + // if (anyLoc.Any()) + // { + // //鐢熸垚鍒版帴椹充綅鐨勪换鍔�+ // var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, anyLoc.FirstOrDefault().S_CODE, "鐮佺洏鎺ラ┏鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); + // if (!res) + // { + // LogHelper.Info("鐮佺洏鎺ラ┏鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); + // return false; + // } + // WMSHelper.UpdateStatus(mst, 1); + // } + // else + // { + // //(2.2)濡傛灉鍏ュ簱鎺ラ┏浣嶄笉涓虹┖锛屽垯鐢熸垚鍒板叆搴撶紦瀛樺尯鐨勪换鍔★紙鏍囪涓轰笉鍚堟墭锛�+ // //鐢熸垚鍒板叆搴撶紦瀛樺尯鐨勪换鍔�+ // var rkAnyLoc = LocationHelper.GetLocAreaList(reservoirs.Where(s => s.areaName == "鍏ュ簱缂撳瓨鍖�).FirstOrDefault().areaCode); + // if (rkAnyLoc.Any()) + // { + // var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, rkAnyLoc.FirstOrDefault().S_CODE, "鐮佺洏缂撳瓨鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); + // if (!res) + // { + // LogHelper.Info("鐮佺洏缂撳瓨鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); + // return false; + // } + // WMSHelper.UpdateStatus(mst, 1); + // //鏍囪涓轰笉鍚堟墭 + // ContainerHelper.UpdateCntrAbouts(mst.S_CNTR_CODE, "涓嶅悎鎵�); + // } + // else + // { + // LogHelper.Info("鍏ュ簱缂撳瓨鍖烘病鏈夌┖璐т綅锛�, "鏉哀"); + // return false; + // } + + // } + + // } + // } + // if (mst.S_TYPE == "鍚堟墭鍥炲簱") + // { + // var trayLst = ContainerHelper.GetCntrItemRel(mst.S_CNTR_CODE); + // if (trayLst.Any()) + // { + // //婊℃墭鍥炲簱 + // var area = reservoirs.Where(s => s.areaName == "鍏ュ簱鎺ラ┏浣�).FirstOrDefault(); + // if (area == null) + // { + // LogHelper.Info("Settings鍑虹幇閿欒鏈煡璇㈠埌鍏ュ簱鎺ラ┏浣嶏紒", "鏉哀"); + // return false; + // } + // //(2.1)鍏堟煡璇㈠叆搴撴帴椹充綅鏄惁涓虹┖锛屽鏋滀负绌虹洿鎺ョ敓鎴愬埌鍏ュ簱鐨勪换鍔�+ // var anyLoc = LocationHelper.GetLocAreaList(area.areaCode); + // if (anyLoc.Any()) + // { + // //鐢熸垚鍒版帴椹充綅鐨勪换鍔�+ // var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, anyLoc.FirstOrDefault().S_CODE, "鐮佺洏鎺ラ┏鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); + // if (!res) + // { + // LogHelper.Info("鐮佺洏鎺ラ┏鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); + // return false; + // } + // WMSHelper.UpdateStatus(mst, 1); + // } + // else + // { + // //(2.2)濡傛灉鍏ュ簱鎺ラ┏浣嶄笉涓虹┖锛屽垯鐢熸垚鍒板叆搴撶紦瀛樺尯鐨勪换鍔★紙鏍囪涓轰笉鍚堟墭锛�+ // //鐢熸垚鍒板叆搴撶紦瀛樺尯鐨勪换鍔�+ // var rkAnyLoc = LocationHelper.GetLocAreaList(reservoirs.Where(s => s.areaName == "鍏ュ簱缂撳瓨鍖�).FirstOrDefault().areaCode); + // if (rkAnyLoc.Any()) + // { + // var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, rkAnyLoc.FirstOrDefault().S_CODE, "鐮佺洏缂撳瓨鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); + // if (!res) + // { + // LogHelper.Info("鐮佺洏缂撳瓨鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); + // return false; + // } + // WMSHelper.UpdateStatus(mst, 1); + // //鏍囪涓轰笉鍚堟墭 + // ContainerHelper.UpdateCntrAbouts(mst.S_CNTR_CODE, "涓嶅悎鎵�); + // } + // else + // { + // LogHelper.Info("鍏ュ簱缂撳瓨鍖烘病鏈夌┖璐т綅锛�, "鏉哀"); + // return false; + // } + + // } + // } + // else + // { + // //绌烘墭鍥炲簱 + // var area = reservoirs.Where(s => s.areaName == "浜烘満鎺ラ┏浣�绌烘墭浣�).FirstOrDefault(); + // if (area == null) + // { + // LogHelper.Info("Settings鍑虹幇閿欒鏈煡璇㈠埌鍏ュ簱鎺ラ┏浣嶏紒", "鏉哀"); + // return false; + // } + // //(2.1)鍏堟煡璇汉鏈烘帴椹充綅-绌烘墭浣嶆槸鍚︿负绌猴紝濡傛灉涓虹┖鐩存帴鐢熸垚鍒板叆搴撶殑浠诲姟 + // var anyLoc = LocationHelper.GetLocAreaList(area.areaCode); + // if (anyLoc.Any()) + // { + // //鐢熸垚鍒版帴椹充綅鐨勪换鍔�+ // var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, anyLoc.FirstOrDefault().S_CODE, "浜烘満鎺ラ┏鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); + // if (!res) + // { + // LogHelper.Info("鐮佺洏鎺ラ┏鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); + // return false; + // } + // WMSHelper.UpdateStatus(mst, 1); + // } + // else + // { + // //鐢熸垚鍒板叆搴撶紦瀛樺尯鐨勪换鍔�+ // var rkAnyLoc = LocationHelper.GetLocAreaList(reservoirs.Where(s => s.areaName == "鍏ュ簱缂撳瓨鍖�).FirstOrDefault().areaCode); + // if (rkAnyLoc.Any()) + // { + // var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, rkAnyLoc.FirstOrDefault().S_CODE, "鐮佺洏缂撳瓨鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); + // if (!res) + // { + // LogHelper.Info("鐮佺洏缂撳瓨鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); + // return false; + // } + // //鏍囪涓轰笉鍚堟墭 + // ContainerHelper.UpdateCntrAbouts(mst.S_CNTR_CODE, "涓嶅悎鎵�); + // WMSHelper.UpdateStatus(mst, 1); + + // } + // else + // { + // LogHelper.Info("鍏ュ簱缂撳瓨鍖烘病鏈夌┖璐т綅锛�, "鏉哀"); + // return false; + // } + // } + // } + // } + // if (mst.S_TYPE == "鏂欑鍑哄簱") + // { + + // //婊℃墭鍥炲簱 + // var area = reservoirs.Where(s => s.areaName == "鏂欑鐮佺洏鍖�).FirstOrDefault(); + // if (area == null) + // { + // LogHelper.Info("Settings鍑虹幇閿欒鏈煡璇㈠埌鏂欑鐮佺洏鍖猴紒", "鏉哀"); + // return false; + // } + // //(2.1)鍏堟煡璇㈠叆搴撴帴椹充綅鏄惁涓虹┖锛屽鏋滀负绌虹洿鎺ョ敓鎴愬埌鍏ュ簱鐨勪换鍔�+ // var anyLoc = LocationHelper.GetLocAreaList(area.areaCode); + // if (anyLoc.Any()) + // { + // //鐢熸垚鍒版帴椹充綅鐨勪换鍔�+ // var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, anyLoc.FirstOrDefault().S_CODE, "鏂欑鍑哄簱", mst.S_CNTR_CODE, mst.S_CODE); + // if (!res) + // { + // LogHelper.Info("鏂欑鍑哄簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); + // return false; + // } + // WMSHelper.UpdateStatus(mst, 1); + // } + // else + // { + // LogHelper.Info("鏂欑鐮佺洏鍖烘湭鏈夊彲鐢ㄨ揣浣嶏紒", "鏉哀"); + // } + // } + // } + // } + // else { result = true; } + // return result; + // } + // catch (Exception ex) + // { + // var st = new System.Diagnostics.StackTrace(ex, true); + // var frame = st.GetFrame(0); // 鑾峰彇绗竴涓爢鏍堝抚 + // if (frame != null) + // { + // LogHelper.Error($"CreateInTask鑾峰彇浣滀笟鍒涘缓鍏ュ簱浠诲姟鍑虹幇閿欒锛侊紒", ex); + // LogHelper.Error($"鏂囦欢鍚� {frame.GetFileName()}", ex); + // LogHelper.Error($"琛屽彿: {frame.GetFileLineNumber()}", ex); + // LogHelper.Error($"鍒楀彿: {frame.GetFileColumnNumber()}", ex); + // } + // return false; + // } + + //} + + #region 绛夊緟浣滀笟 /// <summary> /// 鑾峰彇浣滀笟鍒涘缓鍏ュ簱浠诲姟 @@ -597,310 +928,488 @@ { try { - var result = false; - var taskState = mst.S_B_STATE.Trim(); - if (taskState == "绛夊緟") + if (mst.S_B_STATE.Trim() != "绛夊緟") return true; + if (string.IsNullOrEmpty(mst.S_START_LOC)) return false; + + var reservoirs = Settings.ReservoirAreas?.ToList(); + if (reservoirs == null || !reservoirs.Any()) { - if (!string.IsNullOrEmpty(mst.S_START_LOC)) - { - //鏉哀鎵�湁搴撳尯 - var reservoirs = Settings.ReservoirAreas.ToList(); - if (!reservoirs.Any() || reservoirs == null) - { - LogHelper.Info("Settings鍑虹幇閿欒鏈煡璇㈠埌鏉哀鐨勫簱鍖猴紒", "鏉哀"); - return false; - } - if (mst.S_TYPE == "鎵樼洏杞繍") - { - var lxAnyLoc = LocationHelper.GetLocAreaList(reservoirs.Where(s => s.areaName == "鏂欑鍏ュ簱缂撳瓨浣�).FirstOrDefault().areaCode); - if (lxAnyLoc.Any()) - { - - var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, lxAnyLoc.FirstOrDefault().S_CODE, "鏂欑缂撳瓨浣嶅叆搴�, mst.S_CNTR_CODE, mst.S_CODE); - if (!res) - { - LogHelper.Info("鏂欑缂撳瓨浣嶅叆搴撲换鍔″垱寤哄け璐ワ紒", "鏉哀"); - return false; - } - WMSHelper.UpdateStatus(mst, 1); - } - else - { - var rkAnyLoc = LocationHelper.GetLocAreaList(reservoirs.Where(s => s.areaName == "鍏ュ簱缂撳瓨鍖�).FirstOrDefault().areaCode); - if (rkAnyLoc.Any()) - { - var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, rkAnyLoc.FirstOrDefault().S_CODE, "鏂欑鐮佺洏缂撳瓨鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); - if (!res) - { - LogHelper.Info("鐮佺洏缂撳瓨鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); - return false; - } - WMSHelper.UpdateStatus(mst, 1); - //鏍囪涓哄悎鎵�- ContainerHelper.UpdateCntrAbouts(mst.S_CNTR_CODE, "鏂欑鍚堟墭"); - } - else - { - LogHelper.Info("鍏ュ簱缂撳瓨鍖烘病鏈夌┖璐т綅锛�, "鏉哀"); - return false; - } - } - } - if (mst.S_TYPE == "鎵樼洏鍏ュ簱") - { - //1.鏌ヨ涓嬩笅搴撻噷闈㈡槸鍚︽湁瑕佸悎鎵樼殑鎵樼洏 - var locMerge = WMSHelper.GetLocMerge(mst.S_CNTR_CODE); - if (locMerge != null) - { - //锛�.1锛夊鏋滄湁瑕佸悎鎵樼殑鎵樼洏灏卞幓鍒ゆ柇涓�笅鍚堟墭宸ヤ綅鏄惁涓虹┖ - var anyLoc = LocationHelper.GetLocAreaList(reservoirs.Where(s => s.areaName == "鍚堟墭鍖�).FirstOrDefault().areaCode); - if (anyLoc.Any()) - { - - //鐢熸垚涓�潯鍑哄簱鐨勪换鍔�- var relevancys = Settings.Relevancys.Where(s => s.InLoc == anyLoc.FirstOrDefault().S_CODE).FirstOrDefault(); - if (relevancys == null) - { - LogHelper.Info("Settings鍑虹幇閿欒鏈煡璇㈠埌鍚堟墭鍏ュ簱浣嶅搴旂殑鍑哄簱浣嶏紒", "鏉哀"); - return false; - } - //鐢熸垚鍒板悎鎵樺尯鐨勪换鍔�- var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, anyLoc.FirstOrDefault().S_CODE, "鐮佺洏鍚堟墭鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); - if (!res) - { - LogHelper.Info("鐮佺洏鍚堟墭鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); - return false; - } - res = TaskProcess.HYCreateTransport(locMerge.S_LOC_CODE, relevancys.OutLoc, "鐮佺洏鍚堟墭鍑哄簱", locMerge.S_CNTR_CODE, mst.S_CODE); - if (!res) - { - LogHelper.Info("鐮佺洏鍚堟墭鍑哄簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); - return false; - } - //锛�.2锛夊鏋滃悎鎵樺伐浣嶄负绌哄氨鐩存帴鍚堟墭鍒板悎鎵樺伐浣嶉噷闈紝鍚屾椂鐢熸垚涓�釜鍑哄簱浠诲姟鎶婅鍚堟墭鐨勬墭鐩樺嚭鍑烘潵锛堟爣璁颁负瑕佸悎鎵橈級 - ContainerHelper.UpdateCntrAbouts(mst.S_CNTR_CODE, "鍚堟墭"); - - WMSHelper.UpdateStatus(mst, 1); - } - else - { - //锛�.3锛夊鏋滃悎鎵樺伐浣嶄笉涓虹┖灏卞幓鍏ュ簱缂撳瓨鍖猴紙鏍囪涓鸿鍚堟墭锛�- //鐢熸垚鍒板叆搴撶紦瀛樺尯鐨勪换鍔�- var rkAnyLoc = LocationHelper.GetLocAreaList(reservoirs.Where(s => s.areaName == "鍏ュ簱缂撳瓨鍖�).FirstOrDefault().areaCode); - if (rkAnyLoc.Any()) - { - var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, rkAnyLoc.FirstOrDefault().S_CODE, "鐮佺洏缂撳瓨鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); - if (!res) - { - LogHelper.Info("鐮佺洏缂撳瓨鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); - return false; - } - WMSHelper.UpdateStatus(mst, 1); - //鏍囪涓哄悎鎵�- ContainerHelper.UpdateCntrAbouts(mst.S_CNTR_CODE, "鍚堟墭"); - } - else - { - LogHelper.Info("鍏ュ簱缂撳瓨鍖烘病鏈夌┖璐т綅锛�, "鏉哀"); - return false; - } - } - - } - else - { - //2.濡傛灉娌℃湁瑕佸悎鎵樼殑鎵樼洏 - var area = reservoirs.Where(s => s.areaName == "鍏ュ簱鎺ラ┏浣�).FirstOrDefault(); - if (area == null) - { - LogHelper.Info("Settings鍑虹幇閿欒鏈煡璇㈠埌鍏ュ簱鎺ラ┏浣嶏紒", "鏉哀"); - return false; - } - //(2.1)鍏堟煡璇㈠叆搴撴帴椹充綅鏄惁涓虹┖锛屽鏋滀负绌虹洿鎺ョ敓鎴愬埌鍏ュ簱鐨勪换鍔�- var anyLoc = LocationHelper.GetLocAreaList(area.areaCode); - if (anyLoc.Any()) - { - //鐢熸垚鍒版帴椹充綅鐨勪换鍔�- var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, anyLoc.FirstOrDefault().S_CODE, "鐮佺洏鎺ラ┏鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); - if (!res) - { - LogHelper.Info("鐮佺洏鎺ラ┏鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); - return false; - } - WMSHelper.UpdateStatus(mst, 1); - } - else - { - //(2.2)濡傛灉鍏ュ簱鎺ラ┏浣嶄笉涓虹┖锛屽垯鐢熸垚鍒板叆搴撶紦瀛樺尯鐨勪换鍔★紙鏍囪涓轰笉鍚堟墭锛�- //鐢熸垚鍒板叆搴撶紦瀛樺尯鐨勪换鍔�- var rkAnyLoc = LocationHelper.GetLocAreaList(reservoirs.Where(s => s.areaName == "鍏ュ簱缂撳瓨鍖�).FirstOrDefault().areaCode); - if (rkAnyLoc.Any()) - { - var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, rkAnyLoc.FirstOrDefault().S_CODE, "鐮佺洏缂撳瓨鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); - if (!res) - { - LogHelper.Info("鐮佺洏缂撳瓨鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); - return false; - } - WMSHelper.UpdateStatus(mst, 1); - //鏍囪涓轰笉鍚堟墭 - ContainerHelper.UpdateCntrAbouts(mst.S_CNTR_CODE, "涓嶅悎鎵�); - } - else - { - LogHelper.Info("鍏ュ簱缂撳瓨鍖烘病鏈夌┖璐т綅锛�, "鏉哀"); - return false; - } - - } - - } - } - if (mst.S_TYPE == "鍚堟墭鍥炲簱") - { - var trayLst = ContainerHelper.GetCntrItemRel(mst.S_CNTR_CODE); - if (trayLst.Any()) - { - //婊℃墭鍥炲簱 - var area = reservoirs.Where(s => s.areaName == "鍏ュ簱鎺ラ┏浣�).FirstOrDefault(); - if (area == null) - { - LogHelper.Info("Settings鍑虹幇閿欒鏈煡璇㈠埌鍏ュ簱鎺ラ┏浣嶏紒", "鏉哀"); - return false; - } - //(2.1)鍏堟煡璇㈠叆搴撴帴椹充綅鏄惁涓虹┖锛屽鏋滀负绌虹洿鎺ョ敓鎴愬埌鍏ュ簱鐨勪换鍔�- var anyLoc = LocationHelper.GetLocAreaList(area.areaCode); - if (anyLoc.Any()) - { - //鐢熸垚鍒版帴椹充綅鐨勪换鍔�- var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, anyLoc.FirstOrDefault().S_CODE, "鐮佺洏鎺ラ┏鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); - if (!res) - { - LogHelper.Info("鐮佺洏鎺ラ┏鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); - return false; - } - WMSHelper.UpdateStatus(mst, 1); - } - else - { - //(2.2)濡傛灉鍏ュ簱鎺ラ┏浣嶄笉涓虹┖锛屽垯鐢熸垚鍒板叆搴撶紦瀛樺尯鐨勪换鍔★紙鏍囪涓轰笉鍚堟墭锛�- //鐢熸垚鍒板叆搴撶紦瀛樺尯鐨勪换鍔�- var rkAnyLoc = LocationHelper.GetLocAreaList(reservoirs.Where(s => s.areaName == "鍏ュ簱缂撳瓨鍖�).FirstOrDefault().areaCode); - if (rkAnyLoc.Any()) - { - var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, rkAnyLoc.FirstOrDefault().S_CODE, "鐮佺洏缂撳瓨鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); - if (!res) - { - LogHelper.Info("鐮佺洏缂撳瓨鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); - return false; - } - WMSHelper.UpdateStatus(mst, 1); - //鏍囪涓轰笉鍚堟墭 - ContainerHelper.UpdateCntrAbouts(mst.S_CNTR_CODE, "涓嶅悎鎵�); - } - else - { - LogHelper.Info("鍏ュ簱缂撳瓨鍖烘病鏈夌┖璐т綅锛�, "鏉哀"); - return false; - } - - } - } - else - { - //绌烘墭鍥炲簱 - var area = reservoirs.Where(s => s.areaName == "浜烘満鎺ラ┏浣�绌烘墭浣�).FirstOrDefault(); - if (area == null) - { - LogHelper.Info("Settings鍑虹幇閿欒鏈煡璇㈠埌鍏ュ簱鎺ラ┏浣嶏紒", "鏉哀"); - return false; - } - //(2.1)鍏堟煡璇汉鏈烘帴椹充綅-绌烘墭浣嶆槸鍚︿负绌猴紝濡傛灉涓虹┖鐩存帴鐢熸垚鍒板叆搴撶殑浠诲姟 - var anyLoc = LocationHelper.GetLocAreaList(area.areaCode); - if (anyLoc.Any()) - { - //鐢熸垚鍒版帴椹充綅鐨勪换鍔�- var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, anyLoc.FirstOrDefault().S_CODE, "浜烘満鎺ラ┏鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); - if (!res) - { - LogHelper.Info("鐮佺洏鎺ラ┏鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); - return false; - } - WMSHelper.UpdateStatus(mst, 1); - } - else - { - //鐢熸垚鍒板叆搴撶紦瀛樺尯鐨勪换鍔�- var rkAnyLoc = LocationHelper.GetLocAreaList(reservoirs.Where(s => s.areaName == "鍏ュ簱缂撳瓨鍖�).FirstOrDefault().areaCode); - if (rkAnyLoc.Any()) - { - var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, rkAnyLoc.FirstOrDefault().S_CODE, "鐮佺洏缂撳瓨鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); - if (!res) - { - LogHelper.Info("鐮佺洏缂撳瓨鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); - return false; - } - //鏍囪涓轰笉鍚堟墭 - ContainerHelper.UpdateCntrAbouts(mst.S_CNTR_CODE, "涓嶅悎鎵�); - WMSHelper.UpdateStatus(mst, 1); - - } - else - { - LogHelper.Info("鍏ュ簱缂撳瓨鍖烘病鏈夌┖璐т綅锛�, "鏉哀"); - return false; - } - } - } - } - if (mst.S_TYPE == "鏂欑鍑哄簱") - { - - //婊℃墭鍥炲簱 - var area = reservoirs.Where(s => s.areaName == "鏂欑鐮佺洏鍖�).FirstOrDefault(); - if (area == null) - { - LogHelper.Info("Settings鍑虹幇閿欒鏈煡璇㈠埌鏂欑鐮佺洏鍖猴紒", "鏉哀"); - return false; - } - //(2.1)鍏堟煡璇㈠叆搴撴帴椹充綅鏄惁涓虹┖锛屽鏋滀负绌虹洿鎺ョ敓鎴愬埌鍏ュ簱鐨勪换鍔�- var anyLoc = LocationHelper.GetLocAreaList(area.areaCode); - if (anyLoc.Any()) - { - //鐢熸垚鍒版帴椹充綅鐨勪换鍔�- var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, anyLoc.FirstOrDefault().S_CODE, "鏂欑鍑哄簱", mst.S_CNTR_CODE, mst.S_CODE); - if (!res) - { - LogHelper.Info("鏂欑鍑哄簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); - return false; - } - WMSHelper.UpdateStatus(mst, 1); - } - else - { - LogHelper.Info("鏂欑鐮佺洏鍖烘湭鏈夊彲鐢ㄨ揣浣嶏紒", "鏉哀"); - } - } - } + LogHelper.Info("Settings鍑虹幇閿欒鏈煡璇㈠埌鏉哀鐨勫簱鍖猴紒", "鏉哀"); + return false; } - else { result = true; } - return result; + + switch (mst.S_TYPE) + { + case "鎵樼洏杞繍": + return HandlePalletTransport(mst, reservoirs); + case "鎵樼洏鍏ュ簱": + return HandlePalletStorage(mst, reservoirs); + case "鍚堟墭鍥炲簱": + return HandleMergeReturn(mst, reservoirs); + case "鍒嗘嫞鍥炲簱": + return HandleMergeReturn(mst, reservoirs); + case "鏂欑鍑哄簱": + return HandleBoxOutbound(mst, reservoirs); + case "鍙戣揣鏆傚瓨": + return PreShipmentStage(mst); + case "鍙戣揣娓呮礂": + return PreShipmentStage(mst); + case "鍙戣揣瑁呴厤": + return PreShipmentStage(mst); + default: + return true; + } } catch (Exception ex) { - var st = new System.Diagnostics.StackTrace(ex, true); - var frame = st.GetFrame(0); // 鑾峰彇绗竴涓爢鏍堝抚 - if (frame != null) + LogErrorDetails(ex); + return false; + } + } + + /// <summary> + /// 鎵樼洏杞繍 + /// </summary> + /// <param name="mst"></param> + /// <param name="reservoirs"></param> + /// <returns></returns> + private static bool HandlePalletTransport(WMSTask mst, List<ReservoirArea> reservoirs) + { + var res = true; + var lxArea = reservoirs.FirstOrDefault(s => s.areaName == "鏂欑鍏ュ簱缂撳瓨浣�); + if (lxArea != null) + { + var lxLocations = LocationHelper.GetLocAreaList(lxArea.areaCode); + if (lxLocations.Any()) { - LogHelper.Error($"CreateInTask鑾峰彇浣滀笟鍒涘缓鍏ュ簱浠诲姟鍑虹幇閿欒锛侊紒", ex); - LogHelper.Error($"鏂囦欢鍚� {frame.GetFileName()}", ex); - LogHelper.Error($"琛屽彿: {frame.GetFileLineNumber()}", ex); - LogHelper.Error($"鍒楀彿: {frame.GetFileColumnNumber()}", ex); + res = TaskProcess.HYCreateTransport(mst.S_START_LOC, lxLocations.FirstOrDefault().S_CODE, "鏂欑缂撳瓨浣嶅叆搴�, mst.S_CNTR_CODE, mst.S_CODE); + if (!res) + { + LogHelper.Info("鏂欑缂撳瓨浣嶅叆搴撲换鍔″垱寤哄け璐ワ紒", "鏉哀"); + return false; + } + WMSHelper.UpdateStatus(mst, 1); } + } + + var rkArea = reservoirs.FirstOrDefault(s => s.areaName == "鍏ュ簱缂撳瓨鍖�); + if (rkArea == null) return false; + + var rkLocations = LocationHelper.GetLocAreaList(rkArea.areaCode); + if (!rkLocations.Any()) + { + LogHelper.Info("鍏ュ簱缂撳瓨鍖烘病鏈夌┖璐т綅锛�, "鏉哀"); return false; } + res = TaskProcess.HYCreateTransport(mst.S_START_LOC, rkLocations.FirstOrDefault().S_CODE, "鏂欑鐮佺洏缂撳瓨鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); + if (!res) + { + LogHelper.Info("鐮佺洏缂撳瓨鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); + return false; + } + WMSHelper.UpdateStatus(mst, 1); + //鏍囪涓哄悎鎵�+ ContainerHelper.UpdateCntrAbouts(mst.S_CNTR_CODE, "鏂欑鍚堟墭"); + return true; } + + /// <summary> + /// 鎵樼洏鍏ュ簱 + /// </summary> + /// <param name="mst"></param> + /// <param name="reservoirs"></param> + /// <returns></returns> + private static bool HandlePalletStorage(WMSTask mst, List<ReservoirArea> reservoirs) + { + var result = true; + var locMerge = WMSHelper.GetLocMerge(mst.S_CNTR_CODE); + if (locMerge != null) + { + //锛�.1锛夊鏋滄湁瑕佸悎鎵樼殑鎵樼洏灏卞幓鍒ゆ柇涓�笅鍚堟墭宸ヤ綅鏄惁涓虹┖ + var anyLoc = LocationHelper.GetLocAreaList(reservoirs.Where(s => s.areaName == "鍚堟墭鍖�).FirstOrDefault().areaCode); + if (anyLoc.Any()) + { + foreach (var item in anyLoc) + { + //鐢熸垚涓�潯鍑哄簱鐨勪换鍔�+ var relevancys = Settings.Relevancys.Where(s => s.InLoc == item.S_CODE).FirstOrDefault(); + if (relevancys == null) + { + LogHelper.Info($"Settings鏈煡璇㈠埌鍚堟墭鍏ュ簱浣峽item.S_CODE}瀵瑰簲鐨勫嚭搴撲綅锛�, "鏉哀"); + continue; + } + //鐢熸垚鍒板悎鎵樺尯鐨勪换鍔�+ var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, item.S_CODE, "鐮佺洏鍚堟墭鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); + if (!res) + { + LogHelper.Info("鐮佺洏鍚堟墭鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); + return false; + } + res = TaskProcess.HYCreateTransport(locMerge.S_LOC_CODE, relevancys.OutLoc, "鐮佺洏鍚堟墭鍑哄簱", locMerge.S_CNTR_CODE, mst.S_CODE); + if (!res) + { + LogHelper.Info("鐮佺洏鍚堟墭鍑哄簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); + return false; + } + //锛�.2锛夊鏋滃悎鎵樺伐浣嶄负绌哄氨鐩存帴鍚堟墭鍒板悎鎵樺伐浣嶉噷闈紝鍚屾椂鐢熸垚涓�釜鍑哄簱浠诲姟鎶婅鍚堟墭鐨勬墭鐩樺嚭鍑烘潵锛堟爣璁颁负瑕佸悎鎵橈級 + ContainerHelper.UpdateCntrAbouts(mst.S_CNTR_CODE, "鍚堟墭"); + WMSHelper.UpdateStatus(mst, 1); + break; + } + } + else + { + //锛�.3锛夊鏋滃悎鎵樺伐浣嶄笉涓虹┖灏卞幓鍏ュ簱缂撳瓨鍖猴紙鏍囪涓鸿鍚堟墭锛�+ //鐢熸垚鍒板叆搴撶紦瀛樺尯鐨勪换鍔�+ var rkAnyLoc = LocationHelper.GetLocAreaList(reservoirs.Where(s => s.areaName == "鍏ュ簱缂撳瓨鍖�).FirstOrDefault().areaCode); + if (rkAnyLoc.Any()) + { + var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, rkAnyLoc.FirstOrDefault().S_CODE, "鐮佺洏缂撳瓨鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); + if (!res) + { + LogHelper.Info("鐮佺洏缂撳瓨鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); + return false; + } + WMSHelper.UpdateStatus(mst, 1); + //鏍囪涓哄悎鎵�+ ContainerHelper.UpdateCntrAbouts(mst.S_CNTR_CODE, "鍚堟墭"); + } + else + { + LogHelper.Info("鍏ュ簱缂撳瓨鍖烘病鏈夌┖璐т綅锛�, "鏉哀"); + return false; + } + } + + } + else + { + //2.濡傛灉娌℃湁瑕佸悎鎵樼殑鎵樼洏 + var area = reservoirs.Where(s => s.areaName == "鍏ュ簱鎺ラ┏浣�).FirstOrDefault(); + if (area == null) + { + LogHelper.Info("Settings鍑虹幇閿欒鏈煡璇㈠埌鍏ュ簱鎺ラ┏浣嶏紒", "鏉哀"); + return false; + } + //(2.1)鍏堟煡璇㈠叆搴撴帴椹充綅鏄惁涓虹┖锛屽鏋滀负绌虹洿鎺ョ敓鎴愬埌鍏ュ簱鐨勪换鍔�+ var anyLoc = LocationHelper.GetLocAreaList(area.areaCode); + if (anyLoc.Any()) + { + //鐢熸垚鍒版帴椹充綅鐨勪换鍔�+ var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, anyLoc.FirstOrDefault().S_CODE, "鐮佺洏鎺ラ┏鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); + if (!res) + { + LogHelper.Info("鐮佺洏鎺ラ┏鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); + return false; + } + WMSHelper.UpdateStatus(mst, 1); + } + else + { + //(2.2)濡傛灉鍏ュ簱鎺ラ┏浣嶄笉涓虹┖锛屽垯鐢熸垚鍒板叆搴撶紦瀛樺尯鐨勪换鍔★紙鏍囪涓轰笉鍚堟墭锛�+ //鐢熸垚鍒板叆搴撶紦瀛樺尯鐨勪换鍔�+ var rkAnyLoc = LocationHelper.GetLocAreaList(reservoirs.Where(s => s.areaName == "鍏ュ簱缂撳瓨鍖�).FirstOrDefault().areaCode); + if (rkAnyLoc.Any()) + { + var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, rkAnyLoc.FirstOrDefault().S_CODE, "鐮佺洏缂撳瓨鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); + if (!res) + { + LogHelper.Info("鐮佺洏缂撳瓨鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); + return false; + } + WMSHelper.UpdateStatus(mst, 1); + //鏍囪涓轰笉鍚堟墭 + ContainerHelper.UpdateCntrAbouts(mst.S_CNTR_CODE, "涓嶅悎鎵�); + } + else + { + LogHelper.Info("鍏ュ簱缂撳瓨鍖烘病鏈夌┖璐т綅锛�, "鏉哀"); + return false; + } + + } + + } + return result; + } + + /// <summary> + /// 鍚堟墭鍥炲簱 || 鍒嗘嫞鍥炲簱 + /// </summary> + /// <param name="mst"></param> + /// <param name="reservoirs"></param> + /// <returns></returns> + private static bool HandleMergeReturn(WMSTask mst, List<ReservoirArea> reservoirs) + { + var trayLst = ContainerHelper.GetCntrItemRel(mst.S_CNTR_CODE); + if (trayLst.Any()) + { + //婊℃墭鍥炲簱 + var area = reservoirs.Where(s => s.areaName == "鍏ュ簱鎺ラ┏浣�).FirstOrDefault(); + if (area == null) + { + LogHelper.Info("Settings鍑虹幇閿欒鏈煡璇㈠埌鍏ュ簱鎺ラ┏浣嶏紒", "鏉哀"); + return false; + } + //(2.1)鍏堟煡璇㈠叆搴撴帴椹充綅鏄惁涓虹┖锛屽鏋滀负绌虹洿鎺ョ敓鎴愬埌鍏ュ簱鐨勪换鍔�+ var anyLoc = LocationHelper.GetLocAreaList(area.areaCode); + if (anyLoc.Any()) + { + //鐢熸垚鍒版帴椹充綅鐨勪换鍔�+ var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, anyLoc.FirstOrDefault().S_CODE, "鐮佺洏鎺ラ┏鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); + if (!res) + { + LogHelper.Info("鐮佺洏鎺ラ┏鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); + return false; + } + WMSHelper.UpdateStatus(mst, 1); + } + else + { + //(2.2)濡傛灉鍏ュ簱鎺ラ┏浣嶄笉涓虹┖锛屽垯鐢熸垚鍒板叆搴撶紦瀛樺尯鐨勪换鍔★紙鏍囪涓轰笉鍚堟墭锛�+ //鐢熸垚鍒板叆搴撶紦瀛樺尯鐨勪换鍔�+ var rkAnyLoc = LocationHelper.GetLocAreaList(reservoirs.Where(s => s.areaName == "鍏ュ簱缂撳瓨鍖�).FirstOrDefault().areaCode); + if (rkAnyLoc.Any()) + { + var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, rkAnyLoc.FirstOrDefault().S_CODE, "鐮佺洏缂撳瓨鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); + if (!res) + { + LogHelper.Info("鐮佺洏缂撳瓨鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); + return false; + } + WMSHelper.UpdateStatus(mst, 1); + //鏍囪涓轰笉鍚堟墭 + ContainerHelper.UpdateCntrAbouts(mst.S_CNTR_CODE, "涓嶅悎鎵�); + } + else + { + LogHelper.Info("鍏ュ簱缂撳瓨鍖烘病鏈夌┖璐т綅锛�, "鏉哀"); + return false; + } + + } + } + else + { + //绌烘墭鍥炲簱 + var area = reservoirs.Where(s => s.areaName == "浜烘満鎺ラ┏浣�绌烘墭浣�).FirstOrDefault(); + if (area == null) + { + LogHelper.Info("Settings鍑虹幇閿欒鏈煡璇㈠埌鍏ュ簱鎺ラ┏浣嶏紒", "鏉哀"); + return false; + } + //(2.1)鍏堟煡璇汉鏈烘帴椹充綅-绌烘墭浣嶆槸鍚︿负绌猴紝濡傛灉涓虹┖鐩存帴鐢熸垚鍒板叆搴撶殑浠诲姟 + var anyLoc = LocationHelper.GetLocAreaList(area.areaCode); + if (anyLoc.Any()) + { + //鐢熸垚鍒版帴椹充綅鐨勪换鍔�+ var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, anyLoc.FirstOrDefault().S_CODE, "浜烘満鎺ラ┏鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); + if (!res) + { + LogHelper.Info("鐮佺洏鎺ラ┏鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); + return false; + } + WMSHelper.UpdateStatus(mst, 1); + } + else + { + //鐢熸垚鍒板叆搴撶紦瀛樺尯鐨勪换鍔�+ var rkAnyLoc = LocationHelper.GetLocAreaList(reservoirs.Where(s => s.areaName == "鍏ュ簱缂撳瓨鍖�).FirstOrDefault().areaCode); + if (rkAnyLoc.Any()) + { + var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, rkAnyLoc.FirstOrDefault().S_CODE, "鐮佺洏缂撳瓨鍏ュ簱", mst.S_CNTR_CODE, mst.S_CODE); + if (!res) + { + LogHelper.Info("鐮佺洏缂撳瓨鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); + return false; + } + //鏍囪涓轰笉鍚堟墭 + ContainerHelper.UpdateCntrAbouts(mst.S_CNTR_CODE, "涓嶅悎鎵�); + WMSHelper.UpdateStatus(mst, 1); + + } + else + { + LogHelper.Info("鍏ュ簱缂撳瓨鍖烘病鏈夌┖璐т綅锛�, "鏉哀"); + return false; + } + } + } + return true; + } + + /// <summary> + /// 鏂欑鍑哄簱 + /// </summary> + /// <param name="mst"></param> + /// <param name="reservoirs"></param> + /// <returns></returns> + private static bool HandleBoxOutbound(WMSTask mst, List<ReservoirArea> reservoirs) + { + var result = true; + var area = reservoirs.Where(s => s.areaName == "鏂欑鐮佺洏鍖�).FirstOrDefault(); + if (area == null) + { + LogHelper.Info("Settings鍑虹幇閿欒鏈煡璇㈠埌鏂欑鐮佺洏鍖猴紒", "鏉哀"); + return false; + } + //(2.1)鍏堟煡璇㈠叆搴撴帴椹充綅鏄惁涓虹┖锛屽鏋滀负绌虹洿鎺ョ敓鎴愬埌鍏ュ簱鐨勪换鍔�+ var anyLoc = LocationHelper.GetLocAreaList(area.areaCode); + if (anyLoc.Any()) + { + //鐢熸垚鍒版帴椹充綅鐨勪换鍔�+ var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, anyLoc.FirstOrDefault().S_CODE, "鏂欑鍑哄簱", mst.S_CNTR_CODE, mst.S_CODE); + if (!res) + { + LogHelper.Info("鏂欑鍑哄簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); + return false; + } + WMSHelper.UpdateStatus(mst, 1); + } + else + { + LogHelper.Info("鏂欑鐮佺洏鍖烘湭鏈夊彲鐢ㄨ揣浣嶏紒", "鏉哀"); + } + return result; + } + + /// <summary> + /// 鍙戣揣鏆傚瓨 || 鍙戣揣娓呮礂 || 鍙戣揣瑁呴厤 (鏆傛椂浣跨敤涓�釜鏂规硶澶勭悊) + /// </summary> + /// <param name="mst"></param> + /// <returns></returns> + private static bool PreShipmentStage(WMSTask mst) + { + var locList = LocationHelper.GetLocAreaList(mst.S_END_AREA); + if (locList.Any()) + { + var res = TaskProcess.HYCreateTransport(mst.S_START_LOC, locList.FirstOrDefault().S_CODE, mst.S_TYPE, mst.S_CNTR_CODE, mst.S_CODE); + if (!res) + { + LogHelper.Info($"{mst.S_TYPE}鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); + return false; + } + WMSHelper.UpdateStatus(mst, 1); + } + return true; + } + + /// <summary> + /// 鍙戣揣娓呮礂 + /// </summary> + /// <param name="mst"></param> + /// <returns></returns> + private static bool OutboundCleaning(WMSTask mst) + { + return true; + } + + /// <summary> + /// 鍙戣揣瑁呴厤 + /// </summary> + /// <param name="mst"></param> + /// <returns></returns> + private static bool OutboundAssembly(WMSTask mst) + { + return true; + } + #endregion + + #region 鎵ц浣滀笟 + + /// <summary> + /// 鑾峰彇鎵ц鐨勪綔涓氬垱寤轰换鍔�+ /// </summary> + /// <param name="mst"></param> + /// <returns></returns> + internal static bool exeCreateInTask(WMSTask mst) + { + try + { + if (mst.S_B_STATE.Trim() != "鎵ц") return true; + if (string.IsNullOrEmpty(mst.S_START_LOC)) return false; + + var reservoirs = Settings.ReservoirAreas?.ToList(); + if (reservoirs == null || !reservoirs.Any()) + { + LogHelper.Info("Settings鍑虹幇閿欒鏈煡璇㈠埌鏉哀鐨勫簱鍖猴紒", "鏉哀"); + return false; + } + + switch (mst.S_TYPE) + { + case "閰嶇洏鍑哄簱": + return PalletOutbound(mst); + default: + return true; + } + } + catch (Exception ex) + { + LogErrorDetails(ex); + return false; + } + } + + /// <summary> + /// 閰嶇洏鍑哄簱 + /// </summary> + /// <param name="mst"></param> + /// <param name="reservoirs"></param> + /// <returns></returns> + private static bool PalletOutbound(WMSTask mst) + { + var relevancys = Settings.OutRelevancys.Where(s => s.conLoc == mst.S_END_LOC).FirstOrDefault(); + if (relevancys == null) + { + LogHelper.Info($"Settings鏈煡璇㈠埌闆嗚揣浣峽mst.S_END_LOC}瀵瑰簲鐨勫垎鎷d綅锛�, "鏉哀"); + return false; + } + var locList = LocationHelper.GetLocListEmptyFree(relevancys.sorLoc.ToList()); + if (locList.Any()) + { + var startLoc = WMSHelper.GetCntrLoc(mst.S_CNTR_CODE); + // 鍒涘缓鍑哄簱浠诲姟 + var res = TaskProcess.HYCreateTransport(startLoc.S_LOC_CODE, locList.FirstOrDefault().S_CODE, mst.S_TYPE, mst.S_CNTR_CODE, mst.S_CODE); + if (!res) + { + LogHelper.Info($"鏍规嵁閰嶇洏鍗曠敓鎴愬嚭搴撲换鍔″垱寤哄嚭搴撲换鍔″け璐ワ紒锛�); + return false; + } + } + + return true; + } + + #endregion + + + + + /// <summary> + /// 閿欒鏃ュ織璁板綍 + /// </summary> + /// <param name="ex">閿欒淇℃伅</param> + private static void LogErrorDetails(Exception ex) + { + var st = new System.Diagnostics.StackTrace(ex, true); + var frame = st.GetFrame(0); + if (frame == null) return; + + var errorDetails = new StringBuilder() + .AppendLine($"閿欒淇℃伅: {ex.Message}") + .AppendLine($"鏂囦欢鍚� {frame.GetFileName()}") + .AppendLine($"琛屽彿: {frame.GetFileLineNumber()}") + .AppendLine($"鍒楀彿: {frame.GetFileColumnNumber()}") + .ToString(); + + LogHelper.Error("CreateInTask鑾峰彇浣滀笟鍒涘缓鍏ュ簱浠诲姟鍑虹幇閿欒锛� + errorDetails, ex); + } + + + + /// <summary> /// 寰幆鍏ュ簱缂撳瓨鍖烘煡璇㈠悎鎵樺伐浣嶅拰鍏ュ簱鎺ラ┏浣嶆槸鍚︽湁绌鸿揣浣嶏紙鍒涘缓浠诲姟锛�@@ -950,7 +1459,7 @@ { return false; } - + //鐢熸垚涓�潯鍑哄簱鐨勪换鍔� var relevancys = Settings.Relevancys.Where(s => s.InLoc == anyLoc.FirstOrDefault().S_CODE).FirstOrDefault(); if (relevancys == null) @@ -979,7 +1488,7 @@ return false; } } - + //涓嶅悎鎵橀�杈� var noCntrAbouts = ContainerHelper.GetCntrAbouts(rkAnyLoc.areaCode, "涓嶅悎鎵�).FirstOrDefault(); if (noCntrAbouts != null) @@ -999,7 +1508,7 @@ } //2.2濡傛灉鍏ュ簱鎺ラ┏浣嶄负绌哄垱寤虹爜鐩樻帴椹冲叆搴撶殑浠诲姟 //鐢熸垚鍒版帴椹充綅鐨勪换鍔�- res = TaskProcess.HYCreateTransport(noCntrAbouts.S_LOC_CODE, anyLoc.FirstOrDefault().S_CODE, "鐮佺洏鎺ラ┏鍏ュ簱", noCntrAbouts.S_CNTR_CODE,list.S_CODE); + res = TaskProcess.HYCreateTransport(noCntrAbouts.S_LOC_CODE, anyLoc.FirstOrDefault().S_CODE, "鐮佺洏鎺ラ┏鍏ュ簱", noCntrAbouts.S_CNTR_CODE, list.S_CODE); if (!res) { LogHelper.Info("鐮佺洏鎺ラ┏鍏ュ簱浠诲姟鍒涘缓澶辫触锛�, "鏉哀"); @@ -1120,7 +1629,7 @@ WMSHelper.UpdateTaskStatus(list.S_CODE, 1); ContainerHelper.UpdateCntrAbouts(list.S_CNTR_CODE, ""); } - + result.success = true; return result; @@ -1152,7 +1661,7 @@ try { // 鍒涘缓璋冨害鍣�- var scheduler = new DoubleDeepOutboundScheduler(distributionCntr); + var scheduler = new DoubleDeepOutboundScheduler(distributionCntr); var listOut = new List<Outbound>(); foreach (var item in distributionCntr) @@ -1169,15 +1678,81 @@ } // 璇锋眰鍑哄簱 var tasks = scheduler.GenerateOutboundTasks(listOut); + foreach (var item in tasks) { - // 鍒涘缓鍑哄簱浠诲姟 - var res = TaskProcess.HYCreateTransport(item.S_START_LOC, item.S_END_LOC, item.S_TYPE, item.S_CNTR_CODE, item.S_OP_CODE); - UpdateDistributionCntrState("浣滀笟涓�, item.S_CNTR_CODE); - if (!res) + var wmsTask = new WMSTask(); + if (string.IsNullOrEmpty(item.S_OP_CODE)) { - LogHelper.Info($"鏍规嵁閰嶇洏鍗曠敓鎴愬嚭搴撲换鍔″垱寤哄嚭搴撲换鍔″け璐ワ紒锛�); - return false; + wmsTask = new WMSTask + { + S_CNTR_CODE = item.S_CNTR_CODE, + S_CODE = WMSHelper.GenerateTaskNo(), + S_START_LOC = item.S_START_LOC, + S_START_AREA = item.S_START_AREA, + S_END_LOC = item.S_END_LOC, + S_END_AREA = item.S_END_AREA, + S_START_WH = "CK001", + S_END_WH = "CK001", + N_B_STATE = 1, + S_B_STATE = "鎵ц", + N_TYPE = 2, + S_TYPE = "閰嶇洏鍑哄簱" + }; + if (!WMSHelper.CreateWmsTask(wmsTask)) + { + return false; + } + } + + if (item.S_END_AREA == "LXLKQ") + { + // 鍒涘缓鍑哄簱浠诲姟 + var res = TaskProcess.HYCreateTransport(item.S_START_LOC, item.S_END_LOC, item.S_TYPE, item.S_CNTR_CODE, wmsTask.S_CODE); + UpdateDistributionCntrState(1, 2, item.S_CNTR_CODE); + if (!res) + { + LogHelper.Info($"鏍规嵁閰嶇洏鍗曠敓鎴愬嚭搴撲换鍔″垱寤哄嚭搴撲换鍔″け璐ワ紒锛�); + return false; + } + } + else + { + //鏍规嵁鍒嗘嫞璐т綅鍘绘煡璇㈤厤缃紝濡傛灉鍒嗘嫞鍖烘病鏈夌┖璐т綅灏卞幓鍑哄簱鍒嗘嫞鏆傚瓨鍖�+ var relevancys = Settings.OutRelevancys.Where(s => s.conLoc == item.S_END_LOC).FirstOrDefault(); + if (relevancys == null) + { + LogHelper.Info($"Settings鏈煡璇㈠埌闆嗚揣浣峽item.S_END_LOC}瀵瑰簲鐨勫垎鎷d綅锛�, "鏉哀"); + break; + } + var locList = LocationHelper.GetLocListEmptyFree(relevancys.sorLoc.ToList()); + if (locList.Any()) + { + // 鍒涘缓鍑哄簱浠诲姟 + var res = TaskProcess.HYCreateTransport(item.S_START_LOC, locList.FirstOrDefault().S_CODE, item.S_TYPE, item.S_CNTR_CODE, wmsTask.S_CODE); + UpdateDistributionCntrState(1, 2, item.S_CNTR_CODE); + if (!res) + { + LogHelper.Info($"鏍规嵁閰嶇洏鍗曠敓鎴愬嚭搴撲换鍔″垱寤哄嚭搴撲换鍔″け璐ワ紒锛�); + return false; + } + } + else + { + var reservoirs = Settings.ReservoirAreas.Where(s => s.areaName == "鎷i�缂撳瓨鍖�).FirstOrDefault(); + var lxLocations = LocationHelper.GetLocAreaList(reservoirs.areaCode); + if (lxLocations.Any()) + { + // 鍒涘缓鍑哄簱浠诲姟 + var res = TaskProcess.HYCreateTransport(item.S_START_LOC, lxLocations.FirstOrDefault().S_CODE, "閰嶇洏缂撳瓨", item.S_CNTR_CODE, wmsTask.S_CODE); + UpdateDistributionCntrState(1, 2, item.S_CNTR_CODE); + if (!res) + { + LogHelper.Info($"鏍规嵁閰嶇洏鍗曠敓鎴愬嚭搴撲换鍔″垱寤哄嚭搴撲换鍔″け璐ワ紒锛�); + return false; + } + } + } } } return true; @@ -1188,7 +1763,7 @@ var frame = st.GetFrame(0); // 鑾峰彇绗竴涓爢鏍堝抚 if (frame != null) { - LogHelper.Error($"鏍规嵁閰嶇洏鍗曠敓鎴愬嚭搴撲换鍔★紒锛�, ex); + LogHelper.Error($"鏍规嵁閰嶇洏鍗曠敓鎴愬嚭搴撲换鍔″け璐ex.Message}锛侊紒", ex); LogHelper.Error($"鏂囦欢鍚� {frame.GetFileName()}", ex); LogHelper.Error($"琛屽彿: {frame.GetFileLineNumber()}", ex); LogHelper.Error($"鍒楀彿: {frame.GetFileColumnNumber()}", ex); diff --git a/HH.WCS.Mobox3.HangYang/util/HttpHelper.cs b/HH.WCS.Mobox3.HangYang/util/HttpHelper.cs index 06f51ba..f0970dc 100644 --- a/HH.WCS.Mobox3.HangYang/util/HttpHelper.cs +++ b/HH.WCS.Mobox3.HangYang/util/HttpHelper.cs @@ -54,7 +54,9 @@ #endregion - public string WebPost(string url, string postData, string cotentType = "application/json") { + #region WebHelper + public string WebPost(string url, string postData, string cotentType = "application/json") + { Console.WriteLine(url); WebRequest request = WebRequest.Create(url); request.Method = "POST"; @@ -64,7 +66,8 @@ request.ContentLength = byteArray.Length; request.Timeout = 3000; - try { + try + { Stream dataStream = request.GetRequestStream(); dataStream.Write(byteArray, 0, byteArray.Length); dataStream.Close(); @@ -78,13 +81,15 @@ response.Close(); return responseFromServer; } - catch (Exception e) { + catch (Exception e) + { Console.WriteLine(e.Message); return ""; } } - public string WebGet(string url) { + public string WebGet(string url) + { //using (var client = new HttpClient()) { // //璇锋眰缁撴灉 // string result = client.GetAsync(url).Result.Content.ReadAsStringAsync().Result; @@ -98,7 +103,8 @@ request.Timeout = 6000; request.Method = "GET"; - try { + try + { WebResponse response = request.GetResponse(); Stream dataStream = response.GetResponseStream(); StreamReader reader = new StreamReader(dataStream); @@ -110,29 +116,34 @@ Console.WriteLine(responseFromServer); return responseFromServer; } - catch (Exception e) { + catch (Exception e) + { return ""; } } - public string Get(string url, string contentType = "application/x-www-form-urlencoded") { + public string Get(string url, string contentType = "application/x-www-form-urlencoded") + { WebRequest request = WebRequest.Create(url); request.Method = "Get"; request.ContentType = contentType; StreamReader reader = null; Stream stream = null; WebResponse rsp = null; - try { + try + { rsp = request.GetResponse(); stream = rsp.GetResponseStream(); reader = new StreamReader(stream); return reader.ReadToEnd(); } - catch { + catch + { return ""; } - finally { + finally + { // 閲婃斁璧勬簮 if (reader != null) reader.Close(); if (stream != null) stream.Close(); @@ -141,7 +152,8 @@ } - public string Post(string url, string postData, string contentType = "application/json", string sessionId = "") { + public string Post(string url, string postData, string contentType = "application/json", string sessionId = "") + { Console.WriteLine(url); WebRequest request = WebRequest.Create(url); request.Method = "POST"; @@ -149,13 +161,15 @@ request.ContentType = contentType; request.ContentLength = byteArray.Length; request.Timeout = 3000; - if (sessionId != "") { + if (sessionId != "") + { request.Headers.Set("ASP.NET_SessionId", sessionId); } StreamReader reader = null; Stream stream = null; WebResponse rsp = null; - try { + try + { stream = request.GetRequestStream(); stream.Write(byteArray, 0, byteArray.Length); stream.Close(); @@ -164,11 +178,13 @@ reader = new StreamReader(stream); return reader.ReadToEnd(); } - catch (Exception ex) { + catch (Exception ex) + { Console.WriteLine($"{url} err={ex.Message}"); return ""; } - finally { + finally + { // 閲婃斁璧勬簮 if (reader != null) reader.Close(); if (stream != null) stream.Close(); @@ -178,29 +194,34 @@ } - public string Post(string url, Dictionary<string, string> dic) { + public string Post(string url, Dictionary<string, string> dic) + { var param = dic.Select(a => { return string.Format("{0}={1}", a.Key, a.Value); }).ToList(); return Post(url, string.Join("&", param), "application/x-www-form-urlencoded"); } - public string PostWithCookie(string url, string sessinId) { + public string PostWithCookie(string url, string sessinId) + { return PostWithCookie(url, "", "", sessinId); } - public string PostWithCookie(string url, string postData, string contentType = "application/json", string sessionId = "") { + public string PostWithCookie(string url, string postData, string contentType = "application/json", string sessionId = "") + { HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); request.Method = "POST"; byte[] byteArray = Encoding.UTF8.GetBytes(postData); request.ContentType = contentType; request.ContentLength = byteArray.Length; - if (sessionId != "") { + if (sessionId != "") + { request.CookieContainer = new CookieContainer(); request.CookieContainer.SetCookies(new Uri("http://" + request.RequestUri.Authority), "ASP.NET_SessionId=" + sessionId); } StreamReader reader = null; Stream stream = null; WebResponse rsp = null; - try { + try + { stream = request.GetRequestStream(); stream.Write(byteArray, 0, byteArray.Length); stream.Close(); @@ -209,10 +230,12 @@ reader = new StreamReader(stream); return reader.ReadToEnd(); } - catch { + catch + { return ""; } - finally { + finally + { // 閲婃斁璧勬簮 if (reader != null) reader.Close(); if (stream != null) stream.Close(); @@ -220,6 +243,8 @@ } } + #endregion + } diff --git a/HH.WCS.Mobox3.HangYang/util/Settings.cs b/HH.WCS.Mobox3.HangYang/util/Settings.cs index d44ea6b..cfa52bf 100644 --- a/HH.WCS.Mobox3.HangYang/util/Settings.cs +++ b/HH.WCS.Mobox3.HangYang/util/Settings.cs @@ -30,6 +30,8 @@ public static List<ReservoirArea> ReservoirAreas { get; set; } public static List<Relevancy> Relevancys { get; set; } public static CompleteTask CompleteTasks { get; set; } + public static List<OutRelevancy> OutRelevancys { get; set; } + #endregion @@ -124,6 +126,10 @@ { CompleteTasks = JsonConvert.DeserializeObject<CompleteTask>(keyValue.Value.ToString()); } + if (keyValue.Name == "OutRelevancy") + { + OutRelevancys = JsonConvert.DeserializeObject<List<OutRelevancy>>(keyValue.Value.ToString()); + } } } } @@ -178,6 +184,12 @@ public string OutLoc { get; set; } } + public class OutRelevancy + { + public string conLoc { get; set; } + public string[] sorLoc { get; set; } + } + public class CompleteTask { public string[] taskType { get; set; } diff --git a/HH.WCS.Mobox3.HangYang/wms/ContainerHelper.cs b/HH.WCS.Mobox3.HangYang/wms/ContainerHelper.cs index 6492804..a2053d2 100644 --- a/HH.WCS.Mobox3.HangYang/wms/ContainerHelper.cs +++ b/HH.WCS.Mobox3.HangYang/wms/ContainerHelper.cs @@ -138,19 +138,6 @@ return res; } - /// <summary> - /// TN_ContainerHelper.test("4L澶╃劧姘寸瑁�鍏�, 50, "335ml涓滄柟鏍戝彾15鍏�, 30); - /// </summary> - /// <param name="item1"></param> - /// <param name="qty1"></param> - /// <param name="item2"></param> - /// <param name="qty2"></param> - //internal static void test(string item1, int qty1, string item2, int qty2) { - // var db = new SqlHelper<object>().GetInstance(); - // var cntr = db.Queryable<TN_Container>().Includes(a => a.CntrItemRelList). - // Where(a => a.CntrItemRelList.Count(b => b.S_ITEM_CODE == item1 && int.Parse(b.F_QTY) > qty1) > 0 - // && a.CntrItemRelList.Count(b => b.S_ITEM_CODE == item2 && int.Parse(b.F_QTY) > qty2) > 0).First(); - //} /// <summary> /// 鍒ゆ柇瀹瑰櫒鏄惁鏈夌墿鏂欎俊鎭�@@ -574,6 +561,27 @@ return res; } + /// <summary> + /// 淇敼瀹瑰櫒鐗╂枡琛ㄥ叆搴撴椂闂�+ /// </summary> + /// <param name="trayCode">鎵樼洏鍙�/param> + /// <returns></returns> + internal static bool UpdateCntrItem(string trayCode) + { + var res = false; + var db = new SqlHelper<object>().GetInstance(); + var model = db.Queryable<CntrItemDetail>().Where(a => a.S_CNTR_CODE == trayCode).ToList(); + foreach (var item in model) + { + if (item.T_INBOUND_TIME == null) + { + item.T_INBOUND_TIME = DateTime.Now; + res = db.Updateable(item).UpdateColumns(it => new { it.T_INBOUND_TIME }).ExecuteCommand() > 0; + } + } + return res; + } + /// <summary> /// 鏌ヨ琚爣璁扮殑鎵樼洏 diff --git a/HH.WCS.Mobox3.HangYang/wms/LocationHelper.cs b/HH.WCS.Mobox3.HangYang/wms/LocationHelper.cs index d5e7524..27dd3ee 100644 --- a/HH.WCS.Mobox3.HangYang/wms/LocationHelper.cs +++ b/HH.WCS.Mobox3.HangYang/wms/LocationHelper.cs @@ -319,19 +319,7 @@ } - /// <summary> - /// 鏍规嵁璐т綅闆嗗悎鑾峰彇 娌℃湁瀹瑰櫒 娌℃湁閿佺殑璐т綅 - /// </summary> - /// <param name="loc"></param> - /// <returns></returns> - internal static List<Location> GetLocListEmptyFree(List<string> loc) - { - //1.0 鏌ヨ揣浣嶅鍣ㄨ〃 - var db = new SqlHelper<object>().GetInstance(); - var list = db.Queryable<Location>().Where(a => loc.Contains(a.S_CODE) && a.N_CURRENT_NUM == 0 && a.S_LOCK_STATE.Trim() == "鏃�).ToList(); - return list; - - } + /// <summary> /// 鍏ュ簱閿佸畾缁堢偣锛屽嚭搴撻攣瀹氳捣鐐�@@ -505,10 +493,21 @@ } + /// <summary> + /// 鏍规嵁璐т綅闆嗗悎鑾峰彇 娌℃湁瀹瑰櫒 娌℃湁閿佺殑璐т綅 + /// </summary> + /// <param name="loc"></param> + /// <returns></returns> + internal static List<Location> GetLocListEmptyFree(List<string> loc) + { + //1.0 鏌ヨ揣浣嶅鍣ㄨ〃 + var db = new SqlHelper<object>().GetInstance(); + var list = db.Queryable<Location>().Where(a => loc.Contains(a.S_CODE) && a.N_CURRENT_NUM == 0 && a.S_LOCK_STATE.Trim() == "鏃�).ToList(); + return list; + + } + - - - #endregion diff --git a/HH.WCS.Mobox3.HangYang/wms/WCSHelper.cs b/HH.WCS.Mobox3.HangYang/wms/WCSHelper.cs index c909a2e..4d2250f 100644 --- a/HH.WCS.Mobox3.HangYang/wms/WCSHelper.cs +++ b/HH.WCS.Mobox3.HangYang/wms/WCSHelper.cs @@ -16,7 +16,7 @@ var date = DateTime.Now.ToString("yyMMdd"); return $"TN{date}{id.ToString().PadLeft(4, '0')}"; } - + internal static bool UpdateStatus(WCSTask task, string status) { var res = false; @@ -24,7 +24,7 @@ var lcrList = db.Queryable<LocCntrRel>().Where(a => a.S_CNTR_CODE.Trim() == task.S_CNTR_CODE).First(); task.S_B_STATE = status; task.S_NOTE = lcrList == null ? task.S_NOTE : lcrList.S_ACTION_SRC; - db.Updateable(task).UpdateColumns(it => new { it.S_B_STATE,it.S_NOTE }).ExecuteCommand(); + db.Updateable(task).UpdateColumns(it => new { it.S_B_STATE, it.S_NOTE }).ExecuteCommand(); return res; } internal static bool UpdateStatus(WCSTask task) @@ -61,7 +61,7 @@ return task; } - + internal static List<WCSTask> GetTaskBycntrcode(string no) { var db = new SqlHelper<WCSTask>().GetInstance(); @@ -93,6 +93,7 @@ } internal static bool CreateTask(string no, string from, string to, string taskType, int pri, string cntrInfo, int cntrCount = 1, int startLayer = 1, int endLayer = 1) { + var whCode = Settings.WHCode; var fromLoc = LocationHelper.GetLocation(from); var endLoc = LocationHelper.GetLocation(to); WCSTask TN_Task = new WCSTask() @@ -111,8 +112,9 @@ S_CNTR_CODE = cntrInfo, N_START_LAYER = startLayer, N_END_LAYER = endLayer, - N_CNTR_COUNT = cntrCount - + N_CNTR_COUNT = cntrCount, + S_START_WH = whCode, + S_END_WH = whCode }; return CreateTask(TN_Task); @@ -181,14 +183,10 @@ var db = new SqlHelper<WCSTask>().GetInstance(); if (task != null) { - if (task.N_B_STATE == 1) - { - task.N_B_STATE = 2; - task.S_B_STATE = WCSTask.GetStateStr(task.N_B_STATE); - task.T_START_TIME = DateTime.Now; - db.Updateable(task).UpdateColumns(it => new { it.N_B_STATE, it.S_B_STATE, it.T_START_TIME }).ExecuteCommand(); - } - + task.N_B_STATE = 2; + task.S_B_STATE = WCSTask.GetStateStr(task.N_B_STATE); + task.T_START_TIME = DateTime.Now; + db.Updateable(task).UpdateColumns(it => new { it.N_B_STATE, it.S_B_STATE, it.T_START_TIME }).ExecuteCommand(); } } internal static void End(WCSTask task) @@ -236,11 +234,11 @@ internal static List<WCSTask> GetTaskListByState(string status) { var db = new SqlHelper<object>().GetInstance(); - return db.Queryable<WCSTask>().Where(a => a.S_B_STATE.Trim() == status).OrderBy(s=>s.T_CREATE).ToList(); + return db.Queryable<WCSTask>().Where(a => a.S_B_STATE.Trim() == status).OrderBy(s => s.T_CREATE).ToList(); } - + internal static List<WCSTask> GetTaskListByState(int state) { @@ -253,6 +251,6 @@ return db.Queryable<WCSTask>().Where(a => a.N_B_STATE == 0).ToList(); } - + } } diff --git a/HH.WCS.Mobox3.HangYang/wms/WMSHelper.cs b/HH.WCS.Mobox3.HangYang/wms/WMSHelper.cs index e083743..5270858 100644 --- a/HH.WCS.Mobox3.HangYang/wms/WMSHelper.cs +++ b/HH.WCS.Mobox3.HangYang/wms/WMSHelper.cs @@ -11,6 +11,7 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; +using System.IdentityModel.Protocols.WSTrust; using System.Linq; using System.Linq.Expressions; using System.Reflection; @@ -635,7 +636,15 @@ } catch (Exception ex) { - LogHelper.Error("鍒涘缓鍏ュ簱鍗曞け璐�, ex, "鏉哀"); + var sugarEx = ex as SqlSugar.SqlSugarException; + if (sugarEx != null) + { + LogHelper.Error($"鍒涘缓鍏ュ簱鍗昐QL閿欒: {sugarEx.Sql}", sugarEx, "鏉哀"); + } + else + { + LogHelper.Error($"鍒涘缓鍏ュ簱鍗曞け璐�{ex.Message}", ex, "鏉哀"); + } return false; } @@ -664,7 +673,7 @@ } catch (Exception ex) { - LogHelper.Error("鍒涘缓鍑哄簱鍗曞け璐�, ex, "鏉哀"); + LogHelper.Error($"鍒涘缓鍑哄簱鍗曞け璐�{ex.Message}", ex, "鏉哀"); return false; } @@ -730,6 +739,28 @@ } /// <summary> + /// 鏍规嵁鎵樼洏鏌ヨ璐т綅鏄庣粏 + /// </summary> + /// <param name="trayCode">鎵樼洏鍙�/param> + /// <returns></returns> + internal static LocCntrRel GetCntrLoc(string trayCode) + { + var db = new SqlHelper<object>().GetInstance(); + + var locCntr = db.Queryable<LocCntrRel>().Where(a => a.S_CNTR_CODE.Trim() == trayCode).First(); + var locList = db.Queryable<Location>().Where(p => p.S_CODE == locCntr.S_LOC_CODE + && p.N_CURRENT_NUM == p.N_CAPACITY + && p.S_LOCK_STATE.Trim() == "鏃� + && p.S_AREA_CODE == "JXHCQ").First(); + if (locList == null) + { + return null; + } + return locCntr; + + } + + /// <summary> /// 浠诲姟鐘舵�杞崲 /// </summary> /// <param name="state">鐘舵�鍙�/param> @@ -755,28 +786,48 @@ /// </summary> /// <param name="state">閰嶇洏鍗曠姸鎬�/param> /// <returns></returns> - internal static List<DistributionCntr> GetPickingListByState(string state) + internal static List<DistributionCntr> GetPickingListByState(int state) { var db = new SqlHelper<object>().GetInstance(); - var distributionCntr = db.Queryable<DistributionCntr>().Where(a => a.S_B_STATE.Trim() == state).ToList(); + var distributionCntr = db.Queryable<DistributionCntr>().Where(a => a.N_B_STATE == state).ToList(); return distributionCntr; + } + + + /// <summary> + /// 閰嶇洏鍗曠姸鎬佽浆鎹�+ /// </summary> + /// <param name="state">鐘舵�鍙�/param> + /// <returns></returns> + internal static string GetDistributionStateStr(int state) + { + var status = ""; + switch (state) + { + case 1: status = "宸查厤璐�; break; + case 2: status = "鍑哄簱涓�; break; + case 3: status = "宸插嚭搴�; break; + case 4: status = "鍒嗘嫞瀹屾垚 "; break; + + } + return status; } /// <summary> /// 淇敼閰嶇洏鍗曠姸鎬� /// </summary> + /// <param name="taskState">浣滀笟鐘舵�</param> /// <param name="state">鐘舵�</param> /// <param name="trayCode">鎵樼洏鍙�/param> /// <returns></returns> - internal static bool UpdateDistributionCntrState(string state,string trayCode) + internal static bool UpdateDistributionCntrState(int taskState,int state,string trayCode) { var db = new SqlHelper<object>().GetInstance(); - var distributionCntr = db.Queryable<DistributionCntr>().Where(a => a.S_B_STATE.Trim() == "閰嶈揣瀹屾垚" && a.S_CNTR_CODE == trayCode ).First(); + var distributionCntr = db.Queryable<DistributionCntr>().Where(a => a.N_B_STATE == taskState && a.S_CNTR_CODE == trayCode ).First(); if (distributionCntr != null) { - - distributionCntr.S_B_STATE = state; - distributionCntr.N_B_STATE = 2; + distributionCntr.N_B_STATE = state; + distributionCntr.S_B_STATE = GetDistributionStateStr(state); return db.Updateable<DistributionCntr>(distributionCntr).UpdateColumns(it => new { it.S_B_STATE, it.N_B_STATE }).ExecuteCommand() > 0; } return false; @@ -888,7 +939,7 @@ { var db = new SqlHelper<object>().GetInstance(); var locations = db.Queryable<Location>().Where(a => a.S_AREA_CODE == inbound.areaCode).ToList(); - if(!string.IsNullOrEmpty(inbound.roadWay.ToString())) + if(inbound.roadWay != 0) { locations.RemoveAll(s => s.N_ROADWAY != inbound.roadWay); } @@ -1129,14 +1180,16 @@ else continue; } - else - { - //璐т綅涓虹┖鐩存帴鐢熸垚鍑哄簱浠诲姟 - tasks.Add(CreateOutboundTask(targetLoc,outboundItem)); - } + //else + //{ + // //璐т綅涓虹┖鐩存帴鐢熸垚鍑哄簱浠诲姟 + // tasks.Add(CreateOutboundTask(targetLoc, outboundItem)); + //} } - else continue; - + else + { + continue; + } // 2.2 鐢熸垚鍑哄簱浠诲姟锛堟繁浣嶏級 tasks.Add(CreateOutboundTask(targetLoc, outboundItem)); } @@ -1145,6 +1198,7 @@ // 3. 闈炲弻娣变綅鐩存帴鍑哄簱 tasks.Add(CreateOutboundTask(targetLoc, outboundItem)); } + break; } // 4. 浠诲姟鎺掑簭锛氱Щ搴撲换鍔′紭鍏�+ 楂樹紭鍏堢骇浼樺厛 return tasks; @@ -1164,7 +1218,7 @@ loc.N_ROADWAY == deepLoc.N_ROADWAY && loc.N_COL == deepLoc.N_COL && loc.N_LAYER == deepLoc.N_LAYER && - loc.N_LOCK_STATE == 0 + loc.N_LOCK_STATE == 0 || loc.N_LOCK_STATE == 5 ); private Location FindBestRelocationTarget(Location outerLoc) @@ -1232,7 +1286,8 @@ _allLocations .Where(x => x.S_CODE == outerLoc.S_CODE) .ToList() - .ForEach(x => x.N_LOCK_STATE = 3); + .ForEach(x => x.N_LOCK_STATE = 5); + //鏍囪娣变綅鐨勫渚ц揣浣嶄负5 } } } @@ -1263,7 +1318,7 @@ /// 鏍规嵁浠诲姟鍗囬噺 /// </summary> /// <param name="task"></param> - internal static void AddChange(WCSTask task) + internal static bool AddChange(WCSTask task) { var db = new SqlHelper<object>().GetInstance(); var result = true; @@ -1349,34 +1404,36 @@ catch (Exception ex) { LogHelper.Error($"浠撳簱鍗囬噺寮傚父 寮傚父淇℃伅={ex.Message}", ex); + result = false; } + return result; } /// <summary> /// 鏍规嵁浠诲姟闄嶉噺 /// </summary> /// <param name="task"></param> - internal static void DeleteChange(WCSTask task) + internal static bool DeleteChange(WCSTask wmstask) { var db = new SqlHelper<object>().GetInstance(); var result = true; try { - var wmstask = db.Queryable<WMSTask>().Where(a => a.S_CODE == task.S_OP_CODE).First(); + //var wmstask = db.Queryable<WCSTask>().Where(a => a == task.S_OP_CODE).First(); if (wmstask != null) { - var itemlist = db.Queryable<CntrItemDetail>().Where(a => a.S_CNTR_CODE == task.S_CNTR_CODE).ToList(); + var itemlist = db.Queryable<CntrItemDetail>().Where(a => a.S_CNTR_CODE == wmstask.S_CNTR_CODE).ToList(); if (itemlist.Count > 0) { var url = Settings.MoboxSeverUrl + "inventory/AddChange"; - //浠撳簱閲忚〃鍗囬噺 - var req = new AddChangeModel { op_type = 4 }; - //搴撳尯閲忚〃鍗囬噺 - var req2 = new AddChangeModel { op_type = 7 }; + //浠撳簱閲忚〃闄嶉噺 + var req = new AddChangeModel { op_type = 8 }; + //搴撳尯閲忚〃闄嶉噺 + var req2 = new AddChangeModel { op_type = 9 }; itemlist.ForEach(a => { LogHelper.Info($"濉厖鏁版嵁"); - LogHelper.Info($"鍑忎粨搴撻噺琛ㄦ暟鎹�浠撳簱{task.S_END_WH} 鐗╂枡缂栫爜{a.S_ITEM_CODE} 鐗╂枡鍚嶇О{a.S_ITEM_NAME} 鏁伴噺{a.F_QTY}"); + LogHelper.Info($"鍑忎粨搴撻噺琛ㄦ暟鎹�浠撳簱{wmstask.S_START_WH} 鐗╂枡缂栫爜{a.S_ITEM_CODE} 鐗╂枡鍚嶇О{a.S_ITEM_NAME} 鏁伴噺{a.F_QTY}"); req.item_info.Add(new AddChangeModel.itemModel { wh_code = wmstask.S_START_WH, @@ -1384,7 +1441,7 @@ item_name = a.S_ITEM_NAME, qty = a.F_QTY }); - LogHelper.Info($"鍑忓簱鍖洪噺琛ㄦ暟鎹�搴撳尯{task.S_END_AREA} 鐗╂枡缂栫爜{a.S_ITEM_CODE} 鐗╂枡鍚嶇О{a.S_ITEM_NAME} 鏁伴噺{a.F_QTY}"); + LogHelper.Info($"鍑忓簱鍖洪噺琛ㄦ暟鎹�搴撳尯{wmstask.S_START_AREA} 鐗╂枡缂栫爜{a.S_ITEM_CODE} 鐗╂枡鍚嶇О{a.S_ITEM_NAME} 鏁伴噺{a.F_QTY}"); req2.item_info.Add(new AddChangeModel.itemModel { wh_code = wmstask.S_START_WH, @@ -1440,15 +1497,17 @@ } } - else LogHelper.Info($"鎵樼洏{task.S_CNTR_CODE} 鍦ㄥ鍣ㄨ揣鍝佹槑缁嗕腑鎵句笉鍒版暟鎹�); + else LogHelper.Info($"鎵樼洏{wmstask.S_CNTR_CODE} 鍦ㄥ鍣ㄨ揣鍝佹槑缁嗕腑鎵句笉鍒版暟鎹�); } - else LogHelper.Info($"鏈壘鍒颁换鍔task.S_CODE} 瀵瑰簲鐨勪綔涓�); + else LogHelper.Info($"鏈壘鍒颁换鍔wmstask.S_CODE} 瀵瑰簲鐨勪换鍔�); } catch (Exception ex) { LogHelper.Error($"浠撳簱闄嶉噺寮傚父 寮傚父淇℃伅={ex.Message}", ex); + result = false; } + return result; } -- Gitblit v1.9.1