refactor: separate inspection pool definitions and plans

This commit is contained in:
zhengxuan.zhang
2026-08-04 17:02:51 +08:00
parent 88b6ae0e76
commit f814e30e6c
7 changed files with 14 additions and 5 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ D:\XPData
├── DetectorImages\ # 探测器采集图像
├── CncPrograms\ # .xpcnc / .xpz CNC 程序及迁移包
├── Pipelines\ # .xppipe 图像处理流水线
├── InspectionPool\ # 检测池 Plans / Runs
├── InspectionPool\ # 检测池 Definitions / Plans / Runs
├── InspectionResults\ # CNC / 检测池执行结果与 .xpmap
├── MatrixResults\ # 矩阵执行结果
├── Assets\ # 模板、模型等资源
@@ -229,6 +229,7 @@ namespace XplorePlane.Tests.Inspection
public string AssetsPath => Path.Combine(RootPath, "Assets");
public string MatrixResultsPath => Path.Combine(RootPath, "MatrixResults");
public string InspectionPoolPlansPath => Path.Combine(RootPath, "InspectionPool", "Plans");
public string InspectionPoolDefinitionsPath => Path.Combine(RootPath, "InspectionPool", "Definitions");
public string InspectionPoolRunsPath => Path.Combine(RootPath, "InspectionPool", "Runs");
public string DiagnosticsLogsPath => Path.Combine(RootPath, "Diagnostics", "Logs");
public string DumpPath => Path.Combine(RootPath, "Diagnostics", "Dumps");
@@ -87,6 +87,7 @@ namespace XplorePlane.Tests.InspectionDocumentation
public string AssetsPath => Path.Combine(RootPath, "Assets");
public string MatrixResultsPath => Path.Combine(RootPath, "MatrixResults");
public string InspectionPoolPlansPath => Path.Combine(RootPath, "InspectionPool", "Plans");
public string InspectionPoolDefinitionsPath => Path.Combine(RootPath, "InspectionPool", "Definitions");
public string InspectionPoolRunsPath => Path.Combine(RootPath, "InspectionPool", "Runs");
public string DiagnosticsLogsPath => Path.Combine(RootPath, "Diagnostics", "Logs");
public string DumpPath => Path.Combine(RootPath, "Diagnostics", "Dumps");
@@ -69,6 +69,7 @@ namespace XplorePlane.Tests.InspectionDocumentation
public string AssetsPath => Path.Combine(RootPath, "Assets");
public string MatrixResultsPath => Path.Combine(RootPath, "MatrixResults");
public string InspectionPoolPlansPath => Path.Combine(RootPath, "InspectionPool", "Plans");
public string InspectionPoolDefinitionsPath => Path.Combine(RootPath, "InspectionPool", "Definitions");
public string InspectionPoolRunsPath => Path.Combine(RootPath, "InspectionPool", "Runs");
public string DiagnosticsLogsPath => Path.Combine(RootPath, "Diagnostics", "Logs");
public string DumpPath => Path.Combine(RootPath, "Diagnostics", "Dumps");
@@ -380,6 +380,7 @@ namespace XplorePlane.Tests.Services
public string AssetsPath => Path.Combine(RootPath, "Assets");
public string MatrixResultsPath => Path.Combine(RootPath, "MatrixResults");
public string InspectionPoolPlansPath => Path.Combine(RootPath, "InspectionPool", "Plans");
public string InspectionPoolDefinitionsPath => Path.Combine(RootPath, "InspectionPool", "Definitions");
public string InspectionPoolRunsPath => Path.Combine(RootPath, "InspectionPool", "Runs");
public string DiagnosticsLogsPath => Path.Combine(RootPath, "Diagnostics", "Logs");
public string DumpPath => Path.Combine(RootPath, "Diagnostics", "Dumps");
@@ -37,9 +37,9 @@ namespace XplorePlane.Services.Inspection
IXpDataPathService pathService,
ILoggerService logger,
IInspectionReferenceAssetService referenceAssets)
: base(Path.Combine(
(pathService ?? throw new ArgumentNullException(nameof(pathService))).RootPath,
"InspectionPool"), logger.ForModule<JsonInspectionDefinitionRepository>())
: base(
(pathService ?? throw new ArgumentNullException(nameof(pathService))).InspectionPoolDefinitionsPath,
logger.ForModule<JsonInspectionDefinitionRepository>())
{
_referenceAssets = referenceAssets ?? new InspectionReferenceAssetService(Directory);
}
@@ -131,4 +131,4 @@ namespace XplorePlane.Services.Inspection
return clone with { ReferenceImage = clonedReference };
}
}
}
}
@@ -28,6 +28,8 @@ namespace XplorePlane.Services.Storage
string InspectionPoolPlansPath { get; }
string InspectionPoolDefinitionsPath { get; }
string InspectionPoolRunsPath { get; }
string DiagnosticsLogsPath { get; }
@@ -87,6 +89,8 @@ namespace XplorePlane.Services.Storage
public string InspectionPoolPlansPath => EnsureSubdirectory(Path.Combine("InspectionPool", "Plans"));
public string InspectionPoolDefinitionsPath => EnsureSubdirectory(Path.Combine("InspectionPool", "Definitions"));
public string InspectionPoolRunsPath => EnsureSubdirectory(Path.Combine("InspectionPool", "Runs"));
public string DiagnosticsLogsPath => EnsureSubdirectory(Path.Combine("Diagnostics", "Logs"));
@@ -192,6 +196,7 @@ namespace XplorePlane.Services.Storage
Directory.CreateDirectory(Path.Combine(rootPath, "Assets", "Templates"));
Directory.CreateDirectory(Path.Combine(rootPath, "Assets", "Models"));
Directory.CreateDirectory(Path.Combine(rootPath, "InspectionPool", "Plans"));
Directory.CreateDirectory(Path.Combine(rootPath, "InspectionPool", "Definitions"));
Directory.CreateDirectory(Path.Combine(rootPath, "InspectionPool", "Runs"));
Directory.CreateDirectory(Path.Combine(rootPath, "InspectionResults"));
Directory.CreateDirectory(Path.Combine(rootPath, "MatrixResults"));