From dcbd4934d063f471c01cbcf93574c2e2ac5f16b5 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期五, 27 三月 2026 09:37:36 +0800
Subject: [PATCH] feat: 提交WCS与WMS代码调整
---
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs | 2
.gitignore | 5
Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 2
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotMessageHandler.cs | 4
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/WIDESEAWCS_Server.csproj | 5
Code/测试工具/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Web/src/views/RobotClientsView.vue | 2
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/Workflow/RobotWorkflowOrchestrator.cs | 4
/dev/null | 83 ---------
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/WIDESEAWCS_Core.csproj | 3
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/QuartzNet/SchedulerCenterServer.cs | 3
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_RedisService/Connection/RedisConnectionManager.cs | 9
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/LogHelper/QuartzLogger.cs | 358 ++++++++++++++++++++++++++++++++++-----
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotClientManager.cs | 6
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/QuartzNet/QuartzNetExtension.cs | 16 +
14 files changed, 347 insertions(+), 155 deletions(-)
diff --git a/.gitignore b/.gitignore
index e15e754..29b8537 100644
--- a/.gitignore
+++ b/.gitignore
@@ -434,3 +434,8 @@
Code/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v18/DocumentLayout.json
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
/Code/WMS/WIDESEA_WMSClient/.omc
+
+# Local IDE and assistant environment files
+**/.claude/settings.local.json
+**/.vs/**/DocumentLayout.json
+**/.vs/**/DocumentLayout.backup.json
diff --git a/Code/WCS/WIDESEAWCS_Server/.claude/settings.local.json b/Code/WCS/WIDESEAWCS_Server/.claude/settings.local.json
deleted file mode 100644
index b1f5606..0000000
--- a/Code/WCS/WIDESEAWCS_Server/.claude/settings.local.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "permissions": {
- "allow": [
- "Bash(dotnet new:*)",
- "Bash(dotnet add:*)",
- "Bash(dotnet test:*)",
- "Bash(dotnet build WIDESEAWCS_Server.sln --nologo -v q)",
- "Bash(find . -maxdepth 2 -type f -name \"*.csproj\" 2>/dev/null | head -20)",
- "Bash(find . -name \"*.md\" -o -name \"docs\" -type d 2>/dev/null | head -20)",
- "Bash(ls -la WIDESEAWCS_Core/*.cs 2>/dev/null | wc -l)",
- "Bash(find . -name \"*.cs\" -not -path \"*/bin/*\" -not -path \"*/obj/*\" -exec wc -l {} + | tail -1)",
- "Bash(find . -maxdepth 2 -type d -name \"*Domain*\" -o -name \"*Application*\" -o -name \"*Infrastructure*\" 2>/dev/null | head -20)",
- "Bash(cd \"/d/Git/ShanMeiXinNengYuan/Code/WCS/WIDESEAWCS_Server/.worktrees/ddd-refactor/Code/WCS/WIDESEAWCS_Server\" && dotnet sln WIDESEAWCS_Server.sln add WIDESEAWCS_Domain/WIDESEAWCS_Domain.csproj && dotnet sln WIDESEAWCS_Server.sln add WIDESEAWCS_Domain.Tests/WIDESEAWCS_Domain.Tests.csproj)"
- ]
- }
-}
diff --git a/Code/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v18/DocumentLayout.json b/Code/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v18/DocumentLayout.json
deleted file mode 100644
index e2a9bc0..0000000
--- a/Code/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/v18/DocumentLayout.json
+++ /dev/null
@@ -1,270 +0,0 @@
-{
- "Version": 1,
- "WorkspaceRootPath": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\",
- "Documents": [
- {
- "AbsoluteMoniker": "D:0:0:{487FA45B-EA1A-4ACA-BB5B-0F6708F462C0}|WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_server\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{487FA45B-EA1A-4ACA-BB5B-0F6708F462C0}|WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj|solutionrelative:wideseawcs_server\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{487FA45B-EA1A-4ACA-BB5B-0F6708F462C0}|WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_server\\appsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}",
- "RelativeMoniker": "D:0:0:{487FA45B-EA1A-4ACA-BB5B-0F6708F462C0}|WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj|solutionrelative:wideseawcs_server\\appsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_taskinfoservice\\flows\\relocationtaskflowservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|solutionrelative:wideseawcs_taskinfoservice\\flows\\relocationtaskflowservice.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:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_taskinfoservice\\flows\\outboundtaskflowservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|solutionrelative:wideseawcs_taskinfoservice\\flows\\outboundtaskflowservice.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:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_taskinfoservice\\flows\\inboundtaskflowservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|solutionrelative:wideseawcs_taskinfoservice\\flows\\inboundtaskflowservice.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\\robotjob\\robotmessagehandler.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\robotjob\\robotmessagehandler.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\\robotjob\\workflow\\robotworkfloworchestrator.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\robotjob\\workflow\\robotworkfloworchestrator.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{A14242DD-DA06-4DC3-8598-1761AA7C76D1}|WIDESEAWCS_SystemServices\\WIDESEAWCS_SystemServices.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_systemservices\\sys_dictionaryservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{A14242DD-DA06-4DC3-8598-1761AA7C76D1}|WIDESEAWCS_SystemServices\\WIDESEAWCS_SystemServices.csproj|solutionrelative:wideseawcs_systemservices\\sys_dictionaryservice.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\\robotjob\\robotjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "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:{487FA45B-EA1A-4ACA-BB5B-0F6708F462C0}|WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_server\\hostedservice\\apiroutecachewarmuphostedservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{487FA45B-EA1A-4ACA-BB5B-0F6708F462C0}|WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj|solutionrelative:wideseawcs_server\\hostedservice\\apiroutecachewarmuphostedservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{F9886971-C3B2-4334-B014-D5109F2041DE}|WIDESEAWCS_RedisService\\WIDESEAWCS_RedisService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_redisservice\\extensions\\redisservicesetup.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{F9886971-C3B2-4334-B014-D5109F2041DE}|WIDESEAWCS_RedisService\\WIDESEAWCS_RedisService.csproj|solutionrelative:wideseawcs_redisservice\\extensions\\redisservicesetup.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{BFFDD936-2E61-4D3A-ABFE-7CF77FE0B184}|WIDESEAWCS_Core\\WIDESEAWCS_Core.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_core\\http\\http\\httpclienthelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{BFFDD936-2E61-4D3A-ABFE-7CF77FE0B184}|WIDESEAWCS_Core\\WIDESEAWCS_Core.csproj|solutionrelative:wideseawcs_core\\http\\http\\httpclienthelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
- }
- ],
- "DocumentGroupContainers": [
- {
- "Orientation": 0,
- "VerticalTabListWidth": 256,
- "DocumentGroups": [
- {
- "DockedWidth": 200,
- "SelectedChildIndex": 3,
- "Children": [
- {
- "$type": "Bookmark",
- "Name": "ST:128:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
- },
- {
- "$type": "Bookmark",
- "Name": "ST:0:0:{40ea2e6b-2121-4bb8-a43e-c83c04b51041}"
- },
- {
- "$type": "Bookmark",
- "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
- },
- {
- "$type": "Document",
- "DocumentIndex": 0,
- "Title": "Program.cs",
- "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Server\\Program.cs",
- "RelativeDocumentMoniker": "WIDESEAWCS_Server\\Program.cs",
- "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Server\\Program.cs",
- "RelativeToolTip": "WIDESEAWCS_Server\\Program.cs",
- "ViewState": "AgIAAB8AAAAAAAAAAAAAAD4AAAAuAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-03-25T08:54:07.752Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 1,
- "Title": "appsettings.json",
- "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Server\\appsettings.json",
- "RelativeDocumentMoniker": "WIDESEAWCS_Server\\appsettings.json",
- "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Server\\appsettings.json",
- "RelativeToolTip": "WIDESEAWCS_Server\\appsettings.json",
- "ViewState": "AgIAAAAAAAAAAAAAAAAAABAAAAAEAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|",
- "WhenOpened": "2026-03-25T08:50:00.052Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 2,
- "Title": "RelocationTaskFlowService.cs",
- "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_TaskInfoService\\Flows\\RelocationTaskFlowService.cs",
- "RelativeDocumentMoniker": "WIDESEAWCS_TaskInfoService\\Flows\\RelocationTaskFlowService.cs",
- "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_TaskInfoService\\Flows\\RelocationTaskFlowService.cs",
- "RelativeToolTip": "WIDESEAWCS_TaskInfoService\\Flows\\RelocationTaskFlowService.cs",
- "ViewState": "AgIAAGkAAAAAAAAAAAAUwHAAAAAVAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-03-19T09:35:02.468Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 4,
- "Title": "OutboundTaskFlowService.cs",
- "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_TaskInfoService\\Flows\\OutboundTaskFlowService.cs",
- "RelativeDocumentMoniker": "WIDESEAWCS_TaskInfoService\\Flows\\OutboundTaskFlowService.cs",
- "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_TaskInfoService\\Flows\\OutboundTaskFlowService.cs",
- "RelativeToolTip": "WIDESEAWCS_TaskInfoService\\Flows\\OutboundTaskFlowService.cs",
- "ViewState": "AgIAAEMAAAAAAAAAAAAewEEAAAAiAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-03-19T09:34:19.406Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 6,
- "Title": "InboundTaskFlowService.cs",
- "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_TaskInfoService\\Flows\\InboundTaskFlowService.cs",
- "RelativeDocumentMoniker": "WIDESEAWCS_TaskInfoService\\Flows\\InboundTaskFlowService.cs",
- "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_TaskInfoService\\Flows\\InboundTaskFlowService.cs",
- "RelativeToolTip": "WIDESEAWCS_TaskInfoService\\Flows\\InboundTaskFlowService.cs",
- "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-03-19T09:34:14.627Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 11,
- "Title": "ApiRouteCacheWarmupHostedService.cs",
- "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Server\\HostedService\\ApiRouteCacheWarmupHostedService.cs",
- "RelativeDocumentMoniker": "WIDESEAWCS_Server\\HostedService\\ApiRouteCacheWarmupHostedService.cs",
- "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Server\\HostedService\\ApiRouteCacheWarmupHostedService.cs",
- "RelativeToolTip": "WIDESEAWCS_Server\\HostedService\\ApiRouteCacheWarmupHostedService.cs",
- "ViewState": "AgIAABoAAAAAAAAAAADwvzIAAAAdAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-03-19T08:01:46.997Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 12,
- "Title": "RedisServiceSetup.cs",
- "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_RedisService\\Extensions\\RedisServiceSetup.cs",
- "RelativeDocumentMoniker": "WIDESEAWCS_RedisService\\Extensions\\RedisServiceSetup.cs",
- "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_RedisService\\Extensions\\RedisServiceSetup.cs",
- "RelativeToolTip": "WIDESEAWCS_RedisService\\Extensions\\RedisServiceSetup.cs",
- "ViewState": "AgIAADQAAAAAAAAAAAAqwCgAAAAAAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-03-19T07:52:38.709Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 13,
- "Title": "HttpClientHelper.cs",
- "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Core\\Http\\HTTP\\HttpClientHelper.cs",
- "RelativeDocumentMoniker": "WIDESEAWCS_Core\\Http\\HTTP\\HttpClientHelper.cs",
- "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Core\\Http\\HTTP\\HttpClientHelper.cs",
- "RelativeToolTip": "WIDESEAWCS_Core\\Http\\HTTP\\HttpClientHelper.cs",
- "ViewState": "AgIAAA4AAAAAAAAAAAAowBoAAABNAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-03-19T07:48:09.389Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 5,
- "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": "AgIAAGQBAAAAAAAAAADwv3oBAABOAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-03-19T01:42:07.337Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 3,
- "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": "AgIAAEoAAAAAAAAAAAAQwF0AAAAzAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-03-19T01:42:07.364Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 9,
- "Title": "Sys_DictionaryService.cs",
- "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_SystemServices\\Sys_DictionaryService.cs",
- "RelativeDocumentMoniker": "WIDESEAWCS_SystemServices\\Sys_DictionaryService.cs",
- "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_SystemServices\\Sys_DictionaryService.cs",
- "RelativeToolTip": "WIDESEAWCS_SystemServices\\Sys_DictionaryService.cs",
- "ViewState": "AgIAAAsAAAAAAAAAAAAIwFcAAAAQAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-03-19T07:47:06.312Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 8,
- "Title": "RobotWorkflowOrchestrator.cs",
- "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\RobotJob\\Workflow\\RobotWorkflowOrchestrator.cs",
- "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\RobotJob\\Workflow\\RobotWorkflowOrchestrator.cs",
- "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\RobotJob\\Workflow\\RobotWorkflowOrchestrator.cs",
- "RelativeToolTip": "WIDESEAWCS_Tasks\\RobotJob\\Workflow\\RobotWorkflowOrchestrator.cs",
- "ViewState": "AgIAADQAAAAAAAAAAAA5wC8AAAA1AAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-03-18T09:21:38.852Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 7,
- "Title": "RobotMessageHandler.cs",
- "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\RobotJob\\RobotMessageHandler.cs",
- "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\RobotJob\\RobotMessageHandler.cs",
- "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\RobotJob\\RobotMessageHandler.cs",
- "RelativeToolTip": "WIDESEAWCS_Tasks\\RobotJob\\RobotMessageHandler.cs",
- "ViewState": "AgIAABQAAAAAAAAAAAAwwDwAAAAwAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-03-18T09:10:02.533Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 10,
- "Title": "RobotJob.cs",
- "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\RobotJob\\RobotJob.cs",
- "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": "AgIAAEcAAAAAAAAAAAAmwDUAAAAPAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-03-18T08:56:41.452Z",
- "EditorCaption": ""
- }
- ]
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/LogHelper/QuartzLogger.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/LogHelper/QuartzLogger.cs
index f50d7a0..8789c83 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/LogHelper/QuartzLogger.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/LogHelper/QuartzLogger.cs
@@ -1,85 +1,345 @@
-锘縰sing System;
+using OfficeOpenXml.FormulaParsing.Excel.Functions.Numeric;
+using System;
+using System.Collections.Concurrent;
using System.Collections.Generic;
+using System.IO;
using System.Linq;
using System.Text;
+using System.Threading;
using System.Threading.Tasks;
using WIDESEAWCS_Core.Helper;
namespace WIDESEAWCS_Core.LogHelper
{
- public class QuartzLogger
+ /// <summary>
+ /// 鏃ュ織绛夌骇鏋氫妇
+ /// </summary>
+ public enum LogLevel
{
- static ReaderWriterLockSlim LogWriteLock = new ReaderWriterLockSlim();
- static string folderPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $"Log\\{DateTime.Now.ToString("yyyy-MM-dd")}");
+ DEBUG = 0,
+ INFO = 1,
+ WARN = 2,
+ ERROR = 3,
+ FATAL = 4
+ }
- public static void WriteLogToFile(string fileName, string log)
+ /// <summary>
+ /// 鏃ュ織鏉$洰锛氬皝瑁呭崟鏉℃棩蹇楃殑瀹屾暣淇℃伅
+ /// </summary>
+ public class LogEntry
+ {
+ /// <summary>
+ /// 鏃ュ織鏃堕棿
+ /// </summary>
+ public DateTime Time { get; set; }
+
+ /// <summary>
+ /// 鏃ュ織绛夌骇
+ /// </summary>
+ public LogLevel Level { get; set; }
+
+ /// <summary>
+ /// 鏃ュ織娑堟伅鍐呭
+ /// </summary>
+ public string Message { get; set; } = string.Empty;
+
+ /// <summary>
+ /// 鏃ュ織鏉ユ簮/鏂囦欢鍚�
+ /// </summary>
+ public string? Source { get; set; }
+
+ /// <summary>
+ /// 寮傚父淇℃伅锛堝彲閫夛級
+ /// </summary>
+ public string? Exception { get; set; }
+
+ /// <summary>
+ /// 鏍煎紡鍖栦负鏍囧噯鏃ュ織瀛楃涓�
+ /// </summary>
+ public string ToFormattedString()
{
+ var sb = new StringBuilder();
+ sb.Append($"銆恵Time:HH:mm:ss}銆戙�恵Level}銆戯細銆恵Message}銆�");
+ if (!string.IsNullOrEmpty(Exception))
+ {
+ sb.AppendLine();
+ sb.Append($"銆愬紓甯搞�戯細{Exception}");
+ }
+ return sb.ToString();
+ }
+ }
+
+ /// <summary>
+ /// 闃熷垪鍖栭泦涓棩蹇楀啓鍏ュ櫒
+ /// 浣跨敤鐢熶骇鑰�-娑堣垂鑰呮ā寮忥紝鍚庡彴绾跨▼鎵归噺鍐欏叆鏂囦欢锛屾彁楂樻�ц兘
+ /// </summary>
+ public class QueuedLogWriter : IDisposable
+ {
+ private static readonly Lazy<QueuedLogWriter> _instance = new Lazy<QueuedLogWriter>(() => new QueuedLogWriter());
+ public static QueuedLogWriter Instance => _instance.Value;
+
+ private readonly BlockingCollection<LogEntry> _logQueue;
+ private readonly CancellationTokenSource _cts;
+ private readonly Task _writeTask;
+ private readonly ReaderWriterLockSlim _fileLock = new ReaderWriterLockSlim();
+ private readonly string _logFolder;
+ private readonly int _maxFileSize;
+ private readonly string _fileExt;
+ private bool _disposed;
+
+ /// <summary>
+ /// 鏃ュ織闃熷垪鍐欏叆鍣ㄥ崟渚�
+ /// </summary>
+ private QueuedLogWriter()
+ {
+ _logFolder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $"Log{Path.DirectorySeparatorChar}{DateTime.Now:yyyy-MM-dd}");
+ _maxFileSize = 10 * 1024 * 1024; // 10MB
+ _fileExt = ".log";
+ _logQueue = new BlockingCollection<LogEntry>(new ConcurrentQueue<LogEntry>());
+ _cts = new CancellationTokenSource();
+
+ // 纭繚鏃ュ織鐩綍瀛樺湪
+ if (!Directory.Exists(_logFolder))
+ {
+ Directory.CreateDirectory(_logFolder);
+ }
+
+ // 鍚姩鍚庡彴鍐欏叆绾跨▼
+ _writeTask = Task.Run(WriteLoop, _cts.Token);
+ }
+
+ /// <summary>
+ /// 鍚庡彴鍐欏叆寰幆
+ /// </summary>
+ private void WriteLoop()
+ {
+ var batch = new List<LogEntry>();
+ while (!_cts.Token.IsCancellationRequested)
+ {
+ try
+ {
+ // 鎵归噺鍙栧嚭鏃ュ織锛屾渶澶�100鏉℃垨绛夊緟500ms
+ batch.Clear();
+ if (_logQueue.TryTake(out var entry, 500))
+ {
+ batch.Add(entry);
+ while (batch.Count < 100 && _logQueue.TryTake(out entry, 50))
+ {
+ batch.Add(entry);
+ }
+ WriteBatch(batch);
+ }
+ }
+ catch (OperationCanceledException)
+ {
+ break;
+ }
+ catch (Exception)
+ {
+ // 蹇界暐鍐欏叆寮傚父锛岄槻姝㈠悗鍙扮嚎绋嬪穿婧�
+ }
+ }
+
+ // 鍙栨秷鍓嶅皢鍓╀綑鏃ュ織鍐欏嚭
+ while (_logQueue.TryTake(out var remainingEntry, 100))
+ {
+ batch.Add(remainingEntry);
+ }
+ if (batch.Count > 0)
+ {
+ WriteBatch(batch);
+ }
+ }
+
+ /// <summary>
+ /// 鎵归噺鍐欏叆鏃ュ織鍒版枃浠�
+ /// </summary>
+ private void WriteBatch(List<LogEntry> entries)
+ {
+ if (entries.Count == 0) return;
+
try
{
- // 杩涘叆鍐欓攣
- LogWriteLock.EnterWriteLock();
-
- // 濡傛灉鏂囦欢澶逛笉瀛樺湪锛屽垯鍒涘缓鏂囦欢澶�
- if (!Directory.Exists(folderPath))
+ _fileLock.EnterWriteLock();
+ foreach (var entry in entries)
{
- Directory.CreateDirectory(folderPath);
+ string fileName = GetLogFileName(entry.Source);
+ string filePath = Path.Combine(_logFolder, fileName);
+ string content = entry.ToFormattedString() + Environment.NewLine;
+ ConsoleHelper.WriteInfoLine(content);
+ File.AppendAllText(filePath, content);
}
- // 鑾峰彇鏃ュ織鏂囦欢璺緞
- string logFilePath = Path.Combine(folderPath, GetLastAccessFileName(fileName));
- // 鑾峰彇褰撳墠鏃堕棿
- DateTime now = DateTime.Now;
- // 鏋勯�犳棩蹇楀唴瀹�
- string logContent = $"銆恵now}銆憑Environment.NewLine}{log}";
-
- // 灏嗘棩蹇楀唴瀹硅拷鍔犲埌鏃ュ織鏂囦欢涓�
- File.AppendAllText(logFilePath, logContent);
}
- catch { }
+ catch (Exception)
+ {
+ // 闈欓粯澶勭悊锛岄槻姝㈡枃浠禝O寮傚父褰卞搷涓荤嚎绋�
+ }
finally
{
- // 閫�鍑哄啓閿�
- LogWriteLock.ExitWriteLock();
+ _fileLock.ExitWriteLock();
}
}
- static int size = 10 * 1024 * 1024;
- static string ext = ".log";
- private static string GetLogFilePath(string folderPath, string fileName)
- {
- // 鑾峰彇鎸囧畾鏂囦欢澶逛笅鐨勬墍鏈夋枃浠�
- var allFiles = new DirectoryInfo(folderPath);
- // 鑾峰彇绗﹀悎鏉′欢鐨勬枃浠讹紝鎸夋枃浠跺悕闄嶅簭鎺掑垪
- var selectFiles = allFiles.GetFiles().Where(fi => fi.Name.ToLower().Contains(fileName.ToLower()) && fi.Extension.ToLower() == ext.ToLower() && fi.Length < size).OrderByDescending(d => d.Name).ToList();
- FileInfo? file = selectFiles.FirstOrDefault();
- // 濡傛灉鏈夌鍚堟潯浠剁殑鏂囦欢锛岃繑鍥炵涓�涓枃浠剁殑瀹屾暣璺緞
- if (file != null)
+ /// <summary>
+ /// 鑾峰彇鎴栧垱寤轰竴涓棩蹇楁枃浠惰矾寰勶紙鎸夊ぇ灏忓垎鏂囦欢锛�
+ /// </summary>
+ private string GetLogFileName(string? source)
+ {
+ string prefix = string.IsNullOrEmpty(source) ? "WCS" : source;
+ string searchPattern = $"{prefix}*.log";
+
+ if (!Directory.Exists(_logFolder))
{
- return file.FullName;
+ Directory.CreateDirectory(_logFolder);
}
- // 濡傛灉娌℃湁绗﹀悎鏉′欢鐨勬枃浠讹紝杩斿洖涓�涓柊鐨勬枃浠惰矾寰勶紝鏂囦欢鍚嶄负鍘熸枃浠跺悕鍔犱笂褰撳墠鏃堕棿
- return Path.Combine(folderPath, $@"{fileName}_{DateTime.Now.ToString("HH-mm-ss")}.log");
- }
+ var files = Directory.GetFiles(_logFolder, searchPattern)
+ .Select(f => new FileInfo(f))
+ .Where(f => f.Extension.Equals(_fileExt, StringComparison.OrdinalIgnoreCase))
+ .OrderByDescending(f => f.Name)
+ .ToList();
- private static string GetLastAccessFileName(string fileName)
- {
- foreach (var m in GetExistLogFileNames(fileName))
+ // 鏌ユ壘鏈夌┖闂寸殑鐜版湁鏂囦欢
+ foreach (var file in files)
{
- FileInfo fileInfo = new FileInfo(m);
- if (fileInfo.Length < size)
+ if (file.Length < _maxFileSize)
{
- return m;
+ return file.Name;
}
}
- // 杩斿洖涓�涓柊鐨勯粯璁ゅ綋鍓嶆椂闂寸殑鏃ュ織鍚嶇О
- return $@"{fileName}_{DateTime.Now.ToString("HH-mm-ss")}.log";
+ // 鍒涘缓鏂版枃浠�
+ return $"{prefix}_{DateTime.Now:HH-mm-ss}{_fileExt}";
}
- public static string[] GetExistLogFileNames(string fileName)
+ /// <summary>
+ /// 鍐欏叆鏃ュ織锛堢敓浜х锛�
+ /// </summary>
+ public void Enqueue(LogEntry entry)
{
- string[] fileNames = Directory.GetFiles(folderPath, fileName + "*.log");
- return fileNames;
+ if (_disposed) return;
+ _logQueue.Add(entry);
+ }
+
+ /// <summary>
+ /// 鍐欏叆鏃ュ織鐨勪究鎹锋柟娉�
+ /// </summary>
+ public void Log(LogLevel level, string message, string? source = null, string? exception = null)
+ {
+ if (_disposed) return;
+ var entry = new LogEntry
+ {
+ Time = DateTime.Now,
+ Level = level,
+ Message = message,
+ Source = source,
+ Exception = exception
+ };
+ _logQueue.Add(entry);
+ }
+
+ /// <summary>
+ /// 鍏抽棴鏃ュ織鍐欏叆鍣�
+ /// </summary>
+ public void Dispose()
+ {
+ if (_disposed) return;
+ _disposed = true;
+ _cts.Cancel();
+ try
+ {
+ _writeTask.Wait(3000);
+ }
+ catch (AggregateException) { }
+ _cts.Dispose();
+ _logQueue.Dispose();
+ _fileLock.Dispose();
+ }
+ }
+
+ /// <summary>
+ /// 闈欐�佹棩蹇楀伐鍏风被锛堝吋瀹瑰師鏈夋帴鍙o級
+ /// 鎻愪緵澶氱鏍煎紡鍖栨柟娉曞拰闃熷垪鍖栧啓鍏�
+ /// </summary>
+ public class QuartzLogger
+ {
+ private static readonly QueuedLogWriter _writer = QueuedLogWriter.Instance;
+
+ /// <summary>
+ /// 鍏煎鏃ф帴鍙o細灏嗘棩蹇楀啓鍏ユ枃浠�
+ /// </summary>
+ /// <param name="fileName">鏃ュ織鏂囦欢鍚嶏紙浣滀负Source锛�</param>
+ /// <param name="log">鏃ュ織鍐呭</param>
+ public static void WriteLogToFile(string fileName, string log)
+ {
+ _writer.Log(LogLevel.INFO, log, fileName);
+ }
+
+ /// <summary>
+ /// 鍐欏叆璋冭瘯鏃ュ織
+ /// </summary>
+ public static void Debug(string message, string? source = null)
+ {
+ _writer.Log(LogLevel.DEBUG, message, source);
+ }
+
+ /// <summary>
+ /// 鍐欏叆淇℃伅鏃ュ織
+ /// </summary>
+ public static void Info(string message, string? source = null)
+ {
+ _writer.Log(LogLevel.INFO, message, source);
+ }
+
+ /// <summary>
+ /// 鍐欏叆璀﹀憡鏃ュ織
+ /// </summary>
+ public static void Warn(string message, string? source = null)
+ {
+ _writer.Log(LogLevel.WARN, message, source);
+ }
+
+ /// <summary>
+ /// 鍐欏叆閿欒鏃ュ織
+ /// </summary>
+ public static void Error(string message, string? source = null, Exception? exception = null)
+ {
+ _writer.Log(LogLevel.ERROR, message, source, exception?.ToString());
+ }
+
+ /// <summary>
+ /// 鍐欏叆鑷村懡閿欒鏃ュ織
+ /// </summary>
+ public static void Fatal(string message, string? source = null, Exception? exception = null)
+ {
+ _writer.Log(LogLevel.FATAL, message, source, exception?.ToString());
+ }
+
+ /// <summary>
+ /// 浣跨敤鎸囧畾鏍煎紡鍐欏叆鏃ュ織
+ /// </summary>
+ /// <param name="format">鏍煎紡鍖栧瓧绗︿覆</param>
+ /// <param name="args">鏍煎紡鍖栧弬鏁�</param>
+ public static void WriteFormatted(string format, params object[] args)
+ {
+ string message = string.Format(format, args);
+ _writer.Log(LogLevel.INFO, message);
+ }
+
+ /// <summary>
+ /// 鐩存帴鍐欏叆涓�涓棩蹇楁潯鐩紙鏈�鐏垫椿锛�
+ /// </summary>
+ public static void WriteLogEntry(LogEntry entry)
+ {
+ _writer.Enqueue(entry);
+ }
+
+ /// <summary>
+ /// 閲婃斁璧勬簮锛堝簲鐢ㄥ叧闂椂璋冪敤锛�
+ /// </summary>
+ public static void Shutdown()
+ {
+ _writer.Dispose();
}
}
}
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/WIDESEAWCS_Core.csproj b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/WIDESEAWCS_Core.csproj
index 4d6c8eb..603dbcd 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/WIDESEAWCS_Core.csproj
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/WIDESEAWCS_Core.csproj
@@ -62,6 +62,9 @@
<PackageReference Include="MiniProfiler.AspNetCore.Mvc" Version="4.3.8" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="OfficeOpenXml.Core.ExcelPackage" Version="1.0.0" />
+ <PackageReference Include="Serilog" Version="4.3.1" />
+ <PackageReference Include="Serilog.AspNetCore" Version="6.0.0" />
+ <PackageReference Include="Serilog.Sinks.Seq" Version="9.0.0" />
<PackageReference Include="SkiaSharp" Version="2.88.8" />
<PackageReference Include="SqlSugarCore" Version="5.1.4.152" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/QuartzNet/QuartzNetExtension.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/QuartzNet/QuartzNetExtension.cs
index 50b4e4e..3225212 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/QuartzNet/QuartzNetExtension.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/QuartzNet/QuartzNetExtension.cs
@@ -3,6 +3,7 @@
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.Caches;
using WIDESEAWCS_Core.Helper;
+using WIDESEAWCS_Core.LogHelper;
using WIDESEAWCS_QuartzJob.DTO;
using WIDESEAWCS_QuartzJob.Service;
@@ -118,7 +119,7 @@
}
catch (Exception ex)
{
- Console.WriteLine("璋冨害鏈嶅姟寮�鍚紓甯�" + ex.ToString());
+ QuartzLogger.Error($"璋冨害鏈嶅姟寮�鍚紓甯�", "QuartzNetExtension", ex);
}
}
else
@@ -141,13 +142,22 @@
_ => targetDevice.Device
};
WebResponseContent responseContent = await _schedulerCenter.AddScheduleJobAsync(dispatches[i]);
- if (responseContent.Status) ConsoleHelper.WriteSuccessLine(dispatches[i].Name + "璋冨害鏈嶅姟娣诲姞鎴愬姛"); else ConsoleHelper.WriteErrorLine(dispatches[i].Name + "璋冨害鏈嶅姟娣诲姞澶辫触");
+ if (responseContent.Status)
+ {
+ QuartzLogger.Info($"{dispatches[i].Name}璋冨害鏈嶅姟娣诲姞鎴愬姛", "QuartzNetExtension");
+ ConsoleHelper.WriteSuccessLine(dispatches[i].Name + "璋冨害鏈嶅姟娣诲姞鎴愬姛");
+ }
+ else
+ {
+ QuartzLogger.Error($"{dispatches[i].Name}璋冨害鏈嶅姟娣诲姞澶辫触", "QuartzNetExtension");
+ ConsoleHelper.WriteErrorLine(dispatches[i].Name + "璋冨害鏈嶅姟娣诲姞澶辫触");
+ }
}
//await _schedulerCenter.StartScheduleAsync();
}
catch (Exception ex)
{
- Console.WriteLine("璋冨害鏈嶅姟寮�鍚紓甯�" + ex.ToString());
+ QuartzLogger.Error($"璋冨害鏈嶅姟寮�鍚紓甯�", "QuartzNetExtension", ex);
throw;
}
}
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/QuartzNet/SchedulerCenterServer.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/QuartzNet/SchedulerCenterServer.cs
index 1556608..919b7e9 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/QuartzNet/SchedulerCenterServer.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/QuartzNet/SchedulerCenterServer.cs
@@ -31,6 +31,7 @@
using WIDESEAWCS_QuartzJob.DTO;
using WIDESEAWCS_QuartzJob.CustomException;
using Quartz.Impl.Matchers;
+using WIDESEAWCS_Core.LogHelper;
namespace WIDESEAWCS_QuartzJob
{
@@ -103,7 +104,7 @@
{
//绛夊緟浠诲姟杩愯瀹屾垚
await this._scheduler.Start();
- await Console.Out.WriteLineAsync(QuartzJobInfoMessage.StartJobSuccess);
+ QuartzLogger.Info(QuartzJobInfoMessage.StartJobSuccess);
result = WebResponseContent.Instance.OK(QuartzJobInfoMessage.StartJobSuccess);
return result;
}
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_RedisService/Connection/RedisConnectionManager.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_RedisService/Connection/RedisConnectionManager.cs
index a5e772f..8b697de 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_RedisService/Connection/RedisConnectionManager.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_RedisService/Connection/RedisConnectionManager.cs
@@ -3,6 +3,7 @@
using StackExchange.Redis;
using System.Linq;
using WIDESEAWCS_Core.Helper;
+using WIDESEAWCS_Core.LogHelper;
using WIDESEAWCS_RedisService.Options;
namespace WIDESEAWCS_RedisService.Connection
@@ -59,16 +60,16 @@
var connection = ConnectionMultiplexer.Connect(configOptions);
connection.ConnectionFailed += (_, e) =>
- ConsoleHelper.WriteErrorLine($"Redis杩炴帴澶辫触: {e.FailureType}");
+ QuartzLogger.Info($"Redis杩炴帴澶辫触: {e.FailureType}");
connection.ConnectionRestored += (_, e) =>
- ConsoleHelper.WriteSuccessLine($"Redis杩炴帴鎭㈠: {e.EndPoint}");
+ QuartzLogger.Info($"Redis杩炴帴鎭㈠: {e.EndPoint}");
- ConsoleHelper.WriteSuccessLine($"Redis杩炴帴鎴愬姛: {string.Join(",", configOptions.EndPoints)}");
+ QuartzLogger.Info($"Redis杩炴帴鎴愬姛: {string.Join(",", configOptions.EndPoints)}");
return connection;
}
catch (Exception ex)
{
- ConsoleHelper.WriteErrorLine($"Redis杩炴帴鍒涘缓澶辫触:{ex.Message}");
+ QuartzLogger.Error($"Redis杩炴帴鍒涘缓澶辫触:{ex.Message}",null, ex);
throw;
}
}
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs
index f50aea3..9bd9909 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs
@@ -46,7 +46,7 @@
.ReadFrom.Configuration(context.Configuration) // 浠庡簲鐢ㄧ▼搴忛厤缃腑璇诲彇Serilog鐩稿叧璁剧疆锛堝appsettings.json锛�
.ReadFrom.Services(services) // 浠庝緷璧栨敞鍏ュ鍣ㄤ腑璇诲彇鏈嶅姟閰嶇疆锛屽厑璁稿湪閰嶇疆涓娇鐢ㄥ凡娉ㄥ唽鐨勬湇鍔�
.Enrich.FromLogContext() // 鍚敤鏃ュ織涓婁笅鏂囷紝鍙互鍦ㄦ棩蹇椾腑鍖呭惈濡傝姹侷D銆佺敤鎴稩D绛夊姩鎬佸睘鎬�
-
+ .Enrich.WithProperty("Application", "WCS")
// 璁剧疆Microsoft鍛藉悕绌洪棿鐨勬棩蹇楃骇鍒负Information
// 杩欐牱鍙互鍑忓皯Microsoft妗嗘灦鏈韩鐨勮缁嗘棩蹇楋紝閬垮厤杩囧鐨凞ebug鏃ュ織
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/WIDESEAWCS_Server.csproj b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/WIDESEAWCS_Server.csproj
index ba2b410..0905a14 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/WIDESEAWCS_Server.csproj
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/WIDESEAWCS_Server.csproj
@@ -65,11 +65,6 @@
</ItemGroup>
<ItemGroup>
- <PackageReference Include="Serilog.AspNetCore" Version="8.0.3" />
- <PackageReference Include="Serilog.Settings.Configuration" Version="8.0.4" />
- <PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
- <PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
- <PackageReference Include="Serilog.Sinks.Seq" Version="9.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
</ItemGroup>
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotClientManager.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotClientManager.cs
index 75d098b..5c95316 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotClientManager.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotClientManager.cs
@@ -102,7 +102,7 @@
// 缁戝畾瀹㈡埛绔柇寮�杩炴帴鐨勪簨浠跺鐞�
_tcpSocket.RobotReceived += OnRobotReceived;
// 璁板綍鏃ュ織锛堟敞鎰忥細鏃ュ織鍐呭涓�"瀹㈡埛绔凡鏂紑杩炴帴"锛屽彲鑳芥槸閬楃暀鐨勫崰浣嶆枃鏈級
- QuartzLogger.Error($"瀹㈡埛绔凡鏂紑杩炴帴", robotCrane.DeviceName);
+ QuartzLogger.Warn($"瀹㈡埛绔凡鏂紑杩炴帴", robotCrane.DeviceName);
}
// 浠� TCP 鏈嶅姟鍣ㄧ殑瀹㈡埛绔瓧鍏镐腑鑾峰彇 TcpClient 瀵硅薄
@@ -124,7 +124,7 @@
if (!alreadyStarted)
{
// 璁板綍鏃ュ織
- QuartzLogger.Error($"鍚姩瀹㈡埛绔秷鎭鐞�", robotCrane.DeviceName);
+ QuartzLogger.Info($"鍚姩瀹㈡埛绔秷鎭鐞�", robotCrane.DeviceName);
// 鑾峰彇鏈�鏂扮殑鐘舵�佸璞�
var latestStateForSubscribe = _stateManager.GetState(ipAddress);
@@ -142,7 +142,7 @@
if (t.IsFaulted)
{
// 璁板綍閿欒鏃ュ織
- QuartzLogger.Error($"鐩戝惉瀹㈡埛绔秷鎭簨浠跺紓甯�", robotCrane.DeviceName);
+ QuartzLogger.Info($"鐩戝惉瀹㈡埛绔秷鎭簨浠跺紓甯�", robotCrane.DeviceName);
Console.WriteLine($"[{DateTime.Now:yyyy-MM-dd HH:mm:ss}] HandleClientAsync error: {t.Exception?.GetBaseException().Message}");
// 鍙戠敓閿欒鏃讹紝绉婚櫎鍚姩鏍囧織锛屽厑璁镐笅娆¢噸璇�
_handleClientStarted.TryRemove(ipAddress, out _);
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotMessageHandler.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotMessageHandler.cs
index b6d0a2e..8783ebf 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotMessageHandler.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotMessageHandler.cs
@@ -117,7 +117,7 @@
{
// 璁板綍鎺ユ敹鍒扮殑娑堟伅鏃ュ織
_logger.LogInformation($"鎺ユ敹鍒板鎴风銆恵state.RobotCrane.DeviceName}銆戝彂閫佹秷鎭�恵message}銆�");
- QuartzLogger.Error($"鎺ユ敹鍒板鎴风娑堟伅銆恵message}銆�", state.RobotCrane.DeviceName);
+ QuartzLogger.Info($"鎺ユ敹鍒板鎴风娑堟伅銆恵message}銆�", state.RobotCrane.DeviceName);
// 鏋勫缓缂撳瓨閿紝妫�鏌� Redis 涓槸鍚﹀瓨鍦ㄨ璁惧鐨勭姸鎬�
var cacheKey = $"{RedisPrefix.Code}:{RedisName.SocketDevices}:{client.Client.RemoteEndPoint}";
@@ -141,7 +141,7 @@
// 澶勭悊鎴愬姛鍚庯紝灏嗗師娑堟伅鍥炲啓鍒板鎴风锛堜繚鎸佸師鏈夎涓猴級
await _socketClientGateway.SendMessageAsync(client, message);
_logger.LogInformation($"鍙戦�佹秷鎭�恵message}銆�");
- QuartzLogger.Error($"鍙戦�佹秷鎭細銆恵message}銆�", state.RobotCrane.DeviceName);
+ QuartzLogger.Info($"鍙戦�佹秷鎭細銆恵message}銆�", state.RobotCrane.DeviceName);
// 瀹夊叏鏇存柊鐘舵�佸埌 Redis
_stateManager.TryUpdateStateSafely(activeState.IPAddress, activeState);
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/Workflow/RobotWorkflowOrchestrator.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/Workflow/RobotWorkflowOrchestrator.cs
index 1f03443..f696a30 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/Workflow/RobotWorkflowOrchestrator.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/Workflow/RobotWorkflowOrchestrator.cs
@@ -156,7 +156,7 @@
if (result)
{
// 鍙戦�佹垚鍔燂紝璁板綍鏃ュ織
- QuartzLogger.Error($"涓嬪彂鏀捐揣鎸囦护锛屾寚锟�?: {taskString}", task.RobotRoadway);
+ QuartzLogger.Info($"涓嬪彂鏀捐揣鎸囦护锛屾寚锟�?: {taskString}", task.RobotRoadway);
// 鏇存柊浠诲姟鐘舵�佷负"鏈哄櫒浜烘墽琛屼腑"
task.RobotTaskState = TaskRobotStatusEnum.RobotExecuting.GetHashCode();
@@ -232,7 +232,7 @@
stateForUpdate.CellBarcode.Add(trayBarcode2);
// 璁板綍鏃ュ織
- QuartzLogger.Error($"取锟斤拷锟斤拷锟斤拷锟叫撅拷牛锟斤拷锟叫�: {trayBarcode1}+{trayBarcode2}", stateForUpdate.RobotCrane.DeviceName);
+ QuartzLogger.Info($"取锟斤拷锟斤拷锟斤拷锟叫撅拷牛锟斤拷锟叫�: {trayBarcode1}+{trayBarcode2}", stateForUpdate.RobotCrane.DeviceName);
// 鍙戦�佸彇璐ф寚浠�
await _taskProcessor.SendSocketRobotPickAsync(task, stateForUpdate);
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
deleted file mode 100644
index 4b42f1e..0000000
--- a/Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v18/DocumentLayout.backup.json
+++ /dev/null
@@ -1,83 +0,0 @@
-{
- "Version": 1,
- "WorkspaceRootPath": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\",
- "Documents": [
- {
- "AbsoluteMoniker": "D:0:0:{D81A65B5-47D1-40C1-8FDE-7D24FF003F51}|WIDESEA_WMSServer\\WIDESEA_WMSServer.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_wmsserver\\appsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}",
- "RelativeMoniker": "D:0:0:{D81A65B5-47D1-40C1-8FDE-7D24FF003F51}|WIDESEA_WMSServer\\WIDESEA_WMSServer.csproj|solutionrelative:widesea_wmsserver\\appsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{D81A65B5-47D1-40C1-8FDE-7D24FF003F51}|WIDESEA_WMSServer\\WIDESEA_WMSServer.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_wmsserver\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{D81A65B5-47D1-40C1-8FDE-7D24FF003F51}|WIDESEA_WMSServer\\WIDESEA_WMSServer.csproj|solutionrelative:widesea_wmsserver\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{111BD7AA-9749-4506-9772-79F9EF14754C}|WIDESEA_Core\\WIDESEA_Core.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_core\\baseservices\\servicebase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{111BD7AA-9749-4506-9772-79F9EF14754C}|WIDESEA_Core\\WIDESEA_Core.csproj|solutionrelative:widesea_core\\baseservices\\servicebase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
- }
- ],
- "DocumentGroupContainers": [
- {
- "Orientation": 0,
- "VerticalTabListWidth": 256,
- "DocumentGroups": [
- {
- "DockedWidth": 200,
- "SelectedChildIndex": 4,
- "Children": [
- {
- "$type": "Bookmark",
- "Name": "ST:128:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
- },
- {
- "$type": "Bookmark",
- "Name": "ST:0:0:{40ea2e6b-2121-4bb8-a43e-c83c04b51041}"
- },
- {
- "$type": "Bookmark",
- "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
- },
- {
- "$type": "Document",
- "DocumentIndex": 1,
- "Title": "Program.cs",
- "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_WMSServer\\Program.cs",
- "RelativeDocumentMoniker": "WIDESEA_WMSServer\\Program.cs",
- "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_WMSServer\\Program.cs",
- "RelativeToolTip": "WIDESEA_WMSServer\\Program.cs",
- "ViewState": "AgIAACIAAAAAAAAAAAAiwDcAAAAYAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-03-25T08:48:13.949Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 0,
- "Title": "appsettings.json",
- "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_WMSServer\\appsettings.json",
- "RelativeDocumentMoniker": "WIDESEA_WMSServer\\appsettings.json",
- "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_WMSServer\\appsettings.json",
- "RelativeToolTip": "WIDESEA_WMSServer\\appsettings.json",
- "ViewState": "AgIAAAAAAAAAAAAAAAAAAAcAAAAoAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|",
- "WhenOpened": "2026-03-25T08:40:34.998Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 2,
- "Title": "ServiceBase.cs",
- "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_Core\\BaseServices\\ServiceBase.cs",
- "RelativeDocumentMoniker": "WIDESEA_Core\\BaseServices\\ServiceBase.cs",
- "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_Core\\BaseServices\\ServiceBase.cs",
- "RelativeToolTip": "WIDESEA_Core\\BaseServices\\ServiceBase.cs",
- "ViewState": "AgIAACsCAAAAAAAAAAASwEACAAAIAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-03-25T06:03:58.013Z",
- "EditorCaption": ""
- }
- ]
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v18/DocumentLayout.json b/Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v18/DocumentLayout.json
deleted file mode 100644
index 4f14949..0000000
--- a/Code/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v18/DocumentLayout.json
+++ /dev/null
@@ -1,83 +0,0 @@
-{
- "Version": 1,
- "WorkspaceRootPath": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\",
- "Documents": [
- {
- "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:{111BD7AA-9749-4506-9772-79F9EF14754C}|WIDESEA_Core\\WIDESEA_Core.csproj|d:\\git\\shanmeixinnengyuan\\code\\wms\\widesea_wmsserver\\widesea_core\\baseservices\\servicebase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{111BD7AA-9749-4506-9772-79F9EF14754C}|WIDESEA_Core\\WIDESEA_Core.csproj|solutionrelative:widesea_core\\baseservices\\servicebase.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\\appsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}",
- "RelativeMoniker": "D:0:0:{D81A65B5-47D1-40C1-8FDE-7D24FF003F51}|WIDESEA_WMSServer\\WIDESEA_WMSServer.csproj|solutionrelative:widesea_wmsserver\\appsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}"
- }
- ],
- "DocumentGroupContainers": [
- {
- "Orientation": 0,
- "VerticalTabListWidth": 256,
- "DocumentGroups": [
- {
- "DockedWidth": 200,
- "SelectedChildIndex": 3,
- "Children": [
- {
- "$type": "Bookmark",
- "Name": "ST:128:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
- },
- {
- "$type": "Bookmark",
- "Name": "ST:0:0:{40ea2e6b-2121-4bb8-a43e-c83c04b51041}"
- },
- {
- "$type": "Bookmark",
- "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
- },
- {
- "$type": "Document",
- "DocumentIndex": 0,
- "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": "AgIAAHcAAAAAAAAAAAAIwIoAAAASAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-03-26T01:10:20.079Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 2,
- "Title": "appsettings.json",
- "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_WMSServer\\appsettings.json",
- "RelativeDocumentMoniker": "WIDESEA_WMSServer\\appsettings.json",
- "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_WMSServer\\appsettings.json",
- "RelativeToolTip": "WIDESEA_WMSServer\\appsettings.json",
- "ViewState": "AgIAAAAAAAAAAAAAAAAAABMAAAAfAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|",
- "WhenOpened": "2026-03-25T08:40:34.998Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 1,
- "Title": "ServiceBase.cs",
- "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_Core\\BaseServices\\ServiceBase.cs",
- "RelativeDocumentMoniker": "WIDESEA_Core\\BaseServices\\ServiceBase.cs",
- "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WMS\\WIDESEA_WMSServer\\WIDESEA_Core\\BaseServices\\ServiceBase.cs",
- "RelativeToolTip": "WIDESEA_Core\\BaseServices\\ServiceBase.cs",
- "ViewState": "AgIAABoAAAAAAAAAAAAuwD8AAAARAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-03-25T06:03:58.013Z",
- "EditorCaption": ""
- }
- ]
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
index ee6b07a..81bbbf0 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -381,7 +381,7 @@
};
var taskDtos = task.Adapt<WMSTaskDTO>();
- var addResult = await BaseDal.AddDataAsync(task);
+ var addResult = await BaseDal.AddDataAsync(task) > 0;
if (!addResult)
return WebResponseContent.Instance.Error("浠诲姟鍒涘缓澶辫触");
return WebResponseContent.Instance.OK("浠诲姟鍒涘缓鎴愬姛", taskDtos);
diff --git "a/Code/\346\265\213\350\257\225\345\267\245\345\205\267/WIDESEAWCS_S7Simulator/.vs/WIDESEAWCS_S7Simulator.slnx/v18/DocumentLayout.backup.json" "b/Code/\346\265\213\350\257\225\345\267\245\345\205\267/WIDESEAWCS_S7Simulator/.vs/WIDESEAWCS_S7Simulator.slnx/v18/DocumentLayout.backup.json"
deleted file mode 100644
index 514df79..0000000
--- "a/Code/\346\265\213\350\257\225\345\267\245\345\205\267/WIDESEAWCS_S7Simulator/.vs/WIDESEAWCS_S7Simulator.slnx/v18/DocumentLayout.backup.json"
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "Version": 1,
- "WorkspaceRootPath": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_S7Simulator\\",
- "Documents": [],
- "DocumentGroupContainers": [
- {
- "Orientation": 0,
- "VerticalTabListWidth": 256,
- "DocumentGroups": [
- {
- "DockedWidth": 200,
- "SelectedChildIndex": -1,
- "Children": [
- {
- "$type": "Bookmark",
- "Name": "ST:128:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
- },
- {
- "$type": "Bookmark",
- "Name": "ST:0:0:{40ea2e6b-2121-4bb8-a43e-c83c04b51041}"
- },
- {
- "$type": "Bookmark",
- "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
- }
- ]
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git "a/Code/\346\265\213\350\257\225\345\267\245\345\205\267/WIDESEAWCS_S7Simulator/.vs/WIDESEAWCS_S7Simulator.slnx/v18/DocumentLayout.json" "b/Code/\346\265\213\350\257\225\345\267\245\345\205\267/WIDESEAWCS_S7Simulator/.vs/WIDESEAWCS_S7Simulator.slnx/v18/DocumentLayout.json"
deleted file mode 100644
index c57733f..0000000
--- "a/Code/\346\265\213\350\257\225\345\267\245\345\205\267/WIDESEAWCS_S7Simulator/.vs/WIDESEAWCS_S7Simulator.slnx/v18/DocumentLayout.json"
+++ /dev/null
@@ -1,83 +0,0 @@
-{
- "Version": 1,
- "WorkspaceRootPath": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_S7Simulator\\",
- "Documents": [
- {
- "AbsoluteMoniker": "D:0:0:{BB7733B7-3415-1894-F731-8A139A54C2DA}|WIDESEAWCS_S7Simulator.Application\\WIDESEAWCS_S7Simulator.Application.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_s7simulator\\wideseawcs_s7simulator.application\\protocol\\devices\\wcslineprotocolhandler.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{BB7733B7-3415-1894-F731-8A139A54C2DA}|WIDESEAWCS_S7Simulator.Application\\WIDESEAWCS_S7Simulator.Application.csproj|solutionrelative:wideseawcs_s7simulator.application\\protocol\\devices\\wcslineprotocolhandler.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{BB7733B7-3415-1894-F731-8A139A54C2DA}|WIDESEAWCS_S7Simulator.Application\\WIDESEAWCS_S7Simulator.Application.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_s7simulator\\wideseawcs_s7simulator.application\\protocol\\devices\\stackerinteractionprotocolhandler.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{BB7733B7-3415-1894-F731-8A139A54C2DA}|WIDESEAWCS_S7Simulator.Application\\WIDESEAWCS_S7Simulator.Application.csproj|solutionrelative:wideseawcs_s7simulator.application\\protocol\\devices\\stackerinteractionprotocolhandler.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{BB7733B7-3415-1894-F731-8A139A54C2DA}|WIDESEAWCS_S7Simulator.Application\\WIDESEAWCS_S7Simulator.Application.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_s7simulator\\wideseawcs_s7simulator.application\\protocol\\devices\\plclinkstackerprotocolhandler.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{BB7733B7-3415-1894-F731-8A139A54C2DA}|WIDESEAWCS_S7Simulator.Application\\WIDESEAWCS_S7Simulator.Application.csproj|solutionrelative:wideseawcs_s7simulator.application\\protocol\\devices\\plclinkstackerprotocolhandler.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
- }
- ],
- "DocumentGroupContainers": [
- {
- "Orientation": 0,
- "VerticalTabListWidth": 256,
- "DocumentGroups": [
- {
- "DockedWidth": 200,
- "SelectedChildIndex": 3,
- "Children": [
- {
- "$type": "Bookmark",
- "Name": "ST:128:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
- },
- {
- "$type": "Bookmark",
- "Name": "ST:0:0:{40ea2e6b-2121-4bb8-a43e-c83c04b51041}"
- },
- {
- "$type": "Bookmark",
- "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
- },
- {
- "$type": "Document",
- "DocumentIndex": 0,
- "Title": "WcsLineProtocolHandler.cs",
- "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_S7Simulator\\WIDESEAWCS_S7Simulator.Application\\Protocol\\Devices\\WcsLineProtocolHandler.cs",
- "RelativeDocumentMoniker": "WIDESEAWCS_S7Simulator.Application\\Protocol\\Devices\\WcsLineProtocolHandler.cs",
- "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_S7Simulator\\WIDESEAWCS_S7Simulator.Application\\Protocol\\Devices\\WcsLineProtocolHandler.cs",
- "RelativeToolTip": "WIDESEAWCS_S7Simulator.Application\\Protocol\\Devices\\WcsLineProtocolHandler.cs",
- "ViewState": "AgIAAB0AAAAAAAAAAAAAwAAAAAAAAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-03-19T09:23:48.936Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 1,
- "Title": "StackerInteractionProtocolHandler.cs",
- "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_S7Simulator\\WIDESEAWCS_S7Simulator.Application\\Protocol\\Devices\\StackerInteractionProtocolHandler.cs",
- "RelativeDocumentMoniker": "WIDESEAWCS_S7Simulator.Application\\Protocol\\Devices\\StackerInteractionProtocolHandler.cs",
- "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_S7Simulator\\WIDESEAWCS_S7Simulator.Application\\Protocol\\Devices\\StackerInteractionProtocolHandler.cs",
- "RelativeToolTip": "WIDESEAWCS_S7Simulator.Application\\Protocol\\Devices\\StackerInteractionProtocolHandler.cs",
- "ViewState": "AgIAAFEAAAAAAAAAAAAkwAAAAAAAAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-03-19T09:23:43.818Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 2,
- "Title": "PlcLinkStackerProtocolHandler.cs",
- "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_S7Simulator\\WIDESEAWCS_S7Simulator.Application\\Protocol\\Devices\\PlcLinkStackerProtocolHandler.cs",
- "RelativeDocumentMoniker": "WIDESEAWCS_S7Simulator.Application\\Protocol\\Devices\\PlcLinkStackerProtocolHandler.cs",
- "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_S7Simulator\\WIDESEAWCS_S7Simulator.Application\\Protocol\\Devices\\PlcLinkStackerProtocolHandler.cs",
- "RelativeToolTip": "WIDESEAWCS_S7Simulator.Application\\Protocol\\Devices\\PlcLinkStackerProtocolHandler.cs",
- "ViewState": "AgIAADoAAAAAAAAAAAAqwF8AAAALAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2026-03-19T09:22:51.623Z",
- "EditorCaption": ""
- }
- ]
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git "a/Code/\346\265\213\350\257\225\345\267\245\345\205\267/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Web/src/views/RobotClientsView.vue" "b/Code/\346\265\213\350\257\225\345\267\245\345\205\267/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Web/src/views/RobotClientsView.vue"
index 693aa25..c375844 100644
--- "a/Code/\346\265\213\350\257\225\345\267\245\345\205\267/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Web/src/views/RobotClientsView.vue"
+++ "b/Code/\346\265\213\350\257\225\345\267\245\345\205\267/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Web/src/views/RobotClientsView.vue"
@@ -203,7 +203,7 @@
serverId: 'robot-client-1',
listenIp: '127.0.0.1',
listenPort: 2000,
- localPort: 2001
+ localPort: 62212
})
const status = ref<RobotClientStatusResponse | null>(null)
--
Gitblit v1.9.3