|
@@ -233,7 +233,7 @@ public class CaseInfoService extends ServiceImpl<CaseInfoMapper, CaseInfo> {
|
|
|
}
|
|
}
|
|
|
if (!Files.isRegularFile(targetDb)) {
|
|
if (!Files.isRegularFile(targetDb)) {
|
|
|
throw new ServerException(500,
|
|
throw new ServerException(500,
|
|
|
- "AI 客户端数据库副本不可用:请关闭占用 aidesk/db/case.duckdb 的进程后重试");
|
|
|
|
|
|
|
+ "AI 客户端数据库副本不可用:请关闭占用 aidesk/db/crime 的进程后重试");
|
|
|
}
|
|
}
|
|
|
try {
|
|
try {
|
|
|
writeAideskCaseJson(caseId, caseInfo, stats.copied());
|
|
writeAideskCaseJson(caseId, caseInfo, stats.copied());
|
|
@@ -272,14 +272,14 @@ public class CaseInfoService extends ServiceImpl<CaseInfoMapper, CaseInfo> {
|
|
|
importMeta.put("fileCount", importFileCount);
|
|
importMeta.put("fileCount", importFileCount);
|
|
|
Map<String, Object> dbMeta = new LinkedHashMap<>();
|
|
Map<String, Object> dbMeta = new LinkedHashMap<>();
|
|
|
dbMeta.put("path", "db");
|
|
dbMeta.put("path", "db");
|
|
|
- dbMeta.put("dbFile", "db/case.duckdb");
|
|
|
|
|
|
|
+ dbMeta.put("dbFile", "db/" + StorageLayout.CASE_DB_FILE);
|
|
|
dbMeta.put("description",
|
|
dbMeta.put("description",
|
|
|
"DuckDB 案件库副本,请只读打开;不要访问案件原库(原库被服务进程写锁持有)。");
|
|
"DuckDB 案件库副本,请只读打开;不要访问案件原库(原库被服务进程写锁持有)。");
|
|
|
Map<String, Object> dirs = new LinkedHashMap<>();
|
|
Map<String, Object> dirs = new LinkedHashMap<>();
|
|
|
dirs.put("import", importMeta);
|
|
dirs.put("import", importMeta);
|
|
|
dirs.put("db", dbMeta);
|
|
dirs.put("db", dbMeta);
|
|
|
meta.put("directories", dirs);
|
|
meta.put("directories", dirs);
|
|
|
- meta.put("usage", "读取原始文件用 import/;DuckDB 查询用 db/case.duckdb。");
|
|
|
|
|
|
|
+ meta.put("usage", "读取原始文件用 import/;DuckDB 查询用 db/" + StorageLayout.CASE_DB_FILE + "。");
|
|
|
Files.writeString(storageLayout.aideskCaseJson(caseId), Json.toStr(meta),
|
|
Files.writeString(storageLayout.aideskCaseJson(caseId), Json.toStr(meta),
|
|
|
StandardCharsets.UTF_8);
|
|
StandardCharsets.UTF_8);
|
|
|
}
|
|
}
|
|
@@ -488,7 +488,7 @@ public class CaseInfoService extends ServiceImpl<CaseInfoMapper, CaseInfo> {
|
|
|
}
|
|
}
|
|
|
// 入库统一用相对数据根的路径,换存储根不需要改库
|
|
// 入库统一用相对数据根的路径,换存储根不需要改库
|
|
|
caseInfo.setDbPath(storageLayout.relative(caseDbPath));
|
|
caseInfo.setDbPath(storageLayout.relative(caseDbPath));
|
|
|
- caseInfo.setDb("case.duckdb");
|
|
|
|
|
|
|
+ caseInfo.setDb(StorageLayout.CASE_DB_FILE);
|
|
|
updateById(caseInfo);
|
|
updateById(caseInfo);
|
|
|
caseStorageManifest.write(caseInfo);
|
|
caseStorageManifest.write(caseInfo);
|
|
|
}
|
|
}
|