weaver-work-cli 0.1.71 → 0.1.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{archive-5P33NAUN.js → archive-THZV4ND4.js} +2 -2
- package/dist/chunks/{archive-oa-YTY5D7DG.js → archive-oa-PQ23OLEV.js} +2 -2
- package/dist/chunks/{asset-3Q5MFQBX.js → asset-RGPROZYH.js} +2 -2
- package/dist/chunks/{asset-idle-PQPNYIS7.js → asset-idle-Z2PDX7NA.js} +2 -2
- package/dist/chunks/{attachment-content-7CN7JB6B.js → attachment-content-R3RPVOYE.js} +3 -3
- package/dist/chunks/{blog-MFHHK6ZR.js → blog-7U3QZPIF.js} +2 -2
- package/dist/chunks/{caizhilian-OZ435AYW.js → caizhilian-3AB42GCV.js} +4 -4
- package/dist/chunks/{calendar-TNJXS5UC.js → calendar-KINM64E4.js} +2 -2
- package/dist/chunks/{chunk-VMVMEIL3.js → chunk-2CHGUYMG.js} +4 -4
- package/dist/chunks/{chunk-G7ZM2VOX.js → chunk-2XED2FKY.js} +34 -34
- package/dist/chunks/{chunk-SKWKCLJX.js → chunk-4BXR6CNB.js} +2 -2
- package/dist/chunks/{chunk-EJLP63UO.js → chunk-4I26YMBY.js} +1 -1
- package/dist/chunks/{chunk-OFCF23FY.js → chunk-4YXAK6OA.js} +15 -4
- package/dist/chunks/{chunk-6MMSLE6K.js → chunk-54ST55IJ.js} +5 -1
- package/dist/chunks/{chunk-SSS75WXW.js → chunk-6HT73VOI.js} +2 -2
- package/dist/chunks/{chunk-XLSJC6JZ.js → chunk-7QFVXP2X.js} +6 -6
- package/dist/chunks/{chunk-SUWR5QEG.js → chunk-AMAPQVBT.js} +1 -0
- package/dist/chunks/{chunk-ICNUOWLL.js → chunk-BWYVS62Z.js} +4 -4
- package/dist/chunks/{chunk-UPVAQJKS.js → chunk-DRUND2PJ.js} +130 -79
- package/dist/chunks/{chunk-Q3EXRNB4.js → chunk-F4HM25K4.js} +1 -1
- package/dist/chunks/{chunk-P3AFNAJ6.js → chunk-GAMGDNTF.js} +1 -1
- package/dist/chunks/{chunk-2DNCKZRX.js → chunk-GWJLAF6B.js} +2 -2
- package/dist/chunks/{chunk-VJWVB55R.js → chunk-IBSJJGXL.js} +2 -2
- package/dist/chunks/{chunk-MZVQKQP5.js → chunk-ICP53R52.js} +4 -4
- package/dist/chunks/{chunk-DRJYPXKC.js → chunk-IU6UB2TD.js} +1 -1
- package/dist/chunks/{chunk-OZ7CJC7W.js → chunk-JMJBPP4B.js} +2 -2
- package/dist/chunks/{chunk-B4NINGP2.js → chunk-L7TYG5SN.js} +2 -2
- package/dist/chunks/{chunk-FRMDHZSN.js → chunk-LLCMOZ5L.js} +11 -11
- package/dist/chunks/{chunk-YN5SD4TX.js → chunk-NUP4RYZK.js} +2 -2
- package/dist/chunks/{chunk-OPTJ6IF7.js → chunk-PAFOLIYQ.js} +1 -1
- package/dist/chunks/{chunk-GB2MCJPG.js → chunk-R3MK2RBN.js} +1 -1
- package/dist/chunks/{chunk-X2C5CGGM.js → chunk-TV46Q4NY.js} +50 -50
- package/dist/chunks/{chunk-LU2SPJYY.js → chunk-XZBYRYWX.js} +2 -2
- package/dist/chunks/{chunk-MD5RXRI3.js → chunk-ZWLWXHJC.js} +2 -2
- package/dist/chunks/{conflict-Y4PXZ2YQ.js → conflict-VPAR7E6F.js} +2 -2
- package/dist/chunks/{contract-C3BGUMBM.js → contract-DDXAO2DZ.js} +2 -2
- package/dist/chunks/{cowork-2AWG4QLA.js → cowork-34QCHMDD.js} +2 -2
- package/dist/chunks/{create-flow-LOUOK46Z.js → create-flow-52PU2OBI.js} +6 -6
- package/dist/chunks/{data-BSFYMXVO.js → data-CLQ62QGD.js} +2 -2
- package/dist/chunks/{ebuilder-form-LAAMTD2Y.js → ebuilder-form-W5R7Q22S.js} +3 -3
- package/dist/chunks/{ehr-36KEX5SH.js → ehr-LCNAVMK5.js} +7 -6
- package/dist/chunks/{entry-mode-6N2IGCS4.js → entry-mode-6Z3ZV3DE.js} +3 -3
- package/dist/chunks/{env-QYLS3EB3.js → env-RDKWAARB.js} +2 -2
- package/dist/chunks/{esb-PTYS3E67.js → esb-ANKPUU65.js} +4 -4
- package/dist/chunks/{factory-LPFPKZ4T.js → factory-434B7RAT.js} +1 -1
- package/dist/chunks/{fna-JNHCLRDE.js → fna-AKBSG5HI.js} +2 -2
- package/dist/chunks/{group-chat-QP2WX4QJ.js → group-chat-PROTW22R.js} +3 -3
- package/dist/chunks/{host-7BVR7CQ3.js → host-5R2SNFWD.js} +3 -3
- package/dist/chunks/{host-57LSRSE7.js → host-7FJW4E7R.js} +3 -3
- package/dist/chunks/{host-K2ZKNXME.js → host-CGXUFQO4.js} +3 -3
- package/dist/chunks/{host-NS36QFLR.js → host-PDJAKCT7.js} +3 -3
- package/dist/chunks/{host-C2BLBIID.js → host-WO4L5G5I.js} +3 -3
- package/dist/chunks/{host-QXFKQXNX.js → host-XIYG4F4B.js} +3 -3
- package/dist/chunks/{hrm-FSGO4NSH.js → hrm-WGODDTEH.js} +3 -3
- package/dist/chunks/{im-2BFGS2XO.js → im-YKTKAJU3.js} +3 -3
- package/dist/chunks/{invoice-JKLTTHSZ.js → invoice-PVYCCCVM.js} +3 -3
- package/dist/chunks/{jiuchuanhui-PTABJE7V.js → jiuchuanhui-RKOQW7BY.js} +3 -3
- package/dist/chunks/{lazy-dispatch-YN2ZP3CS.js → lazy-dispatch-DW45AFQ5.js} +5 -5
- package/dist/chunks/{mail-YNO7ZZUK.js → mail-BNB5S4NW.js} +2 -2
- package/dist/chunks/{meeting-NIDHDBCB.js → meeting-O2KDJH66.js} +13 -13
- package/dist/chunks/{minute-doc-G3QAT7DE.js → minute-doc-JUCG56GY.js} +4 -4
- package/dist/chunks/{okr-QC52G6AJ.js → okr-LWFGWOE7.js} +2 -2
- package/dist/chunks/{operations-MQV32ITT.js → operations-532PN5OB.js} +4 -4
- package/dist/chunks/{performance-3MQ3AHDQ.js → performance-7W5COCFU.js} +2 -2
- package/dist/chunks/{plan-ISINIEPY.js → plan-ZVY3IYTL.js} +2 -2
- package/dist/chunks/{project-IJ6DVKT7.js → project-SA62B7MH.js} +2 -2
- package/dist/chunks/{reception-3H5LUG2I.js → reception-NGIONPQ3.js} +113 -44
- package/dist/chunks/{recruit-stage-MIOJXP6W.js → recruit-stage-WOSN6MGP.js} +868 -128
- package/dist/chunks/{registry-NHHKOEU3.js → registry-N7P3W2RD.js} +4 -4
- package/dist/chunks/{registry-3S7AVMXR.js → registry-R72GWXOG.js} +3 -3
- package/dist/chunks/{registry-3GQRYP2R.js → registry-RIQ67ZT7.js} +12 -12
- package/dist/chunks/{room-recommend-IOKBJVYP.js → room-recommend-KCGIVUFR.js} +4 -4
- package/dist/chunks/{schedule-IB6EUARH.js → schedule-6UP27HQ4.js} +4 -4
- package/dist/chunks/{smart-extract-N2TK3CEF.js → smart-extract-DDOQSPRB.js} +3 -3
- package/dist/chunks/{workflow-RINBAL2M.js → workflow-V5ALD6QZ.js} +5 -5
- package/dist/core/output.js +4 -0
- package/dist/index.js +34 -34
- package/dist/shortcuts/ehr/operations/recruit-position.js +4 -3
- package/dist/shortcuts/ehr/operations/recruit-short-cache.js +6 -2
- package/dist/shortcuts/ehr/operations/recruit-write.js +3 -3
- package/dist/shortcuts/ehr/operations/recruit.js +206 -82
- package/dist/shortcuts/ehr/operations/shared.js +31 -0
- package/dist/shortcuts/reception/constants.js +22 -0
- package/dist/shortcuts/reception/index.js +4 -0
- package/dist/shortcuts/reception/manifest.js +15 -1
- package/dist/shortcuts/reception/operations/doc.js +24 -11
- package/dist/shortcuts/reception/operations/docrender.js +18 -1
- package/dist/shortcuts/reception/operations/render-assets.js +93 -22
- package/dist/shortcuts/recruit-stage/context.js +12 -6
- package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +19 -10
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +454 -22
- package/dist/shortcuts/recruit-stage/operations/list.js +72 -1
- package/dist/shortcuts/recruit-stage/operations/profile.js +13 -5
- package/dist/shortcuts/recruit-stage/operations/registry.js +18 -2
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +192 -26
- package/dist/shortcuts/recruit-stage/operations/search.js +78 -14
- package/dist/shortcuts/recruit-stage/operations/shortlist.js +122 -0
- package/dist/shortcuts/recruit-stage/shared.js +147 -3
- package/dist/shortcuts/workflow/operations/form.js +36 -2
- package/package.json +1 -1
- package/skills/weaver-e10-jucailin/SKILL.md +7 -3
- package/skills/weaver-e10-jucailin/references/recruit-output-links.md +33 -0
- package/skills/weaver-e10-jucailin/references/recruit-write.md +2 -0
- package/skills/weaver-e10-reception-flow/SKILL.md +97 -41
- package/skills/weaver-e10-reception-flow/references/guide.md +3 -1
- package/skills/weaver-e10-recruit-stage/SKILL.md +499 -122
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +67 -44
- package/skills/weaver-e10-recruit-stage/lib/interview-conflict.mjs +279 -0
- package/skills/weaver-e10-recruit-stage/lib/interview-summary.mjs +198 -0
- package/skills/weaver-e10-recruit-stage/lib/recruit-shortlist.mjs +697 -0
- package/skills/weaver-e10-recruit-stage/lib/recruit-write-helper.mjs +159 -11
- package/skills/weaver-e10-recruit-stage/references/env-fixed-values.md +2 -2
- package/skills/weaver-e10-recruit-stage/references/position-templates.md +19 -18
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +19 -18
- package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-detail-process.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +15 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-failure-fallback.md +37 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-interview-not-attended.md +4 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +62 -33
- package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +43 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-maint.md +41 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +4 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-my-positions.md +2 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +25 -7
- package/skills/weaver-e10-recruit-stage/references/recruit-platform-compat.md +51 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-report-templates.md +63 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resolve-metadata.md +4 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import-batch.md +2 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +58 -33
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-parse.md +4 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-search-by-tag.md +5 -5
- package/skills/weaver-e10-recruit-stage/references/recruit-search-candidate.md +2 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +10 -10
- package/skills/weaver-e10-recruit-stage/references/recruit-urge-feedback.md +2 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +2 -2
- package/skills/weaver-e10-recruit-stage/templates/candidate-evidence.html +106 -0
- package/skills/weaver-e10-recruit-stage/templates/interview-summary.html +325 -0
- package/skills/weaver-e10-recruit-stage/templates/match-report.html +161 -73
- package/skills/weaver-e10-jucailin/references/source-manifest.json +0 -152
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* 面试安排汇总一条命令:面试台账 → 三类冲突检测 → 图文报告。
|
|
4
|
+
*
|
|
5
|
+
* 设计目标(2026-11-28 复盘固化):
|
|
6
|
+
* 1. 把原来「取数脚本 → 冲突脚本 → 报告脚本」三次往返压成一次;
|
|
7
|
+
* 2. stdout 只给紧凑摘要(场次/方式/状态/冲突计数/产物路径),不回显整段 rows(原 18KB);
|
|
8
|
+
* 3. 全程 process.execPath 调 dist/index.js,不 spawn .cmd/.ps1(Windows 下 EINVAL)。
|
|
9
|
+
*
|
|
10
|
+
* 用法:
|
|
11
|
+
* node lib/interview-summary.mjs --recent 14 --out-dir <目录> [--print-rows]
|
|
12
|
+
* node lib/interview-summary.mjs --recent 7 --out-dir <目录>
|
|
13
|
+
*/
|
|
14
|
+
import { execFileSync } from 'node:child_process';
|
|
15
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
16
|
+
import { dirname, join, resolve } from 'node:path';
|
|
17
|
+
import { fileURLToPath } from 'node:url';
|
|
18
|
+
import { tmpdir } from 'node:os';
|
|
19
|
+
|
|
20
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
21
|
+
const SKILL_DIR = resolve(__dirname, '..');
|
|
22
|
+
const TEMPLATE = join(SKILL_DIR, 'templates', 'interview-summary.html');
|
|
23
|
+
const CONFLICT_SCRIPT = join(__dirname, 'interview-conflict.mjs');
|
|
24
|
+
|
|
25
|
+
function fail(message, extra) {
|
|
26
|
+
console.error(JSON.stringify({ ok: false, message, ...extra }, null, 2));
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** CLI 入口发现:环境变量 → 当前 node 同级 node_modules → npm 全局根。禁止 <span>.cmd</span>。 */
|
|
31
|
+
function resolveCliEntry() {
|
|
32
|
+
const fromEnv = process.env.WEAVER_WORK_CLI_ENTRY;
|
|
33
|
+
if (fromEnv && existsSync(fromEnv)) return fromEnv;
|
|
34
|
+
|
|
35
|
+
const execDir = dirname(process.execPath);
|
|
36
|
+
const candidates = [
|
|
37
|
+
join(execDir, 'node_modules', 'weaver-work-cli', 'dist', 'index.js'),
|
|
38
|
+
join(execDir, '..', 'lib', 'node_modules', 'weaver-work-cli', 'dist', 'index.js'),
|
|
39
|
+
];
|
|
40
|
+
try {
|
|
41
|
+
const npmRoot = execFileSync(process.platform === 'win32' ? 'npm.cmd' : 'npm', ['root', '-g'], {
|
|
42
|
+
encoding: 'utf8',
|
|
43
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
44
|
+
}).trim();
|
|
45
|
+
if (npmRoot) candidates.push(join(npmRoot, 'weaver-work-cli', 'dist', 'index.js'));
|
|
46
|
+
} catch {
|
|
47
|
+
/* npm 不可用时只靠前两个候选 */
|
|
48
|
+
}
|
|
49
|
+
for (const c of candidates) if (c && existsSync(c)) return c;
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function parseArgs(argv) {
|
|
54
|
+
const opts = { recent: 14, outDir: join(tmpdir(), "recruit-interview-out"), printRows: false };
|
|
55
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
56
|
+
const a = argv[i];
|
|
57
|
+
if (a === '--recent') opts.recent = Number(argv[++i]) || 14;
|
|
58
|
+
else if (a === '--out-dir') opts.outDir = resolve(argv[++i] || '.');
|
|
59
|
+
else if (a === '--print-rows') opts.printRows = true;
|
|
60
|
+
}
|
|
61
|
+
return opts;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function runCli(cliEntry, operation, jsonArgs) {
|
|
65
|
+
const argsFile = join(tmpdir(), `recruit-summary-args-${Date.now()}-${Math.random().toString(36).slice(2)}.json`);
|
|
66
|
+
writeFileSync(argsFile, JSON.stringify(jsonArgs), 'utf8');
|
|
67
|
+
const stdout = execFileSync(
|
|
68
|
+
process.execPath,
|
|
69
|
+
[cliEntry, '--json', 'recruit-stage', 'run', operation, '--input', argsFile, '--allow-file-input'],
|
|
70
|
+
{ encoding: 'utf8', maxBuffer: 134217728 },
|
|
71
|
+
);
|
|
72
|
+
const envelope = JSON.parse(stdout.slice(stdout.indexOf('{')));
|
|
73
|
+
if (!envelope.ok) {
|
|
74
|
+
const err = envelope.error || {};
|
|
75
|
+
fail('面试台账查询失败', { stage: 'list', type: err.type, subtype: err.subtype, detail: err.message });
|
|
76
|
+
}
|
|
77
|
+
return envelope.data || {};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function stamp(d = new Date()) {
|
|
81
|
+
const p = (n) => String(n).padStart(2, '0');
|
|
82
|
+
return `${d.getFullYear()}${p(d.getMonth() + 1)}${p(d.getDate())}_${p(d.getHours())}${p(d.getMinutes())}${p(d.getSeconds())}`;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function countBy(rows, key) {
|
|
86
|
+
const m = new Map();
|
|
87
|
+
for (const r of rows) {
|
|
88
|
+
const v = r[key] || '—';
|
|
89
|
+
m.set(v, (m.get(v) || 0) + 1);
|
|
90
|
+
}
|
|
91
|
+
return Object.fromEntries([...m.entries()].sort((a, b) => b[1] - a[1]));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function main() {
|
|
95
|
+
const opts = parseArgs(process.argv.slice(2));
|
|
96
|
+
|
|
97
|
+
const cliEntry = resolveCliEntry();
|
|
98
|
+
if (!cliEntry) {
|
|
99
|
+
fail('未找到 weaver-work-cli 的 dist/index.js', {
|
|
100
|
+
hint: '设置 WEAVER_WORK_CLI_ENTRY 指向 dist/index.js,或确认 CLI 已安装',
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const data = runCli(cliEntry, 'recruit-stage.list', {
|
|
105
|
+
type: 'interview',
|
|
106
|
+
recent: opts.recent,
|
|
107
|
+
sort: 'start_time',
|
|
108
|
+
pageSize: 200,
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
const rows = Array.isArray(data.rows) ? data.rows : [];
|
|
112
|
+
if (!rows.length) {
|
|
113
|
+
console.log(JSON.stringify({ ok: true, recentDays: opts.recent, total: 0, message: '窗口内没有面试安排' }, null, 2));
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
mkdirSync(opts.outDir, { recursive: true });
|
|
118
|
+
const ts = stamp();
|
|
119
|
+
const rowsFile = join(opts.outDir, `interview-rows_${ts}.json`);
|
|
120
|
+
writeFileSync(rowsFile, JSON.stringify(rows, null, 2), 'utf8');
|
|
121
|
+
|
|
122
|
+
// 冲突检测复用现有脚本,保持口径单一来源
|
|
123
|
+
let conflicts = { conflicts: [], candidateConflicts: [], aiPressure: { windows: [] }, checked: 0, aiExcluded: 0 };
|
|
124
|
+
try {
|
|
125
|
+
const out = execFileSync(process.execPath, [CONFLICT_SCRIPT, rowsFile], { encoding: 'utf8', maxBuffer: 33554432 });
|
|
126
|
+
conflicts = JSON.parse(out.slice(out.indexOf('{')));
|
|
127
|
+
} catch (e) {
|
|
128
|
+
conflicts.error = 'conflict_check_failed';
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const env = data.env || '';
|
|
132
|
+
const baseUrl = env ? (env.startsWith('http') ? env.split('/').slice(0, 3).join('/') : `https://${env}`) : '';
|
|
133
|
+
|
|
134
|
+
const summaryData = {
|
|
135
|
+
baseUrl,
|
|
136
|
+
generatedAt: new Date().toISOString().slice(0, 16).replace('T', ' '),
|
|
137
|
+
recentDays: opts.recent,
|
|
138
|
+
interviewObjId: '',
|
|
139
|
+
listUrl: baseUrl ? `${baseUrl}/sp/custom/ecode/recruit-talent/interview` : '',
|
|
140
|
+
rows: rows.map((r) => ({
|
|
141
|
+
formDataId: r.form_data_id,
|
|
142
|
+
talentId: '',
|
|
143
|
+
candidateName: r.candidate_name,
|
|
144
|
+
positionName: r.position_name,
|
|
145
|
+
startTime: r.start_time,
|
|
146
|
+
rounds: r.interview_rounds,
|
|
147
|
+
session: r.interview_session,
|
|
148
|
+
type: r.interview_type,
|
|
149
|
+
interviewer: r.interviewer,
|
|
150
|
+
status: r.union_status,
|
|
151
|
+
})),
|
|
152
|
+
conflicts: conflicts.conflicts || [],
|
|
153
|
+
candidateConflicts: conflicts.candidateConflicts || [],
|
|
154
|
+
aiPressure: conflicts.aiPressure || { threshold: 8, windows: [] },
|
|
155
|
+
checked: conflicts.checked || 0,
|
|
156
|
+
aiExcluded: conflicts.aiExcluded || 0,
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
let reportFile = '';
|
|
160
|
+
if (existsSync(TEMPLATE)) {
|
|
161
|
+
const tpl = readFileSync(TEMPLATE, 'utf8');
|
|
162
|
+
const html = tpl.includes('__SUMMARY_DATA_PLACEHOLDER__')
|
|
163
|
+
? tpl.replace('__SUMMARY_DATA_PLACEHOLDER__', JSON.stringify(summaryData))
|
|
164
|
+
: tpl;
|
|
165
|
+
reportFile = join(opts.outDir, `面试安排汇总_${ts}.html`);
|
|
166
|
+
writeFileSync(reportFile, html, 'utf8');
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
const sorted = rows
|
|
170
|
+
.slice()
|
|
171
|
+
.sort((a, b) => String(a.start_time).localeCompare(String(b.start_time)));
|
|
172
|
+
|
|
173
|
+
const compact = {
|
|
174
|
+
ok: true,
|
|
175
|
+
recentDays: opts.recent,
|
|
176
|
+
count: rows.length,
|
|
177
|
+
byType: countBy(rows, 'interview_type'),
|
|
178
|
+
byStatus: countBy(rows, 'union_status'),
|
|
179
|
+
conflicts: (conflicts.conflicts || []).length,
|
|
180
|
+
candidateConflicts: (conflicts.candidateConflicts || []).length,
|
|
181
|
+
aiPressureWindows: ((conflicts.aiPressure || {}).windows || []).length,
|
|
182
|
+
checked: conflicts.checked || 0,
|
|
183
|
+
aiExcluded: conflicts.aiExcluded || 0,
|
|
184
|
+
rowsFile,
|
|
185
|
+
reportFile,
|
|
186
|
+
baseUrl,
|
|
187
|
+
};
|
|
188
|
+
console.log(JSON.stringify(compact, null, 2));
|
|
189
|
+
|
|
190
|
+
if (opts.printRows) {
|
|
191
|
+
for (const r of sorted) {
|
|
192
|
+
const where = r.participation ? r.participation.value || r.participation.mode : '';
|
|
193
|
+
console.log([r.start_time, r.candidate_name, r.position_name, r.interview_type, r.interviewer, r.union_status, where].join(' | '));
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
main();
|