chore(debug): TEMP probe Ford group-detail parts page

This commit is contained in:
2026-06-05 17:25:24 +03:00
parent 83170bb40c
commit 01d020ffdd

View File

@@ -1830,15 +1830,17 @@ export class PL24FordLegacyService {
if (realLeaf?.id) {
const base = mgs[0].jsonUrl as string; // json-sub-group.action?catCode=...&mainGroupId=...&sharedCatCode=...
const cands = [
base.replace("json-sub-group.action", "json-bom.action") + `&subGroupId=${realLeaf.id}`,
base.replace("json-sub-group.action", "json-bom-detail.action") + `&subGroupId=${realLeaf.id}`,
base.replace("json-sub-group.action", "bom.action") + `&subGroupId=${realLeaf.id}`,
`${base}&subGroupId=${realLeaf.id}`,
base.replace("json-sub-group.action", "group-detail.action") + `&subGroupId=${realLeaf.id}`,
base.replace("json-sub-group.action", "group.action") + `&subGroupId=${realLeaf.id}`,
base.replace("json-sub-group.action", "group-detail.action") + `&subGroup=${realLeaf.id}`,
base.replace("json-sub-group.action", "json-positions.action") + `&subGroupId=${realLeaf.id}`,
];
for (const cu of cands) {
const pr = await this.fetchP4Page(cu, serviceName, false);
const act = cu.match(/\/([a-z-]+\.action)/i)?.[1];
this.logger.warn(`FORD-MAP parts-probe ${act}+subGroupId: len=${pr?.length} head=${pr?.slice(0, 140).replace(/\s+/g, " ")}`);
const act = cu.match(/\/([a-z-]+\.action)\?/i)?.[1] || cu.match(/(subGroupId|subGroup)=/)?.[1];
const pnc = pr ? (pr.match(/json-bom-detail/g) || []).length : 0;
const tc = pr ? (pr.match(/tc-data-row/g) || []).length : 0;
this.logger.warn(`FORD-MAP parts-probe [${act}]: len=${pr?.length} tcRows=${tc} bomDetailLinks=${pnc} head=${pr?.slice(0, 120).replace(/\s+/g, " ")}`);
}
}
}