Files
ccdi/doc/test-data/purchase_transaction/node_modules/jszip/deps.js
wkc 5ec5913759 fix: 修复中介导入成功条数计算错误
问题:
- 导入成功条数显示为负数
- 原因:成功数量计算使用 validRecords.size() - failures.size()
- 但没有使用实际的数据库操作返回值

修复:
- saveBatchWithUpsert 和 saveBatch 方法现在返回 int
- 累加实际的数据库影响行数
- 使用 actualSuccessCount 变量跟踪真实成功数量

影响范围:
- CcdiIntermediaryPersonImportServiceImpl
- CcdiIntermediaryEntityImportServiceImpl
2026-02-08 17:18:18 +08:00

38 lines
1.3 KiB
JavaScript

"use strict";
const madge = require("madge");
const path = require("path");
const ts = require("typescript");
const DIR = "./lib";
async function main() {
const tsconfigPath = ts.findConfigFile("./", ts.sys.fileExists);
const tsconfig = ts.readConfigFile(tsconfigPath, ts.sys.readFile).config;
const parsedConfig = ts.parseJsonConfigFileContent(tsconfig, ts.sys, "./");
const typedPaths = parsedConfig.fileNames.map(filename => path.resolve("./", filename));
const excludeTypedPaths = path => !typedPaths.includes(path);
const res = await madge(DIR, {
dependencyFilter: excludeTypedPaths
});
const untypedLeaves = res.leaves().map(filename => path.resolve(DIR, filename)).filter(excludeTypedPaths);
if (untypedLeaves.length) {
console.log("Convert next:");
console.log(untypedLeaves.join("\n"));
} else {
console.log("No untyped leaf dependencies found.");
console.log("Try looking at circular dependencies, or the image to decide what to convert next:");
const untypedCircular = res.circular().flat().map(filename => path.resolve(DIR, filename)).filter(excludeTypedPaths);
console.log(untypedCircular.join("\n"));
}
const imagePath = await res.image("graph.svg");
console.log();
console.log("Image written to " + imagePath);
}
main();