From 75f34e9ba2e8b249c96333f3d7936c8968e12ec7 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期三, 11 二月 2026 14:44:12 +0800
Subject: [PATCH] 集成WMS调用与入库任务处理
---
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 45 ++
Code/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs | 21 +
Code/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo.cs | 26 +
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/Http/HttpRequestHelper.cs | 21 +
Code/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v18/DocumentLayout.json | 133 ++++++--
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/HttpEnum/ConfigKey.cs | 12
Code/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs | 27 +
Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 205 +++++++++++--
Code/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs | 67 ++++
Code/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/18.0.988.22099/CodeChunks.db | 0
Code/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/18.0.988.22099/SemanticSymbols.db | 0
Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/18.0.988.22099/SemanticSymbols.db | 0
Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v18/DocumentLayout.json | 84 +++--
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotJob.cs | 83 ++++-
Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v18/DocumentLayout.backup.json | 46 +-
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs | 6
/dev/null | 0
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs | 20 +
Code/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs | 22 +
Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs | 39 ++
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs | 8
Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/18.0.988.22099/CodeChunks.db | 0
22 files changed, 708 insertions(+), 157 deletions(-)
diff --git a/Code/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1204.46620/CodeChunks.db b/Code/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1204.46620/CodeChunks.db
deleted file mode 100644
index ec947a5..0000000
--- a/Code/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1204.46620/CodeChunks.db
+++ /dev/null
Binary files differ
diff --git a/Code/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1204.46620/SemanticSymbols.db b/Code/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1204.46620/SemanticSymbols.db
deleted file mode 100644
index 6fe5521..0000000
--- a/Code/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1204.46620/SemanticSymbols.db
+++ /dev/null
Binary files differ
diff --git a/Code/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/18.0.988.22099/CodeChunks.db b/Code/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/18.0.988.22099/CodeChunks.db
index 07558c8..76803fd 100644
--- a/Code/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/18.0.988.22099/CodeChunks.db
+++ b/Code/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/18.0.988.22099/CodeChunks.db
Binary files differ
diff --git a/Code/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/18.0.988.22099/SemanticSymbols.db b/Code/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/18.0.988.22099/SemanticSymbols.db
index 8d634af..e2055c1 100644
--- a/Code/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/18.0.988.22099/SemanticSymbols.db
+++ b/Code/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/18.0.988.22099/SemanticSymbols.db
Binary files differ
diff --git a/Code/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v18/DocumentLayout.json b/Code/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v18/DocumentLayout.json
index f2b698f..225ce32 100644
--- a/Code/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v18/DocumentLayout.json
+++ b/Code/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v18/DocumentLayout.json
@@ -7,24 +7,40 @@
"RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\robotjob\\robotjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
- "AbsoluteMoniker": "D:0:0:{C2D3D138-9109-481B-8BEB-A27597890B2C}|WIDESEAWCS_DTO\\WIDESEAWCS_DTO.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_dto\\taskinfo\\createtaskdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{C2D3D138-9109-481B-8BEB-A27597890B2C}|WIDESEAWCS_DTO\\WIDESEAWCS_DTO.csproj|solutionrelative:wideseawcs_dto\\taskinfo\\createtaskdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+ "AbsoluteMoniker": "D:0:0:{9FBC654C-51DE-422D-9E1E-6A38268DE1E2}|WIDESEAWCS_Common\\WIDESEAWCS_Common.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_common\\taskenum\\tasktypeenum.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "RelativeMoniker": "D:0:0:{9FBC654C-51DE-422D-9E1E-6A38268DE1E2}|WIDESEAWCS_Common\\WIDESEAWCS_Common.csproj|solutionrelative:wideseawcs_common\\taskenum\\tasktypeenum.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
- "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_tasks\\stackercranejob\\commonstackercranejob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\stackercranejob\\commonstackercranejob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+ "AbsoluteMoniker": "D:0:0:{9FBC654C-51DE-422D-9E1E-6A38268DE1E2}|WIDESEAWCS_Common\\WIDESEAWCS_Common.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_common\\httpenum\\configkey.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "RelativeMoniker": "D:0:0:{9FBC654C-51DE-422D-9E1E-6A38268DE1E2}|WIDESEAWCS_Common\\WIDESEAWCS_Common.csproj|solutionrelative:wideseawcs_common\\httpenum\\configkey.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
- "AbsoluteMoniker": "D:0:0:{C2D3D138-9109-481B-8BEB-A27597890B2C}|WIDESEAWCS_DTO\\WIDESEAWCS_DTO.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_dto\\stock\\stockdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{C2D3D138-9109-481B-8BEB-A27597890B2C}|WIDESEAWCS_DTO\\WIDESEAWCS_DTO.csproj|solutionrelative:wideseawcs_dto\\stock\\stockdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+ "AbsoluteMoniker": "D:0:0:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "RelativeMoniker": "D:0:0:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|solutionrelative:wideseawcs_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+ },
+ {
+ "AbsoluteMoniker": "D:0:0:{7279A2AE-8D1F-4E66-A73A-01AF7927A336}|WIDESEAWCS_ITaskInfoService\\WIDESEAWCS_ITaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_itaskinfoservice\\itaskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "RelativeMoniker": "D:0:0:{7279A2AE-8D1F-4E66-A73A-01AF7927A336}|WIDESEAWCS_ITaskInfoService\\WIDESEAWCS_ITaskInfoService.csproj|solutionrelative:wideseawcs_itaskinfoservice\\itaskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+ },
+ {
+ "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_tasks\\conveyorlinejob\\commonconveyorlinejob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\conveyorlinejob\\commonconveyorlinejob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+ },
+ {
+ "AbsoluteMoniker": "D:0:0:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_taskinfoservice\\robottaskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "RelativeMoniker": "D:0:0:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|solutionrelative:wideseawcs_taskinfoservice\\robottaskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{7F200FE8-CAF6-4131-BD25-8D438FE0ABAC}|WIDESEAWCS_Model\\WIDESEAWCS_Model.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_model\\models\\taskinfo\\dt_robottask.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{7F200FE8-CAF6-4131-BD25-8D438FE0ABAC}|WIDESEAWCS_Model\\WIDESEAWCS_Model.csproj|solutionrelative:wideseawcs_model\\models\\taskinfo\\dt_robottask.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
- "AbsoluteMoniker": "D:0:0:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_taskinfoservice\\robottaskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|solutionrelative:wideseawcs_taskinfoservice\\robottaskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+ "AbsoluteMoniker": "D:0:0:{C2D3D138-9109-481B-8BEB-A27597890B2C}|WIDESEAWCS_DTO\\WIDESEAWCS_DTO.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_dto\\stock\\stockdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "RelativeMoniker": "D:0:0:{C2D3D138-9109-481B-8BEB-A27597890B2C}|WIDESEAWCS_DTO\\WIDESEAWCS_DTO.csproj|solutionrelative:wideseawcs_dto\\stock\\stockdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+ },
+ {
+ "AbsoluteMoniker": "D:0:0:{C2D3D138-9109-481B-8BEB-A27597890B2C}|WIDESEAWCS_DTO\\WIDESEAWCS_DTO.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_dto\\taskinfo\\createtaskdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "RelativeMoniker": "D:0:0:{C2D3D138-9109-481B-8BEB-A27597890B2C}|WIDESEAWCS_DTO\\WIDESEAWCS_DTO.csproj|solutionrelative:wideseawcs_dto\\taskinfo\\createtaskdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{7279A2AE-8D1F-4E66-A73A-01AF7927A336}|WIDESEAWCS_ITaskInfoService\\WIDESEAWCS_ITaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_itaskinfoservice\\irobottaskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
@@ -38,8 +54,47 @@
"DocumentGroups": [
{
"DockedWidth": 200,
- "SelectedChildIndex": 9,
+ "SelectedChildIndex": 13,
"Children": [
+ {
+ "$type": "Document",
+ "DocumentIndex": 1,
+ "Title": "TaskTypeEnum.cs",
+ "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Common\\TaskEnum\\TaskTypeEnum.cs",
+ "RelativeDocumentMoniker": "WIDESEAWCS_Common\\TaskEnum\\TaskTypeEnum.cs",
+ "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Common\\TaskEnum\\TaskTypeEnum.cs",
+ "RelativeToolTip": "WIDESEAWCS_Common\\TaskEnum\\TaskTypeEnum.cs",
+ "ViewState": "AgIAAEcAAAAAAAAAAAAzwFAAAAAhAAAAAAAAAA==",
+ "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
+ "WhenOpened": "2026-02-10T06:23:24.956Z",
+ "EditorCaption": ""
+ },
+ {
+ "$type": "Document",
+ "DocumentIndex": 4,
+ "Title": "ITaskService.cs",
+ "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_ITaskInfoService\\ITaskService.cs",
+ "RelativeDocumentMoniker": "WIDESEAWCS_ITaskInfoService\\ITaskService.cs",
+ "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_ITaskInfoService\\ITaskService.cs",
+ "RelativeToolTip": "WIDESEAWCS_ITaskInfoService\\ITaskService.cs",
+ "ViewState": "AgIAALYAAAAAAAAAAAAAAMgAAAAIAAAAAAAAAA==",
+ "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
+ "WhenOpened": "2026-02-10T06:18:41.307Z",
+ "EditorCaption": ""
+ },
+ {
+ "$type": "Document",
+ "DocumentIndex": 3,
+ "Title": "TaskService.cs",
+ "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_TaskInfoService\\TaskService.cs",
+ "RelativeDocumentMoniker": "WIDESEAWCS_TaskInfoService\\TaskService.cs",
+ "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_TaskInfoService\\TaskService.cs",
+ "RelativeToolTip": "WIDESEAWCS_TaskInfoService\\TaskService.cs",
+ "ViewState": "AgIAAF4CAAAAAAAAAADwv3gCAAAWAAAAAAAAAA==",
+ "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
+ "WhenOpened": "2026-02-10T06:11:48.071Z",
+ "EditorCaption": ""
+ },
{
"$type": "Bookmark",
"Name": "ST:128:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
@@ -54,68 +109,80 @@
},
{
"$type": "Document",
- "DocumentIndex": 1,
+ "DocumentIndex": 5,
+ "Title": "CommonConveyorLineJob.cs",
+ "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\ConveyorLineJob\\CommonConveyorLineJob.cs",
+ "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\ConveyorLineJob\\CommonConveyorLineJob.cs",
+ "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\ConveyorLineJob\\CommonConveyorLineJob.cs",
+ "RelativeToolTip": "WIDESEAWCS_Tasks\\ConveyorLineJob\\CommonConveyorLineJob.cs",
+ "ViewState": "AgIAABUAAAAAAAAAAAAowCgAAAAFAAAAAAAAAA==",
+ "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
+ "WhenOpened": "2026-02-09T01:53:42.667Z"
+ },
+ {
+ "$type": "Document",
+ "DocumentIndex": 2,
+ "Title": "ConfigKey.cs",
+ "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Common\\HttpEnum\\ConfigKey.cs",
+ "RelativeDocumentMoniker": "WIDESEAWCS_Common\\HttpEnum\\ConfigKey.cs",
+ "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Common\\HttpEnum\\ConfigKey.cs",
+ "RelativeToolTip": "WIDESEAWCS_Common\\HttpEnum\\ConfigKey.cs",
+ "ViewState": "AgIAAAsAAAAAAAAAAADwvyUAAAATAAAAAAAAAA==",
+ "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
+ "WhenOpened": "2026-02-09T01:45:04.7Z",
+ "EditorCaption": ""
+ },
+ {
+ "$type": "Document",
+ "DocumentIndex": 9,
"Title": "CreateTaskDto.cs",
"DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_DTO\\TaskInfo\\CreateTaskDto.cs",
"RelativeDocumentMoniker": "WIDESEAWCS_DTO\\TaskInfo\\CreateTaskDto.cs",
"ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_DTO\\TaskInfo\\CreateTaskDto.cs",
"RelativeToolTip": "WIDESEAWCS_DTO\\TaskInfo\\CreateTaskDto.cs",
- "ViewState": "AgIAABUAAAAAAAAAAAAAwCwAAAArAAAAAAAAAA==",
+ "ViewState": "AgIAAAAAAAAAAAAAAAAAAA4AAAAeAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-02-06T08:09:57.387Z",
- "EditorCaption": ""
+ "WhenOpened": "2026-02-06T08:09:57.387Z"
},
{
"$type": "Document",
- "DocumentIndex": 2,
- "Title": "CommonStackerCraneJob.cs",
- "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\StackerCraneJob\\CommonStackerCraneJob.cs",
- "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\StackerCraneJob\\CommonStackerCraneJob.cs",
- "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\StackerCraneJob\\CommonStackerCraneJob.cs",
- "RelativeToolTip": "WIDESEAWCS_Tasks\\StackerCraneJob\\CommonStackerCraneJob.cs",
- "ViewState": "AgIAACUAAAAAAAAAAAAAwDoAAAAqAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-02-06T06:29:00.256Z"
- },
- {
- "$type": "Document",
- "DocumentIndex": 3,
+ "DocumentIndex": 8,
"Title": "StockDTO.cs",
"DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_DTO\\Stock\\StockDTO.cs",
"RelativeDocumentMoniker": "WIDESEAWCS_DTO\\Stock\\StockDTO.cs",
"ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_DTO\\Stock\\StockDTO.cs",
"RelativeToolTip": "WIDESEAWCS_DTO\\Stock\\StockDTO.cs",
- "ViewState": "AgIAABwAAAAAAAAAAAA0wCkAAAAOAAAAAAAAAA==",
+ "ViewState": "AgIAAB0AAAAAAAAAAAAQwCkAAAAOAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-02-06T02:48:18.997Z"
},
{
"$type": "Document",
- "DocumentIndex": 4,
+ "DocumentIndex": 7,
"Title": "Dt_RobotTask.cs",
"DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Model\\Models\\TaskInfo\\Dt_RobotTask.cs",
"RelativeDocumentMoniker": "WIDESEAWCS_Model\\Models\\TaskInfo\\Dt_RobotTask.cs",
"ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Model\\Models\\TaskInfo\\Dt_RobotTask.cs",
"RelativeToolTip": "WIDESEAWCS_Model\\Models\\TaskInfo\\Dt_RobotTask.cs",
- "ViewState": "AgIAAEsAAAAAAAAAAAAiwA8AAAARAAAAAAAAAA==",
+ "ViewState": "AgIAABUAAAAAAAAAAAAAACEAAAAiAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-02-05T06:59:50.829Z"
},
{
"$type": "Document",
- "DocumentIndex": 5,
+ "DocumentIndex": 6,
"Title": "RobotTaskService.cs",
"DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_TaskInfoService\\RobotTaskService.cs",
"RelativeDocumentMoniker": "WIDESEAWCS_TaskInfoService\\RobotTaskService.cs",
"ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_TaskInfoService\\RobotTaskService.cs",
"RelativeToolTip": "WIDESEAWCS_TaskInfoService\\RobotTaskService.cs",
- "ViewState": "AgIAADgAAAAAAAAAAAAUwEkAAAB+AAAAAAAAAA==",
+ "ViewState": "AgIAAAAAAAAAAAAAAAAAAEkAAAB+AAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-02-05T06:22:00.192Z"
},
{
"$type": "Document",
- "DocumentIndex": 6,
+ "DocumentIndex": 10,
"Title": "IRobotTaskService.cs",
"DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_ITaskInfoService\\IRobotTaskService.cs",
"RelativeDocumentMoniker": "WIDESEAWCS_ITaskInfoService\\IRobotTaskService.cs",
@@ -133,7 +200,7 @@
"RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\RobotJob\\RobotJob.cs",
"ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\RobotJob\\RobotJob.cs",
"RelativeToolTip": "WIDESEAWCS_Tasks\\RobotJob\\RobotJob.cs",
- "ViewState": "AgIAAAAAAAAAAAAAAAAAAA4AAAAhAAAAAAAAAA==",
+ "ViewState": "AgIAAE0BAAAAAAAAAAAowGIBAAAYAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-02-05T05:38:04.031Z",
"EditorCaption": ""
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/HttpEnum/ConfigKey.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/HttpEnum/ConfigKey.cs
index 280e96d..498a87c 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/HttpEnum/ConfigKey.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/HttpEnum/ConfigKey.cs
@@ -35,7 +35,17 @@
/// <summary>
/// 鎷嗙洏
/// </summary>
- SplitPalletAsync
+ SplitPalletAsync,
+
+ /// <summary>
+ /// 鍒涘缓鍏ュ簱浠诲姟
+ /// </summary>
+ CreateTaskInboundAsync,
+
+ /// <summary>
+ /// 鑾峰彇浠诲姟鍙叆璐т綅
+ /// </summary>
+ GetTasksLocation
#endregion
}
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs
index 2e991fc..217fdf3 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs
@@ -77,4 +77,24 @@
[Description("鏈烘鎵�")]
RobotToManual = 400,
}
+
+ public enum RobotTaskTypeEnum
+ {
+ /// <summary>
+ /// 缁勭洏浠诲姟
+ /// </summary>
+ [Description("缁勭洏浠诲姟")]
+ GroupPallet = 500,
+
+ /// <summary>
+ /// 鎹㈢洏浠诲姟
+ /// </summary>
+ [Description("鎹㈢洏浠诲姟")]
+ ChangePallet = 510,
+
+ /// <summary>
+ /// 鎷嗙洏浠诲姟
+ /// </summary>
+ SplitPallet = 520
+ }
}
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/Http/HttpRequestHelper.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/Http/HttpRequestHelper.cs
index 74e4acf..62203ce 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/Http/HttpRequestHelper.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/Http/HttpRequestHelper.cs
@@ -1,5 +1,6 @@
using SqlSugar;
using System.Text;
+using System.Text.Json;
using WIDESEAWCS_Code;
using WIDESEAWCS_Core.Helper;
@@ -166,17 +167,29 @@
/// <summary>
/// 按配置分类发送GET请求
/// </summary>
- public static Task<string> HTTPGetAsync(string category, string? requestContent, string? configKey, int timeOut = 60)
+ public static async Task<WebResponseContent> HTTPGetAsync(string category, string? requestContent, string? configKey, int timeOut = 60)
{
- return SendAsync(requestContent, HttpMethod.Get, category, configKey, "application/json", timeOut);
+ if (string.IsNullOrWhiteSpace(category) || string.IsNullOrWhiteSpace(requestContent) || string.IsNullOrWhiteSpace(configKey))
+ {
+ throw new ArgumentException("传入配置不能为空", nameof(category));
+ }
+ WebResponseContent content = new WebResponseContent();
+ string result = await SendAsync(requestContent, HttpMethod.Get, category, configKey, "application/json", timeOut);
+ return content = JsonSerializer.Deserialize<WebResponseContent>(result) ?? new WebResponseContent { Status = false, Message = "解析响应失败" };
}
/// <summary>
/// 按配置分类发送POST请求
/// </summary>
- public static Task<string> HTTPPostAsync(string category, string? requestContent, string? configKey, int timeOut = 60)
+ public static async Task<WebResponseContent> HTTPPostAsync(string category, string? requestContent, string? configKey, int timeOut = 60)
{
- return SendAsync(requestContent, HttpMethod.Post, category, configKey, "application/json", timeOut);
+ if (string.IsNullOrWhiteSpace(category) || string.IsNullOrWhiteSpace(requestContent) || string.IsNullOrWhiteSpace(configKey))
+ {
+ throw new ArgumentException("传入配置不能为空", nameof(category));
+ }
+ WebResponseContent content = new WebResponseContent();
+ string result = await SendAsync(requestContent, HttpMethod.Post, category, configKey, "application/json", timeOut);
+ return content = JsonSerializer.Deserialize<WebResponseContent>(result) ?? new WebResponseContent { Status = false, Message = "解析响应失败" };
}
}
}
\ No newline at end of file
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs
index c70133d..7df0366 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs
@@ -196,5 +196,13 @@
/// <param name="taskNum">浠诲姟鍙�</param>
/// <returns>杩斿洖澶勭悊缁撴灉</returns>
WebResponseContent RollbackTaskStatusToLast(int taskNum);
+
+
+ /// <summary>
+ /// 鑾峰彇涓庢寚瀹氫换鍔$紪鍙峰叧鑱旂殑浠诲姟銆�
+ /// </summary>
+ /// <param name="taskNum">瑕佽幏鍙栫殑浠诲姟鐨勫敮涓�鏍囪瘑绗︺��</param>
+ /// <returns>琛ㄧず鎸囧畾缂栧彿浠诲姟鐨�<see cref="Dt_Task"/>瀵硅薄锛屽鏋滀笉瀛樺湪璇ヤ换鍔″垯杩斿洖<c>null</c>銆�</returns>
+ public Dt_Task QueryByTaskNum(int taskNum);
}
}
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
index 0a58b09..2c57b09 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -20,10 +20,13 @@
using AutoMapper;
using SqlSugar;
using System.Diagnostics.CodeAnalysis;
+using System.Text.Json;
+using WIDESEAWCS_Common.HttpEnum;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseServices;
using WIDESEAWCS_Core.Enums;
+using WIDESEAWCS_Core.Http;
using WIDESEAWCS_DTO.TaskInfo;
using WIDESEAWCS_ITaskInfoRepository;
using WIDESEAWCS_ITaskInfoService;
@@ -358,10 +361,36 @@
if (task.TaskState == (int)TaskInStatusEnum.Line_InFinish)
{
- Random random = new Random();
+ //Random random = new Random();
+ //task.CurrentAddress = task.NextAddress;
+ //task.NextAddress = $"{random.Next(1, 100).ToString().PadLeft(3, '0')}-{random.Next(1, 100).ToString().PadLeft(3, '0')}-{random.Next(1, 100).ToString().PadLeft(3, '0')}";
+ //task.TargetAddress = task.NextAddress;
+
+ // 璋冪敤WMS绯荤粺鎺ュ彛锛岃幏鍙栨渶缁堢洰鏍囧湴鍧�
+ CreateTaskDto taskDto = new CreateTaskDto()
+ {
+ Roadway = task.TargetAddress,
+ PalletCode = task.PalletCode,
+ SourceAddress = task.SourceAddress,
+ // 鐩爣鍦板潃寰呭畾
+ TargetAddress = "CLOutAreaA",
+ TaskType = task.TaskType,
+ };
+ content = HttpRequestHelper.HTTPPostAsync(nameof(Category.WMS), taskDto.ToString(), nameof(ConfigKey.GetTasksLocation)).Result;
+ if (!content.Status)
+ {
+ return WebResponseContent.Instance.Error($"璋冪敤WMS鎺ュ彛鑾峰彇浠诲姟鐩爣鍦板潃澶辫触,浠诲姟鍙�:銆恵task.TaskNum}銆�,閿欒淇℃伅:銆恵content.Message}銆�");
+ }
+
+ string wmsTargetAddress = content.Data?.ToString() ?? string.Empty;
+ if (string.IsNullOrEmpty(wmsTargetAddress))
+ {
+ return WebResponseContent.Instance.Error($"璋冪敤WMS鎺ュ彛鑾峰彇浠诲姟鐩爣鍦板潃澶辫触,浠诲姟鍙�:銆恵task.TaskNum}銆�,閿欒淇℃伅:銆愭湭鑾峰彇鍒版湁鏁堢殑鐩爣鍦板潃銆�");
+ }
+
+ task.NextAddress = wmsTargetAddress;
+ task.TargetAddress = wmsTargetAddress;
task.CurrentAddress = task.NextAddress;
- task.NextAddress = $"{random.Next(1, 100).ToString().PadLeft(3, '0')}-{random.Next(1, 100).ToString().PadLeft(3, '0')}-{random.Next(1, 100).ToString().PadLeft(3, '0')}";
- task.TargetAddress = task.NextAddress;
}
}
else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OtherGroup)
@@ -627,5 +656,15 @@
else
return BaseDal.QueryFirst(x => x.Roadway == deviceNo && TaskRobotTypes.Contains(x.TaskType) && x.CurrentAddress == currentAddress && x.TaskState <= (int)TaskRobotStatusEnum.RobotExecuting, TaskOrderBy);
}
+
+ /// <summary>
+ /// 鑾峰彇涓庢寚瀹氫换鍔$紪鍙峰叧鑱旂殑浠诲姟銆�
+ /// </summary>
+ /// <param name="taskNum">瑕佽幏鍙栫殑浠诲姟鐨勫敮涓�鏍囪瘑绗︺��</param>
+ /// <returns>琛ㄧず鎸囧畾缂栧彿浠诲姟鐨�<see cref="Dt_Task"/>瀵硅薄锛屽鏋滀笉瀛樺湪璇ヤ换鍔″垯杩斿洖<c>null</c>銆�</returns>
+ public Dt_Task QueryByTaskNum(int taskNum)
+ {
+ return BaseDal.QueryFirst(x => x.TaskNum == taskNum);
+ }
}
}
\ No newline at end of file
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotJob.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotJob.cs
index 6a945d5..d780e0b 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotJob.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotJob.cs
@@ -25,15 +25,19 @@
private readonly TcpSocketServer _TcpSocket;
private static readonly ConcurrentDictionary<string, RobotSocketState> _socketStates = new();
private static int _eventSubscribedFlag;
- private readonly IRobotTaskService _taskService;
+
+
+ private readonly ITaskService _taskService;
+ private readonly IRobotTaskService _robottaskService;
private readonly ITaskExecuteDetailService _taskExecuteDetailService;
private readonly ITaskRepository _taskRepository;
private readonly IRouterService _routerService;
- public RobotJob(TcpSocketServer TcpSocket, IRobotTaskService taskService)
+ public RobotJob(TcpSocketServer TcpSocket, IRobotTaskService RobottaskService, ITaskService TaskService)
{
_TcpSocket = TcpSocket;
- _taskService = taskService;
+ _robottaskService = RobottaskService;
+ this._taskService = TaskService;
}
public async Task Execute(IJobExecutionContext context)
@@ -133,7 +137,7 @@
WebResponseContent content = new WebResponseContent();
string messageLower = message.ToLowerInvariant();
- if (IsSimpleCommand(messageLower, state))
+ if (await IsSimpleCommandAsync(messageLower, state))
{
return null;
}
@@ -174,7 +178,8 @@
state.LastPickPositions = positions;
var result = await HttpRequestHelper.HTTPPostAsync(nameof(Category.WMS), stockDTO.ToJsonString(), state.CurrentTask?.RobotTaskType == 2 ? nameof(ConfigKey.ChangePalletAsync) : nameof(ConfigKey.SplitPalletAsync));
- content = JsonConvert.DeserializeObject<WebResponseContent>(result);
+ WebResponseContent? contentNullable = JsonConvert.DeserializeObject<WebResponseContent>(result);
+ content = contentNullable ?? new WebResponseContent();
if (content.Status)
{
@@ -205,7 +210,8 @@
.ToList()
};
var result = await HttpRequestHelper.HTTPPostAsync(nameof(Category.WMS), stockDTO.ToJsonString(), nameof(ConfigKey.GroupPalletAsync));
- content = JsonConvert.DeserializeObject<WebResponseContent>(result);
+ WebResponseContent? contentNullable = JsonConvert.DeserializeObject<WebResponseContent>(result);
+ content = contentNullable ?? new WebResponseContent();
if (content.Status)
{
@@ -229,7 +235,7 @@
/// <param name="message"></param>
/// <param name="state"></param>
/// <returns></returns>
- private bool IsSimpleCommand(string message, RobotSocketState state)
+ private async Task<bool> IsSimpleCommandAsync(string message, RobotSocketState state)
{
switch (message)
{
@@ -253,7 +259,7 @@
state.CurrentAction = "AllPickFinished";
if (state.CurrentTask?.RobotTaskType == 2 || state.CurrentTask?.RobotTaskType == 3)
{
- // TODO 鏈烘鎵嬪彇璐у畬鎴愶紝鍒ゆ柇鏄惁鎹㈢洏銆佹媶鐩樹换鍔★紝鍒涘缓绌烘墭鐩樺洖搴撲换鍔�
+ await HandleInboundTaskAsync(state, useSourceAddress: true);
}
return true;
@@ -261,17 +267,7 @@
state.CurrentAction = "AllPutFinished";
if (state.CurrentTask?.RobotTaskType == 1)
{
- // TODO 鏈烘鎵嬪彇璐у畬鎴愶紝鍒ゆ柇鏄惁缁勭洏浠诲姟锛屽垱寤虹粍鐩樺叆搴撲换鍔�
- CreateTaskDto taskDto = new CreateTaskDto()
- {
- PalletCode = state.CurrentTask?.RobotTargetAddressPalletCode ?? string.Empty,
- SourceAddress = state.CurrentTask?.RobotTargetAddress ?? string.Empty,
- TargetAddress = state.CurrentTask?.RobotTargetAddress ?? string.Empty,
- Roadway = state.CurrentTask?.RobotRoadway == "1" ? "GWSC001" : state.CurrentTask?.RobotRoadway == "2" ? "HCSC001" : "SC001" ?? string.Empty,
- WarehouseId = state.CurrentTask?.RobotRoadway == "1" ? 1 : state.CurrentTask?.RobotRoadway == "2" ? 2 : 3,
- PalletType = 1,
- TaskType = 4
- };
+ await HandleInboundTaskAsync(state, useSourceAddress: false);
}
return true;
@@ -320,6 +316,53 @@
}
}
+ private async Task HandleInboundTaskAsync(RobotSocketState state, bool useSourceAddress)
+ {
+ var currentTask = state.CurrentTask;
+ if (currentTask == null)
+ {
+ return;
+ }
+
+ string roadway = currentTask.RobotRoadway == "1" ? "GWSC001" : currentTask.RobotRoadway == "2" ? "HCSC001" : "SC001";
+ int warehouseId = currentTask.RobotRoadway == "1" ? 1 : currentTask.RobotRoadway == "2" ? 2 : 3;
+
+ CreateTaskDto taskDto = new CreateTaskDto
+ {
+ PalletCode = currentTask.RobotTargetAddressPalletCode ?? string.Empty,
+ SourceAddress = currentTask.RobotTargetAddress ?? string.Empty,
+ TargetAddress = currentTask.RobotTargetAddress ?? string.Empty,
+ Roadway = roadway,
+ WarehouseId = warehouseId,
+ PalletType = 1,
+ TaskType = 4
+ };
+
+ var result = await HttpRequestHelper.HTTPPostAsync(nameof(Category.WMS), taskDto.ToJsonString(), nameof(ConfigKey.CreateTaskInboundAsync));
+ WebResponseContent content = JsonConvert.DeserializeObject<WebResponseContent>(result) ?? new WebResponseContent();
+ if (!content.Status)
+ {
+ return;
+ }
+
+ WMSTaskDTO taskDTO = JsonConvert.DeserializeObject<WMSTaskDTO>(content.Data.ToString() ?? string.Empty) ?? new WMSTaskDTO();
+ content = _taskService.ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO });
+ if (!content.Status)
+ {
+ return;
+ }
+
+ var taskInfo = _taskService.QueryByTaskNum(taskDTO.TaskNum);
+
+
+ string targetAddress = useSourceAddress ? taskDTO.SourceAddress : taskDTO.TargetAddress;
+
+ IDevice? device = Storage.Devices.Where(x => x.DeviceProDTOs.Select(x => x.DeviceChildCode == taskDTO.SourceAddress).FirstOrDefault()).FirstOrDefault() ?? null;
+ device?.Communicator.Write(nameof(ConveyorLineDBNameNew.Target), taskInfo.NextAddress);
+ device?.Communicator.Write(nameof(ConveyorLineDBNameNew.TaskNo), taskDTO.TaskNum);
+ device?.Communicator.Write(nameof(ConveyorLineDBNameNew.WCS_STB), 1);
+ }
+
/// <summary>
/// 鏈烘鎵嬪墠缂�鍛戒护澶勭悊
/// </summary>
@@ -332,7 +375,7 @@
private Dt_RobotTask? GetTask(RobotCraneDevice robotCrane)
{
- return _taskService.QueryRobotCraneTask(robotCrane.DeviceCode);
+ return _robottaskService.QueryRobotCraneTask(robotCrane.DeviceCode);
}
}
diff --git a/Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1091.29919/CodeChunks.db b/Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1091.29919/CodeChunks.db
deleted file mode 100644
index 1faddc8..0000000
--- a/Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1091.29919/CodeChunks.db
+++ /dev/null
Binary files differ
diff --git a/Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1091.29919/SemanticSymbols.db b/Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1091.29919/SemanticSymbols.db
deleted file mode 100644
index 5ac2250..0000000
--- a/Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1091.29919/SemanticSymbols.db
+++ /dev/null
Binary files differ
diff --git a/Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/18.0.988.22099/CodeChunks.db b/Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/18.0.988.22099/CodeChunks.db
index de9ed6f..e936d6c 100644
--- a/Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/18.0.988.22099/CodeChunks.db
+++ b/Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/18.0.988.22099/CodeChunks.db
Binary files differ
diff --git a/Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/18.0.988.22099/SemanticSymbols.db b/Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/18.0.988.22099/SemanticSymbols.db
index 9a06436..7548873 100644
--- a/Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/18.0.988.22099/SemanticSymbols.db
+++ b/Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/18.0.988.22099/SemanticSymbols.db
Binary files differ
diff --git a/Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v18/DocumentLayout.backup.json b/Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v18/DocumentLayout.backup.json
index d9fda16..8a6c6b9 100644
--- a/Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v18/DocumentLayout.backup.json
+++ b/Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v18/DocumentLayout.backup.json
@@ -3,16 +3,16 @@
"WorkspaceRootPath": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\",
"Documents": [
{
- "AbsoluteMoniker": "D:0:0:{111BD7AA-9749-4506-9772-79F9EF14754C}|WIDESEA_Core\\WIDESEA_Core.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_core\\basecontroller\\apibasecontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{111BD7AA-9749-4506-9772-79F9EF14754C}|WIDESEA_Core\\WIDESEA_Core.csproj|solutionrelative:widesea_core\\basecontroller\\apibasecontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+ "AbsoluteMoniker": "D:0:0:{7D7534D4-51D9-46DC-A6B7-6430042F4E12}|WIDESEA_TaskInfoService\\WIDESEA_TaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "RelativeMoniker": "D:0:0:{7D7534D4-51D9-46DC-A6B7-6430042F4E12}|WIDESEA_TaskInfoService\\WIDESEA_TaskInfoService.csproj|solutionrelative:widesea_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+ },
+ {
+ "AbsoluteMoniker": "D:0:0:{D81A65B5-47D1-40C1-8FDE-7D24FF003F51}|WIDESEA_WMSServer\\WIDESEA_WMSServer.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_wmsserver\\controllers\\taskinfo\\taskcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "RelativeMoniker": "D:0:0:{D81A65B5-47D1-40C1-8FDE-7D24FF003F51}|WIDESEA_WMSServer\\WIDESEA_WMSServer.csproj|solutionrelative:widesea_wmsserver\\controllers\\taskinfo\\taskcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{929DF936-042C-4EEC-8722-A831FC2F0AEA}|WIDESEA_DTO\\WIDESEA_DTO.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_dto\\task\\createtaskdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{929DF936-042C-4EEC-8722-A831FC2F0AEA}|WIDESEA_DTO\\WIDESEA_DTO.csproj|solutionrelative:widesea_dto\\task\\createtaskdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{7D7534D4-51D9-46DC-A6B7-6430042F4E12}|WIDESEA_TaskInfoService\\WIDESEA_TaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{7D7534D4-51D9-46DC-A6B7-6430042F4E12}|WIDESEA_TaskInfoService\\WIDESEA_TaskInfoService.csproj|solutionrelative:widesea_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{CE0DB91F-5A68-448E-A419-4C26B5039F51}|WIDESEA_ITaskInfoService\\WIDESEA_ITaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_itaskinfoservice\\itaskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
@@ -38,7 +38,7 @@
"DocumentGroups": [
{
"DockedWidth": 200,
- "SelectedChildIndex": 3,
+ "SelectedChildIndex": 6,
"Children": [
{
"$type": "Bookmark",
@@ -54,26 +54,25 @@
},
{
"$type": "Document",
- "DocumentIndex": 0,
- "Title": "ApiBaseController.cs",
- "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_Core\\BaseController\\ApiBaseController.cs",
- "RelativeDocumentMoniker": "WIDESEA_Core\\BaseController\\ApiBaseController.cs",
- "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_Core\\BaseController\\ApiBaseController.cs",
- "RelativeToolTip": "WIDESEA_Core\\BaseController\\ApiBaseController.cs",
- "ViewState": "AgIAABEAAAAAAAAAAADwvx8AAAA7AAAAAAAAAA==",
+ "DocumentIndex": 1,
+ "Title": "TaskController.cs",
+ "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_WMSServer\\Controllers\\TaskInfo\\TaskController.cs",
+ "RelativeDocumentMoniker": "WIDESEA_WMSServer\\Controllers\\TaskInfo\\TaskController.cs",
+ "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_WMSServer\\Controllers\\TaskInfo\\TaskController.cs",
+ "RelativeToolTip": "WIDESEA_WMSServer\\Controllers\\TaskInfo\\TaskController.cs",
+ "ViewState": "AgIAAAAAAAAAAAAAAAAAABwAAAAfAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-02-08T08:20:56.818Z",
- "EditorCaption": ""
+ "WhenOpened": "2026-02-09T01:23:19.844Z"
},
{
"$type": "Document",
- "DocumentIndex": 1,
+ "DocumentIndex": 2,
"Title": "CreateTaskDto.cs",
"DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_DTO\\Task\\CreateTaskDto.cs",
"RelativeDocumentMoniker": "WIDESEA_DTO\\Task\\CreateTaskDto.cs",
"ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_DTO\\Task\\CreateTaskDto.cs",
"RelativeToolTip": "WIDESEA_DTO\\Task\\CreateTaskDto.cs",
- "ViewState": "AgIAAA0AAAAAAAAAAAAqwBoAAAArAAAAAAAAAA==",
+ "ViewState": "AgIAAAYAAAAAAAAAAAAuwA4AAAARAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-02-06T07:58:13.932Z"
},
@@ -85,21 +84,22 @@
"RelativeDocumentMoniker": "WIDESEA_ITaskInfoService\\ITaskService.cs",
"ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_ITaskInfoService\\ITaskService.cs",
"RelativeToolTip": "WIDESEA_ITaskInfoService\\ITaskService.cs",
- "ViewState": "AgIAABIAAAAAAAAAAAAAACkAAABFAAAAAAAAAA==",
+ "ViewState": "AgIAAAAAAAAAAAAAAAAAACkAAAAXAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-02-06T07:00:19.697Z"
},
{
"$type": "Document",
- "DocumentIndex": 2,
+ "DocumentIndex": 0,
"Title": "TaskService.cs",
"DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_TaskInfoService\\TaskService.cs",
"RelativeDocumentMoniker": "WIDESEA_TaskInfoService\\TaskService.cs",
"ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_TaskInfoService\\TaskService.cs",
"RelativeToolTip": "WIDESEA_TaskInfoService\\TaskService.cs",
- "ViewState": "AgIAADUAAAAAAAAAAAAQwEMAAAA6AAAAAAAAAA==",
+ "ViewState": "AgIAAEAAAAAAAAAAAAAQwEoAAAA4AAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-02-06T06:34:59.734Z"
+ "WhenOpened": "2026-02-06T06:34:59.734Z",
+ "EditorCaption": ""
},
{
"$type": "Document",
@@ -133,7 +133,7 @@
"RelativeDocumentMoniker": "WIDESEA_StockService\\StockSerivce.cs",
"ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_StockService\\StockSerivce.cs",
"RelativeToolTip": "WIDESEA_StockService\\StockSerivce.cs",
- "ViewState": "AgIAADoAAAAAAAAAAAAQwEoAAAAOAAAAAAAAAA==",
+ "ViewState": "AgIAAPUAAAAAAAAAAAAAwEUAAAAyAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-02-06T01:53:49.077Z"
}
diff --git a/Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v18/DocumentLayout.json b/Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v18/DocumentLayout.json
index 3699469..cf03539 100644
--- a/Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v18/DocumentLayout.json
+++ b/Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v18/DocumentLayout.json
@@ -3,24 +3,28 @@
"WorkspaceRootPath": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\",
"Documents": [
{
- "AbsoluteMoniker": "D:0:0:{111BD7AA-9749-4506-9772-79F9EF14754C}|WIDESEA_Core\\WIDESEA_Core.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_core\\basecontroller\\apibasecontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{111BD7AA-9749-4506-9772-79F9EF14754C}|WIDESEA_Core\\WIDESEA_Core.csproj|solutionrelative:widesea_core\\basecontroller\\apibasecontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+ "AbsoluteMoniker": "D:0:0:{7D7534D4-51D9-46DC-A6B7-6430042F4E12}|WIDESEA_TaskInfoService\\WIDESEA_TaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "RelativeMoniker": "D:0:0:{7D7534D4-51D9-46DC-A6B7-6430042F4E12}|WIDESEA_TaskInfoService\\WIDESEA_TaskInfoService.csproj|solutionrelative:widesea_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+ },
+ {
+ "AbsoluteMoniker": "D:0:0:{7DC26D42-D8EE-46F0-BA66-A13457086885}|WIDESEA_StockService\\WIDESEA_StockService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_stockservice\\stockserivce.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "RelativeMoniker": "D:0:0:{7DC26D42-D8EE-46F0-BA66-A13457086885}|WIDESEA_StockService\\WIDESEA_StockService.csproj|solutionrelative:widesea_stockservice\\stockserivce.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+ },
+ {
+ "AbsoluteMoniker": "D:0:0:{00CE9885-9F24-4B6C-A7E8-0DE8C9ED7128}|WIDESEA_Model\\WIDESEA_Model.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_model\\models\\stock\\dt_stockinfo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "RelativeMoniker": "D:0:0:{00CE9885-9F24-4B6C-A7E8-0DE8C9ED7128}|WIDESEA_Model\\WIDESEA_Model.csproj|solutionrelative:widesea_model\\models\\stock\\dt_stockinfo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{929DF936-042C-4EEC-8722-A831FC2F0AEA}|WIDESEA_DTO\\WIDESEA_DTO.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_dto\\task\\createtaskdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{929DF936-042C-4EEC-8722-A831FC2F0AEA}|WIDESEA_DTO\\WIDESEA_DTO.csproj|solutionrelative:widesea_dto\\task\\createtaskdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
- "AbsoluteMoniker": "D:0:0:{7D7534D4-51D9-46DC-A6B7-6430042F4E12}|WIDESEA_TaskInfoService\\WIDESEA_TaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{7D7534D4-51D9-46DC-A6B7-6430042F4E12}|WIDESEA_TaskInfoService\\WIDESEA_TaskInfoService.csproj|solutionrelative:widesea_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+ "AbsoluteMoniker": "D:0:0:{D81A65B5-47D1-40C1-8FDE-7D24FF003F51}|WIDESEA_WMSServer\\WIDESEA_WMSServer.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_wmsserver\\controllers\\taskinfo\\taskcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+ "RelativeMoniker": "D:0:0:{D81A65B5-47D1-40C1-8FDE-7D24FF003F51}|WIDESEA_WMSServer\\WIDESEA_WMSServer.csproj|solutionrelative:widesea_wmsserver\\controllers\\taskinfo\\taskcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{CE0DB91F-5A68-448E-A419-4C26B5039F51}|WIDESEA_ITaskInfoService\\WIDESEA_ITaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_itaskinfoservice\\itaskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{CE0DB91F-5A68-448E-A419-4C26B5039F51}|WIDESEA_ITaskInfoService\\WIDESEA_ITaskInfoService.csproj|solutionrelative:widesea_itaskinfoservice\\itaskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{7DC26D42-D8EE-46F0-BA66-A13457086885}|WIDESEA_StockService\\WIDESEA_StockService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_stockservice\\stockserivce.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{7DC26D42-D8EE-46F0-BA66-A13457086885}|WIDESEA_StockService\\WIDESEA_StockService.csproj|solutionrelative:widesea_stockservice\\stockserivce.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{49716D78-720D-475D-948C-0FC6C5F079E5}|WIDESEA_IStockService\\WIDESEA_IStockService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_istockservice\\istockservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
@@ -38,8 +42,21 @@
"DocumentGroups": [
{
"DockedWidth": 200,
- "SelectedChildIndex": 2,
+ "SelectedChildIndex": 6,
"Children": [
+ {
+ "$type": "Document",
+ "DocumentIndex": 2,
+ "Title": "Dt_StockInfo.cs",
+ "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_Model\\Models\\Stock\\Dt_StockInfo.cs",
+ "RelativeDocumentMoniker": "WIDESEA_Model\\Models\\Stock\\Dt_StockInfo.cs",
+ "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_Model\\Models\\Stock\\Dt_StockInfo.cs",
+ "RelativeToolTip": "WIDESEA_Model\\Models\\Stock\\Dt_StockInfo.cs",
+ "ViewState": "AgIAACYAAAAAAAAAAAAQwDIAAAAeAAAAAAAAAA==",
+ "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
+ "WhenOpened": "2026-02-11T01:12:04.794Z",
+ "EditorCaption": ""
+ },
{
"$type": "Bookmark",
"Name": "ST:128:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
@@ -50,56 +67,58 @@
},
{
"$type": "Document",
- "DocumentIndex": 0,
- "Title": "ApiBaseController.cs",
- "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_Core\\BaseController\\ApiBaseController.cs",
- "RelativeDocumentMoniker": "WIDESEA_Core\\BaseController\\ApiBaseController.cs",
- "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_Core\\BaseController\\ApiBaseController.cs",
- "RelativeToolTip": "WIDESEA_Core\\BaseController\\ApiBaseController.cs",
- "ViewState": "AgIAABEAAAAAAAAAAADwvyAAAAAIAAAAAAAAAA==",
+ "DocumentIndex": 4,
+ "Title": "TaskController.cs",
+ "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_WMSServer\\Controllers\\TaskInfo\\TaskController.cs",
+ "RelativeDocumentMoniker": "WIDESEA_WMSServer\\Controllers\\TaskInfo\\TaskController.cs",
+ "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_WMSServer\\Controllers\\TaskInfo\\TaskController.cs",
+ "RelativeToolTip": "WIDESEA_WMSServer\\Controllers\\TaskInfo\\TaskController.cs",
+ "ViewState": "AgIAAAAAAAAAAAAAAAAAABwAAAAfAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-02-08T08:20:56.818Z",
- "EditorCaption": ""
+ "WhenOpened": "2026-02-09T01:23:19.844Z"
},
{
"$type": "Document",
- "DocumentIndex": 1,
+ "DocumentIndex": 3,
"Title": "CreateTaskDto.cs",
"DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_DTO\\Task\\CreateTaskDto.cs",
"RelativeDocumentMoniker": "WIDESEA_DTO\\Task\\CreateTaskDto.cs",
"ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_DTO\\Task\\CreateTaskDto.cs",
"RelativeToolTip": "WIDESEA_DTO\\Task\\CreateTaskDto.cs",
- "ViewState": "AgIAAA0AAAAAAAAAAAAqwBoAAAArAAAAAAAAAA==",
+ "ViewState": "AgIAABUAAAAAAAAAAAAAAA4AAAARAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-02-06T07:58:13.932Z"
+ "WhenOpened": "2026-02-06T07:58:13.932Z",
+ "EditorCaption": ""
},
{
"$type": "Document",
- "DocumentIndex": 3,
+ "DocumentIndex": 5,
"Title": "ITaskService.cs",
"DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_ITaskInfoService\\ITaskService.cs",
"RelativeDocumentMoniker": "WIDESEA_ITaskInfoService\\ITaskService.cs",
"ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_ITaskInfoService\\ITaskService.cs",
"RelativeToolTip": "WIDESEA_ITaskInfoService\\ITaskService.cs",
- "ViewState": "AgIAABIAAAAAAAAAAAAAACkAAABFAAAAAAAAAA==",
+ "ViewState": "AgIAACsAAAAAAAAAAIBHwCkAAAAXAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-02-06T07:00:19.697Z"
+ "WhenOpened": "2026-02-06T07:00:19.697Z",
+ "EditorCaption": ""
},
{
"$type": "Document",
- "DocumentIndex": 2,
+ "DocumentIndex": 0,
"Title": "TaskService.cs",
"DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_TaskInfoService\\TaskService.cs",
"RelativeDocumentMoniker": "WIDESEA_TaskInfoService\\TaskService.cs",
"ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_TaskInfoService\\TaskService.cs",
"RelativeToolTip": "WIDESEA_TaskInfoService\\TaskService.cs",
- "ViewState": "AgIAADUAAAAAAAAAAAAQwEMAAAA6AAAAAAAAAA==",
+ "ViewState": "AgIAAGQAAAAAAAAAAAApwIsAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-02-06T06:34:59.734Z"
+ "WhenOpened": "2026-02-06T06:34:59.734Z",
+ "EditorCaption": ""
},
{
"$type": "Document",
- "DocumentIndex": 6,
+ "DocumentIndex": 7,
"Title": "StockDTO.cs",
"DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_DTO\\Stock\\StockDTO.cs",
"RelativeDocumentMoniker": "WIDESEA_DTO\\Stock\\StockDTO.cs",
@@ -111,7 +130,7 @@
},
{
"$type": "Document",
- "DocumentIndex": 5,
+ "DocumentIndex": 6,
"Title": "IStockService.cs",
"DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_IStockService\\IStockService.cs",
"RelativeDocumentMoniker": "WIDESEA_IStockService\\IStockService.cs",
@@ -123,15 +142,16 @@
},
{
"$type": "Document",
- "DocumentIndex": 4,
+ "DocumentIndex": 1,
"Title": "StockSerivce.cs",
"DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_StockService\\StockSerivce.cs",
"RelativeDocumentMoniker": "WIDESEA_StockService\\StockSerivce.cs",
"ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_StockService\\StockSerivce.cs",
"RelativeToolTip": "WIDESEA_StockService\\StockSerivce.cs",
- "ViewState": "AgIAADoAAAAAAAAAAAAQwEoAAAAOAAAAAAAAAA==",
+ "ViewState": "AgIAAAkAAAAAAAAAAAAkwI8AAAAzAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-02-06T01:53:49.077Z"
+ "WhenOpened": "2026-02-06T01:53:49.077Z",
+ "EditorCaption": ""
}
]
}
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs
index 16c743a..a2eedf1 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs
@@ -153,5 +153,72 @@
return WebResponseContent.Instance.Error(ex.Message);
}
}
+
+
+
+ /// <summary>
+ /// 鑾峰彇绌洪棽璐т綅淇℃伅(鏍规嵁宸烽亾鏌ヨ)
+ /// </summary>
+ /// <param name="RoadwayNo">宸烽亾</param>
+ /// <returns></returns>
+ public async Task<Dt_LocationInfo?> GetLocationInfo(string RoadwayNo)
+ {
+ try
+ {
+ var locations = await BaseDal.QueryDataAsync(x => x.EnableStatus == EnableStatusEnum.Normal.GetHashCode() && x.RoadwayNo == RoadwayNo && x.LocationStatus == LocationStatusEnum.Free.GetHashCode());
+
+ if (locations == null || locations.Count == 0)
+ {
+ return null;
+ }
+
+ return locations.OrderBy(x => x.Layer).ThenBy(x => x.Depth).ThenBy(x => x.Column).ThenBy(x => x.Row).FirstOrDefault();
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
+ /// <summary>
+ /// 鑾峰彇绌洪棽璐т綅淇℃伅(鏍规嵁宸烽亾鏌ヨ)
+ /// </summary>
+ /// <param name="RoadwayNo">宸烽亾</param>
+ /// <returns></returns>
+ public async Task<Dt_LocationInfo?> GetLocationInfo(string RoadwayNo,string locationCode)
+ {
+ try
+ {
+ var locations = await BaseDal.QueryFirstAsync(x => x.RoadwayNo == RoadwayNo && x.LocationCode == locationCode);
+
+ if (locations == null)
+ {
+ return null;
+ }
+
+ return locations;
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
+ /// <summary>
+ /// 鏇存柊璐т綅淇℃伅
+ /// </summary>
+ /// <param name="locationInfo"></param>
+ /// <returns></returns>
+ public async Task<bool> UpdateLocationInfoAsync(Dt_LocationInfo locationInfo)
+ {
+ try
+ {
+ return await BaseDal.UpdateDataAsync(locationInfo);
+ }
+ catch (Exception)
+ {
+ return false;
+ }
+ }
}
}
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs
index e9f0459..c418fde 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs
@@ -51,5 +51,26 @@
/// <param name="initializationLocationDTO"></param>
/// <returns></returns>
WebResponseContent InitializationLocation(InitializationLocationDTO initializationLocationDTO);
+
+ /// <summary>
+ /// 鑾峰彇绌洪棽璐т綅淇℃伅
+ /// </summary>
+ /// <param name="RoadwayNo">宸烽亾</param>
+ /// <returns></returns>
+ public Task<Dt_LocationInfo?> GetLocationInfo(string RoadwayNo);
+
+ /// <summary>
+ /// 鏇存柊璐т綅淇℃伅
+ /// </summary>
+ /// <param name="locationInfo"></param>
+ /// <returns></returns>
+ public Task<bool> UpdateLocationInfoAsync(Dt_LocationInfo locationInfo);
+
+ /// <summary>
+ /// 鑾峰彇绌洪棽璐т綅淇℃伅(鏍规嵁宸烽亾鍜岃揣浣嶅彿鏌ヨ)
+ /// </summary>
+ /// <param name="RoadwayNo">宸烽亾</param>
+ /// <returns></returns>
+ public Task<Dt_LocationInfo?> GetLocationInfo(string RoadwayNo, string locationCode);
}
}
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs
index 102691d..d542082 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs
@@ -7,5 +7,32 @@
public interface IStockInfoService : IService<Dt_StockInfo>
{
IRepository<Dt_StockInfo> Repository { get; }
+
+ /// <summary>
+ /// 鑾峰彇搴撳瓨淇℃伅鍒楄〃锛堝嚭搴撴棩鏈熷皬浜庡綋鍓嶆椂闂翠笖搴撳瓨鐘舵�佷负鍏ュ簱瀹屾垚鐨勮褰曪級
+ /// </summary>
+ /// <returns></returns>
+ public Task<List<Dt_StockInfo>> GetStockInfoAsync();
+
+ /// <summary>
+ /// 鑾峰彇搴撳瓨淇℃伅鍒楄〃锛堝嚭搴撴棩鏈熷皬浜庡綋鍓嶆椂闂翠笖搴撳瓨鐘舵�佷负鍏ュ簱瀹屾垚鐨勮褰曪紝涓斾粨搴揑D鍖归厤锛�
+ /// </summary>
+ /// <param name="WarehouseId"></param>
+ /// <returns></returns>
+ public Task<List<Dt_StockInfo>> GetStockInfoAsync(int WarehouseId);
+
+ /// <summary>
+ /// 鑾峰彇搴撳瓨淇℃伅锛堟牴鎹墭鐩樼爜鏌ヨ锛�
+ /// </summary>
+ /// <param name="PalletCode"></param>
+ /// <returns></returns>
+ public Task<Dt_StockInfo> GetStockInfoAsync(string PalletCode);
+
+ /// <summary>
+ /// 鏇存柊搴撳瓨鏁版嵁
+ /// </summary>
+ /// <param name="stockInfo"></param>
+ /// <returns></returns>
+ public Task<bool> UpdateStockAsync(Dt_StockInfo stockInfo);
}
}
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs
index ec7168b..4a948b7 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs
@@ -39,6 +39,26 @@
{
IRepository<Dt_Task> Repository { get; }
- Task<Dt_Task?> CreateTaskInboundAsync(CreateTaskDto taskDto);
+ /// <summary>
+ /// 鍒涘缓浠诲姟锛堢粍鐩樺叆搴撲换鍔°�佺┖鎵樼洏鍥炲簱浠诲姟锛�
+ /// </summary>
+ /// <param name="taskDto">瑕佸垱寤虹殑鍑哄簱浠诲姟鐨勮缁嗕俊鎭�備笉鑳戒负null銆�</param>
+ /// <returns>鏄惁鎴愬姛</returns>
+ Task<WebResponseContent> CreateTaskInboundAsync(CreateTaskDto taskDto);
+
+ /// <summary>
+ /// 鏍规嵁鎸囧畾鐨勪换鍔¤鎯呭紓姝ュ垱寤烘柊鐨勫嚭搴撲换鍔°��
+ /// </summary>
+ /// <param name="taskDto">瑕佸垱寤虹殑鍑哄簱浠诲姟鐨勮缁嗕俊鎭�備笉鑳戒负null銆�</param>
+ /// <returns>琛ㄧず寮傛鎿嶄綔鐨勪换鍔°�備换鍔�
+ Task<WebResponseContent> CreateTaskOutboundAsync(CreateTaskDto taskDto);
+
+ /// <summary>
+ /// 鑾峰彇鍙叆搴撹揣浣�
+ /// </summary>
+ /// <param name="warehouseId"></param>
+ /// <param name="taskType"></param>
+ /// <returns></returns>
+ public Task<WebResponseContent> GetTasksLocationAsync(CreateTaskDto taskDto);
}
}
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo.cs
index 85fea92..c54b4fa 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo.cs
@@ -1,4 +1,5 @@
-锘縰sing SqlSugar;
+锘縰sing Magicodes.ExporterAndImporter.Core;
+using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -35,6 +36,12 @@
/// <summary>
/// 璐т綅缂栧彿
/// </summary>
+ [SugarColumn(IsNullable = true, ColumnDescription = "璐т綅ID")]
+ public int LocationId { get; set; }
+
+ /// <summary>
+ /// 璐т綅缂栧彿
+ /// </summary>
[SugarColumn(IsNullable = true, Length = 30, ColumnDescription = "璐т綅缂栧彿")]
public string LocationCode { get; set; }
@@ -57,9 +64,22 @@
public string Remark { get; set; }
/// <summary>
- /// 搴撳瓨鏄庣粏
+ /// 鍑哄簱鏃ユ湡
/// </summary>
- [Navigate(NavigateType.OneToMany, nameof(Dt_StockInfoDetail.StockId), nameof(Id))]
+ [SugarColumn(IsNullable = true, ColumnDescription = "鍑哄簱鏃ユ湡")]
+ public DateTime OutboundDate { get; set; }
+
+ /// <summary>
+ /// 搴撳瓨鏄庣粏
+ /// </summary>
+ [Navigate(NavigateType.OneToMany, nameof(Dt_StockInfoDetail.StockId), nameof(Id))]
public List<Dt_StockInfoDetail> Details { get; set; }
+
+ /// <summary>
+ /// 璐т綅鏄庣粏
+ /// </summary>
+ [SugarColumn(ColumnName = "LocationDetails")]
+ [Navigate(NavigateType.OneToOne, nameof(LocationId), nameof(Dt_LocationInfo.Id))]
+ public Dt_LocationInfo LocationDetails { get; set; }
}
}
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs
index 339d933..31d8b0d 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs
@@ -1,4 +1,5 @@
锘縰sing AutoMapper;
+using WIDESEA_Common.StockEnum;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.BaseServices;
using WIDESEA_IStockService;
@@ -17,5 +18,43 @@
_mapper = mapper;
}
+ /// <summary>
+ /// 鑾峰彇搴撳瓨淇℃伅鍒楄〃锛堝嚭搴撴棩鏈熷皬浜庡綋鍓嶆椂闂翠笖搴撳瓨鐘舵�佷负鍏ュ簱瀹屾垚鐨勮褰曪級
+ /// </summary>
+ /// <returns></returns>
+ public async Task<List<Dt_StockInfo>> GetStockInfoAsync()
+ {
+ return await BaseDal.QueryDataAsync(x => x.OutboundDate < DateTime.Now && x.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.GetHashCode());
+ }
+
+ /// <summary>
+ /// 鑾峰彇搴撳瓨淇℃伅鍒楄〃锛堝嚭搴撴棩鏈熷皬浜庡綋鍓嶆椂闂翠笖搴撳瓨鐘舵�佷负鍏ュ簱瀹屾垚鐨勮褰曪紝涓斾粨搴揑D鍖归厤锛�
+ /// </summary>
+ /// <param name="WarehouseId"></param>
+ /// <returns></returns>
+ public async Task<List<Dt_StockInfo>> GetStockInfoAsync(int WarehouseId)
+ {
+ return await BaseDal.QueryDataAsync(x => x.OutboundDate < DateTime.Now && x.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.GetHashCode() && x.WarehouseId == WarehouseId);
+ }
+
+ /// <summary>
+ /// 鑾峰彇搴撳瓨淇℃伅锛堟牴鎹墭鐩樼爜鏌ヨ锛�
+ /// </summary>
+ /// <param name="PalletCode"></param>
+ /// <returns></returns>
+ public async Task<Dt_StockInfo> GetStockInfoAsync(string PalletCode)
+ {
+ return await BaseDal.QueryFirstAsync(x => x.PalletCode == PalletCode);
+ }
+
+ /// <summary>
+ /// 鏇存柊搴撳瓨鏁版嵁
+ /// </summary>
+ /// <param name="stockInfo"></param>
+ /// <returns></returns>
+ public async Task<bool> UpdateStockAsync(Dt_StockInfo stockInfo)
+ {
+ return await BaseDal.UpdateDataAsync(stockInfo);
+ }
}
}
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
index 48ec9bb..4dab813 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -17,7 +17,9 @@
using AutoMapper;
using SqlSugar;
+using WIDESEA_Common.LocationEnum;
using WIDESEA_Common.TaskEnum;
+using WIDESEA_Core;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.BaseServices;
using WIDESEA_DTO.Task;
@@ -35,6 +37,8 @@
{
private readonly IMapper _mapper;
private readonly IUnitOfWorkManage _unitOfWorkManage;
+ private readonly IStockInfoService _stockInfoService;
+ private readonly ILocationInfoService _locationInfoService;
public IRepository<Dt_Task> Repository => BaseDal;
@@ -48,54 +52,189 @@
public List<int> TaskOutboundTypes => typeof(TaskTypeEnum).GetEnumIndexList();
- public TaskService(IRepository<Dt_Task> BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage) : base(BaseDal)
+ public TaskService(IRepository<Dt_Task> BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IStockInfoService stockInfoService, ILocationInfoService locationInfoService) : base(BaseDal)
{
_mapper = mapper;
_unitOfWorkManage = unitOfWorkManage;
+ _stockInfoService = stockInfoService;
+ _locationInfoService = locationInfoService;
}
/// <summary>
/// 鍒涘缓浠诲姟锛堢粍鐩樺叆搴撲换鍔°�佺┖鎵樼洏鍥炲簱浠诲姟锛�
/// </summary>
- /// <param name="palletCode">鎵樼洏鍙�</param>
- /// <param name="sourceAddress">璧峰鍦板潃</param>
- /// <param name="targetAddress">鐩爣鍦板潃</param>
- /// <param name="roadway">宸烽亾鍙�</param>
- /// <param name="warehouseId">浠撳簱涓婚敭</param>
- /// <param name="palletType">鎵樼洏绫诲瀷</param>
- /// <param name="taskType">浠诲姟绫诲瀷</param>
+ /// <param name="taskDto">瑕佸垱寤虹殑鍑哄簱浠诲姟鐨勮缁嗕俊鎭�備笉鑳戒负null銆�</param>
/// <returns>鏄惁鎴愬姛</returns>
- public async Task<Dt_Task?> CreateTaskInboundAsync(CreateTaskDto taskDto)
+ public async Task<WebResponseContent> CreateTaskInboundAsync(CreateTaskDto taskDto)
{
- if (string.IsNullOrWhiteSpace(taskDto.PalletCode) || string.IsNullOrWhiteSpace(taskDto.SourceAddress) || string.IsNullOrWhiteSpace(taskDto.TargetAddress) || string.IsNullOrWhiteSpace(taskDto.Roadway))
+ WebResponseContent content = new WebResponseContent();
+ try
{
- return null;
+ if (string.IsNullOrWhiteSpace(taskDto.PalletCode) || string.IsNullOrWhiteSpace(taskDto.SourceAddress) || string.IsNullOrWhiteSpace(taskDto.TargetAddress) || string.IsNullOrWhiteSpace(taskDto.Roadway))
+ {
+ return content.Error("Invalid task details.");
+ }
+
+ if (taskDto.TaskType != TaskTypeEnum.Inbound || taskDto.TaskType != TaskTypeEnum.InEmpty)
+ {
+ return content.Error("Invalid task details.");
+ }
+
+ var task = new Dt_Task
+ {
+ TaskNum = 0,
+ PalletCode = taskDto.PalletCode,
+ PalletType = taskDto.PalletType,
+ Roadway = taskDto.Roadway,
+ TaskType = taskDto.TaskType.GetHashCode(),
+ TaskStatus = TaskStatusEnum.New.GetHashCode(),
+ SourceAddress = taskDto.SourceAddress,
+ TargetAddress = taskDto.TargetAddress,
+ CurrentAddress = taskDto.SourceAddress,
+ NextAddress = taskDto.TargetAddress,
+ WarehouseId = taskDto.WarehouseId,
+ Grade = 1,
+ Creater = "system"
+ };
+
+ var result = await Repository.AddDataAsync(task) > 0 ? true : false;
+ if (result)
+ {
+ var WmstaskDto = _mapper.Map<WMSTaskDTO>(task);
+ return content.OK("浠诲姟鍒涘缓鎴愬姛", WmstaskDto);
+ }
+ else
+ {
+ return content.Error("浠诲姟鍒涘缓澶辫触");
+ }
}
-
- if (taskDto.TaskType != TaskTypeEnum.Inbound || taskDto.TaskType != TaskTypeEnum.InEmpty)
+ catch (Exception ex)
{
- return null;
+ return content.Error($"浠诲姟鍒涘缓澶辫触: {ex.Message}");
}
-
- var task = new Dt_Task
- {
- TaskNum = 0,
- PalletCode = taskDto.PalletCode,
- PalletType = taskDto.PalletType,
- Roadway = taskDto.Roadway,
- TaskType = taskDto.TaskType.GetHashCode(),
- TaskStatus = TaskStatusEnum.New.GetHashCode(),
- SourceAddress = taskDto.SourceAddress,
- TargetAddress = taskDto.TargetAddress,
- CurrentAddress = taskDto.SourceAddress,
- NextAddress = taskDto.TargetAddress,
- WarehouseId = taskDto.WarehouseId,
- Grade = 1,
- Creater = "system"
- };
-
- return await Repository.AddDataAsync(task) > 0 ? task : null;
}
+
+ /// <summary>
+ /// 鏍规嵁鎸囧畾鐨勪换鍔¤鎯呭紓姝ュ垱寤烘柊鐨勫嚭搴撲换鍔°��
+ /// </summary>
+ /// <param name="taskDto">瑕佸垱寤虹殑鍑哄簱浠诲姟鐨勮缁嗕俊鎭�備笉鑳戒负null銆�</param>
+ /// <returns>琛ㄧず寮傛鎿嶄綔鐨勪换鍔°�備换鍔$粨鏋滃寘鍚〃绀哄凡鍒涘缓鐨勫嚭搴撲换鍔$殑<see cref="WMSTaskDTO"/>锛屽鏋滀换鍔℃棤娉曞垱寤哄垯涓�<see langword="null"/>銆�</returns>
+ public async Task<WebResponseContent> CreateTaskOutboundAsync(CreateTaskDto taskDto)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+
+ List<Dt_StockInfo>? stockResult = await _stockInfoService.GetStockInfoAsync(taskDto.WarehouseId);
+ var taskList = new List<Dt_Task>();
+ foreach (var item in stockResult)
+ {
+ var taskInfo = new Dt_Task()
+ {
+ WarehouseId = item.WarehouseId,
+ PalletCode = item.PalletCode,
+ PalletType = item.PalletType,
+ SourceAddress = item.LocationCode,
+ TargetAddress = taskDto.TargetAddress,
+ Roadway = item.LocationDetails.RoadwayNo,
+ TaskType = TaskTypeEnum.Outbound.GetHashCode(),
+ TaskStatus = TaskStatusEnum.New.GetHashCode(),
+ Grade = 1,
+ TaskNum = 0,
+ CurrentAddress = item.LocationCode,
+ NextAddress = taskDto.TargetAddress,
+ Creater = "system",
+
+ };
+ taskList.Add(taskInfo);
+ }
+
+ var result = await BaseDal.AddDataAsync(taskList) > 0;
+ var wmstaskDto = result ? _mapper.Map<WMSTaskDTO>(taskList) : null;
+ return content.OK(result ? "浠诲姟鍒涘缓鎴愬姛" : "浠诲姟鍒涘缓澶辫触", wmstaskDto);
+ }
+ catch (Exception e)
+ {
+ return content.Error($"浠诲姟鍒涘缓澶辫触: {e.Message}");
+ }
+ }
+
+
+ /// <summary>
+ /// 鑾峰彇鍙叆搴撹揣浣�
+ /// </summary>
+ /// <param name="warehouseId"></param>
+ /// <param name="taskType"></param>
+ /// <returns></returns>
+ public async Task<WebResponseContent> GetTasksLocationAsync(CreateTaskDto taskDto)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ var stockResult = await BaseDal.QueryFirstAsync(s => s.PalletCode == taskDto.PalletCode);
+ if (stockResult == null) return content.Error("鏈壘鍒板搴旂殑浠诲姟");
+
+
+ var locationInfo = await _locationInfoService.GetLocationInfo(stockResult.Roadway);
+ if (locationInfo == null) return content.Error("鏈壘鍒板搴旂殑璐т綅");
+
+ // 鏇存柊璐т綅淇℃伅
+ locationInfo.LocationStatus = LocationStatusEnum.FreeLock.GetHashCode();
+
+ // 璺熸柊浠诲姟淇℃伅
+ stockResult.CurrentAddress = taskDto.SourceAddress;
+ stockResult.NextAddress = locationInfo.LocationCode;
+ stockResult.TargetAddress = taskDto.TargetAddress;
+ stockResult.TaskStatus = TaskStatusEnum.Line_Finish.GetHashCode();
+
+ var updateResult = await BaseDal.UpdateDataAsync(stockResult);
+ var locationResult = await _locationInfoService.UpdateLocationInfoAsync(locationInfo);
+
+ return content.OK(updateResult && locationResult ? "浠诲姟鏇存柊鎴愬姛" : "浠诲姟鏇存柊澶辫触", locationInfo.LocationCode);
+ }
+ catch (Exception ex)
+ {
+ return content.Error($"鑾峰彇浠诲姟澶辫触: {ex.Message}");
+ }
+ }
+
+ // 浠诲姟瀹屾垚銆傛坊鍔犲簱瀛橈紝淇敼璐т綅鐘舵�侊紝鍒犻櫎浠诲姟鏁版嵁锛屾坊鍔犲巻鍙蹭换鍔℃暟鎹�
+ public async Task<WebResponseContent> FinishTaskAsync(CreateTaskDto taskDto)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ var taskResult = await BaseDal.QueryFirstAsync(s => s.PalletCode == taskDto.PalletCode);
+ if (taskResult == null) return content.Error("鏈壘鍒板搴旂殑浠诲姟");
+ var locationResult = await _locationInfoService.GetLocationInfo(taskResult.Roadway, taskDto.PalletCode);
+ if (locationResult == null) return content.Error("鏈壘鍒板搴旂殑璐т綅");
+
+ // 娣诲姞搴撳瓨淇℃伅
+ var stockInfo = await _stockInfoService.GetStockInfoAsync(taskDto.PalletCode);
+ stockInfo.LocationCode = locationResult.LocationCode;
+ stockInfo.LocationId = locationResult.Id;
+ stockInfo.OutboundDate = taskResult.Roadway.Contains("GW") ? DateTime.Now.AddHours(2) : taskResult.Roadway.Contains("CW") ? DateTime.Now.AddHours(1) : DateTime.Now.AddHours(0);
+
+ // 淇敼璐т綅鐘舵��
+ locationResult.LocationStatus = LocationStatusEnum.InStock.GetHashCode();
+ var updateLocationResult = await _locationInfoService.UpdateLocationInfoAsync(locationResult);
+ var addStockResult = await _stockInfoService.UpdateStockAsync(stockInfo);
+ if (!updateLocationResult || !addStockResult) return content.Error("浠诲姟瀹屾垚澶辫触");
+
+ // 鍒犻櫎浠诲姟鏁版嵁
+ var deleteTaskResult = await BaseDal.DeleteDataAsync(taskResult);
+
+ // 娣诲姞鍘嗗彶浠诲姟鏁版嵁
+ var historyTask = _mapper.Map<Dt_Task_Hty>(taskResult);
+ historyTask.InsertTime = DateTime.Now;
+ if (!deleteTaskResult) return content.Error("浠诲姟瀹屾垚澶辫触");
+ return content.OK("浠诲姟瀹屾垚");
+ }
+ catch (Exception ex)
+ {
+ return content.Error($"瀹屾垚浠诲姟澶辫触: {ex.Message}");
+ }
+ }
}
}
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs
index 350f7ee..ad0b435 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs
@@ -27,11 +27,9 @@
/// </summary>
/// <param name="taskDto"></param>
/// <returns></returns>
- public WebResponseContent CreateTaskInboundAsync(CreateTaskDto taskDto)
+ public async Task<WebResponseContent?> CreateTaskInboundAsync(CreateTaskDto taskDto)
{
- WebResponseContent content = new WebResponseContent();
- content.Data = Service.CreateTaskInboundAsync(taskDto);
- return content;
+ return await Service.CreateTaskInboundAsync(taskDto);
}
}
}
--
Gitblit v1.9.3