weaver-work-cli 0.1.70 → 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-VUTREF3P.js → archive-THZV4ND4.js} +22 -5
- package/dist/chunks/{archive-oa-VXXO4RTB.js → archive-oa-PQ23OLEV.js} +17 -5
- package/dist/chunks/{asset-45U6TY7I.js → asset-RGPROZYH.js} +22 -5
- package/dist/chunks/{asset-idle-YCRBMTIT.js → asset-idle-Z2PDX7NA.js} +15 -5
- package/dist/chunks/{attachment-content-DMU7KNZ7.js → attachment-content-R3RPVOYE.js} +3 -3
- package/dist/chunks/{blog-5AML4WMG.js → blog-7U3QZPIF.js} +25 -5
- package/dist/chunks/{caizhilian-3P7BUNHT.js → caizhilian-3AB42GCV.js} +22 -8
- package/dist/chunks/{calendar-2HUXM3CZ.js → calendar-KINM64E4.js} +15 -5
- package/dist/chunks/{chunk-EHH363SP.js → chunk-2CHGUYMG.js} +4 -4
- package/dist/chunks/{chunk-GWM5TLIK.js → chunk-2XED2FKY.js} +34 -34
- package/dist/chunks/{chunk-DVFA3ODS.js → chunk-35A56FJ7.js} +12 -0
- package/dist/chunks/{chunk-QYDSTYGG.js → chunk-4BXR6CNB.js} +3 -3
- package/dist/chunks/{chunk-KDOJW5LH.js → chunk-4I26YMBY.js} +1 -1
- package/dist/chunks/{chunk-X6PMJQGO.js → chunk-4YXAK6OA.js} +19 -8
- package/dist/chunks/{chunk-HG6INLH6.js → chunk-54ST55IJ.js} +28 -7
- package/dist/chunks/{chunk-DSBV4GRK.js → chunk-6HT73VOI.js} +3 -3
- package/dist/chunks/{chunk-4W6BSNIL.js → chunk-7QFVXP2X.js} +6 -6
- package/dist/chunks/{chunk-I5XB4MZT.js → chunk-AMAPQVBT.js} +95 -65
- package/dist/chunks/{chunk-L2A3COWV.js → chunk-BWYVS62Z.js} +4 -4
- package/dist/chunks/{chunk-UPVAQJKS.js → chunk-DRUND2PJ.js} +130 -79
- package/dist/chunks/{chunk-LJE7RZNC.js → chunk-F4HM25K4.js} +1 -1
- package/dist/chunks/{chunk-T24EBWAZ.js → chunk-GAMGDNTF.js} +48 -21
- package/dist/chunks/{chunk-H2NRTGZR.js → chunk-GWJLAF6B.js} +3 -3
- package/dist/chunks/{chunk-XIBMZEDB.js → chunk-IBSJJGXL.js} +2 -2
- package/dist/chunks/{chunk-VZUH3LKI.js → chunk-ICP53R52.js} +167 -157
- package/dist/chunks/{chunk-LRKKKO5A.js → chunk-IU6UB2TD.js} +3 -4
- package/dist/chunks/{chunk-GTAFCAVP.js → chunk-IZCQU5D5.js} +1 -1
- package/dist/chunks/{chunk-727VKJQK.js → chunk-JMJBPP4B.js} +2 -2
- package/dist/chunks/{chunk-UVWW5ABZ.js → chunk-L7TYG5SN.js} +3 -3
- package/dist/chunks/{chunk-HAORST2G.js → chunk-LLCMOZ5L.js} +11 -11
- package/dist/chunks/{chunk-U3OO3IZF.js → chunk-NUP4RYZK.js} +20 -7
- package/dist/chunks/{chunk-IVCOZCAW.js → chunk-PAFOLIYQ.js} +1 -1
- package/dist/chunks/{chunk-LSVA7QA6.js → chunk-R3MK2RBN.js} +3 -1
- package/dist/chunks/{chunk-GFOFUH6O.js → chunk-TV46Q4NY.js} +52 -51
- package/dist/chunks/chunk-WM33BSIL.js +136 -0
- package/dist/chunks/{chunk-7CINV2BU.js → chunk-XZBYRYWX.js} +2 -2
- package/dist/chunks/{chunk-E7VWE2XI.js → chunk-ZWLWXHJC.js} +3 -3
- package/dist/chunks/{conflict-YW5BULJ3.js → conflict-VPAR7E6F.js} +2 -2
- package/dist/chunks/{contract-3PMHUASH.js → contract-DDXAO2DZ.js} +48 -5
- package/dist/chunks/{cowork-FZBTTBYX.js → cowork-34QCHMDD.js} +37 -8
- package/dist/chunks/{create-flow-5OBS3B3V.js → create-flow-52PU2OBI.js} +6 -6
- package/dist/chunks/{data-2YZ6A6TL.js → data-CLQ62QGD.js} +99 -184
- package/dist/chunks/{ebuilder-form-AWPTMZBZ.js → ebuilder-form-W5R7Q22S.js} +17 -7
- package/dist/chunks/{ehr-MNPR4TE5.js → ehr-LCNAVMK5.js} +67 -17
- package/dist/chunks/{entry-mode-L65OWPFM.js → entry-mode-6Z3ZV3DE.js} +3 -3
- package/dist/chunks/{env-XW7LYIME.js → env-RDKWAARB.js} +2 -2
- package/dist/chunks/{esb-GSB5QCEX.js → esb-ANKPUU65.js} +17 -7
- package/dist/chunks/{factory-MHFZZAGH.js → factory-434B7RAT.js} +1 -1
- package/dist/chunks/{fna-XBSNUS2V.js → fna-AKBSG5HI.js} +15 -5
- package/dist/chunks/{group-chat-EEOLO5NM.js → group-chat-PROTW22R.js} +3 -3
- package/dist/chunks/{host-NVDG3NC6.js → host-5R2SNFWD.js} +4 -4
- package/dist/chunks/{host-2UMNXX5H.js → host-7FJW4E7R.js} +4 -4
- package/dist/chunks/{host-XVWBOSEN.js → host-CGXUFQO4.js} +4 -4
- package/dist/chunks/{host-R7BP3CTI.js → host-PDJAKCT7.js} +6 -4
- package/dist/chunks/{host-SYPCA63D.js → host-WO4L5G5I.js} +4 -4
- package/dist/chunks/{host-BD44ASOD.js → host-XIYG4F4B.js} +4 -4
- package/dist/chunks/{hrm-FZUDJAND.js → hrm-WGODDTEH.js} +15 -6
- package/dist/chunks/{im-F5NENPD7.js → im-YKTKAJU3.js} +16 -6
- package/dist/chunks/{invoice-DS6FLU55.js → invoice-PVYCCCVM.js} +27 -6
- package/dist/chunks/{jiuchuanhui-JCBUR563.js → jiuchuanhui-RKOQW7BY.js} +19 -6
- package/dist/chunks/{lazy-dispatch-F6O2EPGR.js → lazy-dispatch-DW45AFQ5.js} +6 -6
- package/dist/chunks/{mail-ZEOSANEJ.js → mail-BNB5S4NW.js} +116 -97
- package/dist/chunks/{meeting-PCD5EPBF.js → meeting-O2KDJH66.js} +29 -16
- package/dist/chunks/{minute-doc-WTZJVCHG.js → minute-doc-JUCG56GY.js} +4 -4
- package/dist/chunks/{okr-OZUMTMCL.js → okr-LWFGWOE7.js} +15 -5
- package/dist/chunks/{operations-LQY3FTPH.js → operations-2WHIF5WV.js} +1 -1
- package/dist/chunks/{operations-UTUWFJTX.js → operations-532PN5OB.js} +5 -5
- package/dist/chunks/{performance-SMVTPK6T.js → performance-7W5COCFU.js} +92 -7
- package/dist/chunks/{plan-C2NENH42.js → plan-ZVY3IYTL.js} +15 -5
- package/dist/chunks/{project-FAJ2P3UR.js → project-SA62B7MH.js} +18 -5
- package/dist/chunks/{reception-NH6MJFPR.js → reception-NGIONPQ3.js} +128 -49
- package/dist/chunks/{recruit-stage-DPEFHLSE.js → recruit-stage-WOSN6MGP.js} +1264 -197
- package/dist/chunks/{registry-FTPUUHWC.js → registry-N7P3W2RD.js} +5 -5
- package/dist/chunks/{registry-3B3OAJYX.js → registry-R72GWXOG.js} +4 -4
- package/dist/chunks/{registry-ZQ7OONCB.js → registry-RIQ67ZT7.js} +12 -12
- package/dist/chunks/{room-recommend-73NBN3RU.js → room-recommend-KCGIVUFR.js} +4 -4
- package/dist/chunks/{schedule-SDBOBBUQ.js → schedule-6UP27HQ4.js} +4 -4
- package/dist/chunks/{smart-extract-GTYKF5TJ.js → smart-extract-DDOQSPRB.js} +19 -6
- package/dist/chunks/{workflow-OWHWLAOX.js → workflow-V5ALD6QZ.js} +22 -8
- package/dist/cmd/auth/index.js +23 -0
- package/dist/cmd/e10/index.js +2 -1
- package/dist/cmd/index.js +2 -0
- package/dist/core/manifest-view.js +207 -0
- package/dist/core/output.js +42 -8
- package/dist/index.js +35 -35
- package/dist/internal/e10/auth/crypto.js +18 -8
- package/dist/internal/e10/auth/error-log.js +1 -2
- package/dist/internal/e10/auth/messages.js +2 -3
- package/dist/internal/e10/auth/xiaoe.js +1 -1
- package/dist/internal/e10/tls-policy.js +61 -13
- package/dist/shortcuts/archive/index.js +11 -2
- package/dist/shortcuts/archive/operations/download.js +1 -0
- package/dist/shortcuts/archive/operations/flow-url.js +3 -0
- package/dist/shortcuts/archive/operations/prelib.js +2 -0
- package/dist/shortcuts/archive/operations/upload.js +1 -0
- package/dist/shortcuts/archive-oa/index.js +11 -2
- package/dist/shortcuts/archive-oa/operations/borrow-car.js +2 -0
- package/dist/shortcuts/asset/index.js +11 -2
- package/dist/shortcuts/asset/manifest.js +7 -0
- package/dist/shortcuts/asset-idle/index.js +11 -2
- package/dist/shortcuts/blog/index.js +11 -2
- package/dist/shortcuts/blog/manifest.js +10 -0
- package/dist/shortcuts/caizhilian/host.js +20 -4
- package/dist/shortcuts/caizhilian/index.js +12 -2
- package/dist/shortcuts/caizhilian/manifest.js +4 -25
- package/dist/shortcuts/caizhilian/operations/handlers/search.js +34 -0
- package/dist/shortcuts/caizhilian/operations/registry.js +25 -1
- package/dist/shortcuts/calendar/index.js +11 -2
- package/dist/shortcuts/contract/index.js +11 -2
- package/dist/shortcuts/contract/manifest.js +32 -0
- package/dist/shortcuts/contract/operations/write.js +3 -0
- package/dist/shortcuts/cowork/index.js +21 -5
- package/dist/shortcuts/cowork/manifest.js +3 -0
- package/dist/shortcuts/cowork/operations/discuss-write.js +2 -0
- package/dist/shortcuts/cowork/operations/item-write.js +3 -0
- package/dist/shortcuts/cowork/operations/member-write.js +2 -0
- package/dist/shortcuts/cowork/operations/permission-write.js +2 -0
- package/dist/shortcuts/cowork/operations/review-write.js +1 -0
- package/dist/shortcuts/data/errors.js +16 -29
- package/dist/shortcuts/data/host.js +16 -7
- package/dist/shortcuts/data/index.js +12 -41
- package/dist/shortcuts/data/manifest.js +5 -44
- package/dist/shortcuts/data/operations/attend.js +2 -2
- package/dist/shortcuts/data/operations/conf.js +0 -88
- package/dist/shortcuts/data/operations/ds.js +4 -4
- package/dist/shortcuts/data/operations/index.js +1 -5
- package/dist/shortcuts/data/operations/module.js +40 -14
- package/dist/shortcuts/data/operations/query.js +2 -2
- package/dist/shortcuts/ebuilder-form/index.js +11 -2
- package/dist/shortcuts/ebuilder-form/manifest.js +12 -0
- package/dist/shortcuts/ehr/index.js +11 -2
- package/dist/shortcuts/ehr/operations/attend-write.js +51 -8
- 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/esb/index.js +11 -2
- package/dist/shortcuts/esb/manifest.js +2 -0
- package/dist/shortcuts/fna/index.js +11 -2
- package/dist/shortcuts/hrm/index.js +11 -1
- package/dist/shortcuts/im/index.js +11 -2
- package/dist/shortcuts/invoice/index.js +11 -2
- package/dist/shortcuts/invoice/manifest.js +8 -0
- package/dist/shortcuts/jiuchuanhui/index.js +15 -1
- package/dist/shortcuts/jiuchuanhui/manifest.js +2 -0
- package/dist/shortcuts/mail/errors.js +14 -0
- package/dist/shortcuts/mail/index.js +23 -6
- package/dist/shortcuts/mail/manifest.js +11 -4
- package/dist/shortcuts/mail/operations/mail-blacklist.js +6 -6
- package/dist/shortcuts/mail/operations/mail-contacts.js +10 -10
- package/dist/shortcuts/mail/operations/mail-manage.js +15 -14
- package/dist/shortcuts/mail/operations/mail-read.js +7 -25
- package/dist/shortcuts/mail/operations/mail-send.js +12 -12
- package/dist/shortcuts/mail/operations/mail-sign.js +10 -10
- package/dist/shortcuts/mail/operations/mail-template.js +10 -10
- package/dist/shortcuts/meeting/index.js +11 -2
- package/dist/shortcuts/meeting/operations/invitation-publish.js +1 -0
- package/dist/shortcuts/okr/index.js +11 -2
- package/dist/shortcuts/performance/index.js +62 -3
- package/dist/shortcuts/performance/scheme-validate.js +7 -0
- package/dist/shortcuts/performance/shared.js +40 -2
- package/dist/shortcuts/plan/index.js +11 -2
- package/dist/shortcuts/project/index.js +11 -2
- package/dist/shortcuts/project/operations/write.js +3 -0
- package/dist/shortcuts/reception/constants.js +22 -0
- package/dist/shortcuts/reception/index.js +15 -2
- package/dist/shortcuts/reception/manifest.js +17 -3
- package/dist/shortcuts/reception/operations/ask.js +3 -0
- 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/index.js +22 -3
- package/dist/shortcuts/recruit-stage/manifest.js +2 -0
- package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +19 -10
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +487 -38
- package/dist/shortcuts/recruit-stage/operations/list.js +72 -1
- package/dist/shortcuts/recruit-stage/operations/profile.js +194 -0
- package/dist/shortcuts/recruit-stage/operations/registry.js +20 -2
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +258 -63
- package/dist/shortcuts/recruit-stage/operations/search.js +226 -27
- package/dist/shortcuts/recruit-stage/operations/shortlist.js +122 -0
- package/dist/shortcuts/recruit-stage/operations/tag.js +17 -3
- package/dist/shortcuts/recruit-stage/shared.js +158 -4
- package/dist/shortcuts/smart-extract/index.js +11 -2
- package/dist/shortcuts/smart-extract/manifest.js +1 -0
- package/dist/shortcuts/smart-extract/operations/save.js +2 -0
- package/dist/shortcuts/workflow/index.js +21 -1
- package/dist/shortcuts/workflow/operations/form.js +36 -2
- package/dist/shortcuts/workflow/operations/read.js +2 -2
- package/dist/shortcuts/workflow/operations/write.js +1 -1
- package/docs/caizhilian.md +1 -1
- package/docs/contract.md +1 -0
- package/docs/data.md +22 -22
- package/docs/e10-auth.md +41 -33
- package/docs/ehr.md +2 -0
- package/docs/reception.md +4 -3
- package/package.json +1 -1
- package/scripts/pysite/__pycache__/sitecustomize.cpython-312.pyc +0 -0
- package/scripts/pysite/__pycache__/sitecustomize.cpython-313.pyc +0 -0
- package/scripts/pysite/sitecustomize.py +41 -0
- package/skill-template/domains/data.md +4 -4
- package/skills/weaver-e10-caizhilian/SKILL.md +1 -1
- package/skills/weaver-e10-caizhilian/references/org-browser.md +1 -0
- package/skills/weaver-e10-cowork/SKILL.md +3 -1
- package/skills/weaver-e10-data/SKILL.md +12 -16
- package/skills/weaver-e10-data/references/config-center.md +6 -7
- package/skills/weaver-e10-data/references/datasource.md +1 -1
- package/skills/weaver-e10-data/references/scene-and-misc.md +2 -2
- package/skills/weaver-e10-jiuchuanhui/SKILL.md +6 -4
- package/skills/weaver-e10-jiuchuanhui/references/clue.md +2 -2
- package/skills/weaver-e10-jiuchuanhui/references/customer.md +18 -8
- package/skills/weaver-e10-jiuchuanhui/references/sale.md +2 -2
- package/skills/weaver-e10-jucailin/SKILL.md +7 -3
- package/skills/weaver-e10-jucailin/references/attend-write.md +1 -1
- 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-mail/SKILL.md +4 -1
- package/skills/weaver-e10-mail/references/mail-read.md +4 -2
- package/skills/weaver-e10-mail/references/safety-boundaries.md +1 -0
- package/skills/weaver-e10-okr/references/source-manifest.json +3 -3
- package/skills/weaver-e10-performance/SKILL.md +8 -6
- 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 +557 -75
- 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 +507 -0
- package/skills/weaver-e10-recruit-stage/references/env-fixed-values.md +87 -0
- 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 +64 -28
- 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 +11 -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 +265 -0
- package/skills/weaver-e10-shared/SKILL.md +22 -1
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +2 -2
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +3 -3
- package/skills/weaver-e10-jucailin/references/source-manifest.json +0 -152
|
@@ -23,7 +23,7 @@ import schoolTiers from '../school-tiers.json';
|
|
|
23
23
|
import { rsSuccess, schemaOf } from './types.js';
|
|
24
24
|
import { rsFail, rsValidationError, rsConfirmationError } from '../errors.js';
|
|
25
25
|
import { objIdOf, formIdOf, saveFormData, getFormLayoutMeta, runSaveButtonEsbActions, getTableMapping, invertTableMapping, datasetSaveFormData, datasetUpdateFormData, checkUnique, getCandidateByPhone, buildCardUrl, buildTalentViewUrl, talentLinkExtra, talentUiCardUrl, resolveTalentListUrl, findMenuNode, randHex32, getDsOptions, dsOptionsSnapshot, restoreDsOptions, invalidateEnvCache, verifySubmitted, expectedFields, probeCreatePermission, } from '../shared.js';
|
|
26
|
-
import {
|
|
26
|
+
import { addEntityTags, queryEntityTags } from '../tag-lookup.js';
|
|
27
27
|
import { scanResumeSource } from '../fs-scan.js';
|
|
28
28
|
import { saveBatchItems, loadBatchItems, saveOcrResult, loadOcrResult } from '../batch-store.js';
|
|
29
29
|
// 阶段耗时打点(诊断用,不影响业务):E10_TRACE_MS=1 时把每段耗时打到 stderr
|
|
@@ -124,6 +124,36 @@ function snapshotParsedResume(s) {
|
|
|
124
124
|
return undefined;
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* 🔴 built 签入 continuation 的大小闸门(2026-11-27 加固)。
|
|
129
|
+
* built 含 dataDetails / detailsPayload / fields / subMeta,明细行多时体积可观。
|
|
130
|
+
* continuation 最终可能走命令行参数(直调 CLI 的 `--input-json` 内联形态),
|
|
131
|
+
* Windows cmd 单命令上限 8191 字符,超限会被**静默截断** → apply 报 continuation_invalid,
|
|
132
|
+
* 且现象与「PowerShell 损坏 token」完全一样,极难排查。
|
|
133
|
+
* 走 helper 脚本(文件传参)没有这个限制,但不能假设调用方一定用 helper。
|
|
134
|
+
* 因此超过阈值就不签入:apply 自动回退到 buildImport(多花几个请求,但保证可用)。
|
|
135
|
+
* structured 已在 parsedResume 里单独签入,这里排除以免重复占体积。
|
|
136
|
+
*/
|
|
137
|
+
// 🔴 2026-11-28 实测修正:原 48KB 阈值对真实简历偏小(fields 字段映射 + subMeta 明细表元数据
|
|
138
|
+
// + dataDetails + detailsPayload 很容易顶到边界),一旦超限就**静默**回退成全量 buildImport,
|
|
139
|
+
// 表现为「优化写了但没生效」,且无任何提示。写操作一律走 helper(参数与 token 均落文件,
|
|
140
|
+
// 不受 Windows 8191 字符命令上限约束),故放大到 512KB:helper 场景真正享受提速,
|
|
141
|
+
// 直调 CLI 内联传参的超限情况仍由闸门兜底回退,不会截断 token。
|
|
142
|
+
export const BUILT_SNAPSHOT_LIMIT = 512 * 1024;
|
|
143
|
+
function snapshotBuilt(built) {
|
|
144
|
+
if (!built || typeof built !== 'object')
|
|
145
|
+
return undefined;
|
|
146
|
+
try {
|
|
147
|
+
const { structured: _omit, ...rest } = built;
|
|
148
|
+
const raw = JSON.stringify(rest);
|
|
149
|
+
if (raw.length > BUILT_SNAPSHOT_LIMIT)
|
|
150
|
+
return undefined;
|
|
151
|
+
return rest;
|
|
152
|
+
}
|
|
153
|
+
catch {
|
|
154
|
+
return undefined;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
127
157
|
// 闸门:简历抽取功能是否开启(幂等只读;与上传并发发起,先落闸门再解析)
|
|
128
158
|
async function checkExtractionGate(host) {
|
|
129
159
|
const b = await host.request({ path: '/api/recruit/ocr/checkResumeExtraction', method: 'POST', body: {} });
|
|
@@ -241,6 +271,12 @@ async function resolveSubTableMeta(ctx) {
|
|
|
241
271
|
if (cfg.start && cfg.end && cfg.start.dataKey && cfg.end.dataKey) {
|
|
242
272
|
col.startKey = String(cfg.start.dataKey);
|
|
243
273
|
col.endKey = String(cfg.end.dataKey);
|
|
274
|
+
// form/core subForm 格子要用 start/end 的**物理 fieldId**(dataset 通道只需 dataKey);
|
|
275
|
+
// 见 references/recruit-resume-import.md「日期区间」表(study_date_0 → fieldId …709)
|
|
276
|
+
if (cfg.start.fieldId)
|
|
277
|
+
col.startFieldId = String(cfg.start.fieldId);
|
|
278
|
+
if (cfg.end.fieldId)
|
|
279
|
+
col.endFieldId = String(cfg.end.fieldId);
|
|
244
280
|
}
|
|
245
281
|
cols[String(cfg.dataKey)] = col;
|
|
246
282
|
}
|
|
@@ -472,6 +508,126 @@ async function readTalentSnapshot(ctx, opts) {
|
|
|
472
508
|
subRows[dk] = s.size;
|
|
473
509
|
return { main, subRows, subCells };
|
|
474
510
|
}
|
|
511
|
+
// 读人才记录最新乐观锁/布局/子表行 id(form/core 更新前置):
|
|
512
|
+
// updateTimeStamp 是并发覆盖保护;子表行 rowId 用于明细「原地覆盖」对位。
|
|
513
|
+
// 🔴 2026-11-27 实证:dataset v2 OpenAPI 对人才表单整体失明(detail/query 一律 0 行,
|
|
514
|
+
// updateFormData 报「没有符合更新条件的数据」;同环境面试/职位表 dataset 正常),
|
|
515
|
+
// 更新通道自此改走 form/core saveFormData(与面试反馈编辑同款样板)。
|
|
516
|
+
async function readTalentRecordMeta(ctx, opts) {
|
|
517
|
+
const L = await getFormLayoutMeta(ctx.host, opts.formId);
|
|
518
|
+
const r = await ctx.host.request({
|
|
519
|
+
path: '/api/ebuilder/form/form/core/getFormDataAndLayout', method: 'POST',
|
|
520
|
+
body: {
|
|
521
|
+
terminalType: 'PC', dataId: opts.dataId, formId: opts.formId, module: 'ebuilderform', newLayout: true,
|
|
522
|
+
layoutId: L?.formLayout?.id, layoutMultiId: L?.formLayoutMultiple?.id, dataCrossLayout: false,
|
|
523
|
+
permissionId: '', allReadOnly: true, initialDatas: [], dynamicData: false, cost: false,
|
|
524
|
+
customParam: { objId: opts.objId, dataId: opts.dataId },
|
|
525
|
+
},
|
|
526
|
+
});
|
|
527
|
+
const dets = r?.data?.formData?.dataDetails || [];
|
|
528
|
+
const rowIdsBySubForm = {};
|
|
529
|
+
for (const d of dets) {
|
|
530
|
+
if (!d.subFormId)
|
|
531
|
+
continue;
|
|
532
|
+
const sid = String(d.subFormId);
|
|
533
|
+
const idx = Number(d.dataIndex || 0);
|
|
534
|
+
if (idx < 1)
|
|
535
|
+
continue;
|
|
536
|
+
const arr = (rowIdsBySubForm[sid] = rowIdsBySubForm[sid] || []);
|
|
537
|
+
if (!arr[idx - 1])
|
|
538
|
+
arr[idx - 1] = String(d.rowId || '');
|
|
539
|
+
}
|
|
540
|
+
return {
|
|
541
|
+
updateTimeStamp: String(r?.data?.formData?.updateTimeStamp || ''),
|
|
542
|
+
formLayoutId: String(r?.data?.formLayout?.id || L?.formLayout?.id || ''),
|
|
543
|
+
rowIdsBySubForm,
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
// 门控调试(E10_RS_DEBUG_CELLS=1):stderr 输出明细格子构造实况(列类型/rowId 对位/行值),不影响 stdout 契约
|
|
547
|
+
function debugDumpSubCells(built, rowIdsBySubForm) {
|
|
548
|
+
for (const [dk, node] of Object.entries(built.detailNodes)) {
|
|
549
|
+
const sub = (built.subMeta || {})[dk];
|
|
550
|
+
const rows = (built.detailsPayload || {})[node] || [];
|
|
551
|
+
const sid = sub ? String(sub.subFormId) : '';
|
|
552
|
+
const oldIds = rowIdsBySubForm[sid] || [];
|
|
553
|
+
const cols = Object.entries(sub?.columns || {}).map(([k, c]) => `${k}:${c.type}@${c.id}${c.startKey ? `(s=${c.startKey},e=${c.endKey})` : ''}`).join(' | ');
|
|
554
|
+
console.error(`[debug-cells] ${dk} node=${node} subFormId=${sid} oldRows=${oldIds.length} newRows=${rows.length} cols=${cols}`);
|
|
555
|
+
rows.forEach((r, i) => console.error(`[debug-cells] row${i + 1} rowId=${oldIds[i] || ''} json=${JSON.stringify(r)}`));
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
// 日期列(col.type 含 Date:Date/DateRange 拆键列):E10 日期列只收完整 yyyy-MM-dd,
|
|
559
|
+
// 解析常给 yyyy-MM 或 yyyy → 补 01(实测 2026-11-27:yyyy-MM 直接丢格,教育经历 8 格只落 6 格)。
|
|
560
|
+
// 非日期值(如「至今」残留)返回 null → 不写,避免脏值。
|
|
561
|
+
export function normDateCell(colType, v) {
|
|
562
|
+
if (!/date/i.test(String(colType || '')))
|
|
563
|
+
return v;
|
|
564
|
+
const s = String(v || '').trim().replace(/\//g, '-');
|
|
565
|
+
// 完整日期也补零:E10 日期列只收 yyyy-MM-dd,'2023-9-1' 会被判非法值(静默丢格)
|
|
566
|
+
const m0 = s.match(/^(\d{4})-(\d{1,2})-(\d{1,2})$/);
|
|
567
|
+
if (m0)
|
|
568
|
+
return `${m0[1]}-${String(m0[2]).padStart(2, '0')}-${String(m0[3]).padStart(2, '0')}`;
|
|
569
|
+
const m = s.match(/^(\d{4})-(\d{1,2})$/);
|
|
570
|
+
if (m)
|
|
571
|
+
return `${m[1]}-${String(m[2]).padStart(2, '0')}-01`;
|
|
572
|
+
const y = s.match(/^(\d{4})$/);
|
|
573
|
+
if (y)
|
|
574
|
+
return `${y[1]}-01-01`;
|
|
575
|
+
return null;
|
|
576
|
+
}
|
|
577
|
+
// 明细 → form/core subForm 格子(页面编辑保存同款:一行一格一条 dataDetail)。
|
|
578
|
+
// rowId 对位旧行 = 原地覆盖;rowId 留空 = 追加(旧行不足时);旧行多于新行无法经此通道删除 → skippedOldRows 如实上报。
|
|
579
|
+
// 值形态:字典 id(6+ 位纯数字且在字典里能反查到名称)→ dataOptions 格子;其余 → content 文本格子(日期列先归一化)。
|
|
580
|
+
export function buildSubFormCells(built, rowIdsBySubForm, dictName) {
|
|
581
|
+
const cells = [];
|
|
582
|
+
const skippedOldRows = [];
|
|
583
|
+
const droppedCells = [];
|
|
584
|
+
if (process.env.E10_RS_DEBUG_CELLS === '1')
|
|
585
|
+
debugDumpSubCells(built, rowIdsBySubForm);
|
|
586
|
+
for (const [dk, node] of Object.entries(built.detailNodes)) {
|
|
587
|
+
const sub = (built.subMeta || {})[dk];
|
|
588
|
+
const rows = (built.detailsPayload || {})[node] || [];
|
|
589
|
+
if (!sub || !rows.length)
|
|
590
|
+
continue;
|
|
591
|
+
const sid = String(sub.subFormId);
|
|
592
|
+
const oldIds = rowIdsBySubForm[sid] || [];
|
|
593
|
+
// 列解析表:dataKey → {fieldId, date}。日期区间容器列的物理子键(xxx_0 / xxx_1)
|
|
594
|
+
// 在布局里**没有独立 column**,必须由容器的 startKey/endKey 映射到 startFieldId/endFieldId,
|
|
595
|
+
// 否则这些格子会被 `!col` 静默跳过(实测:教育经历 8 格只落 6 格,缺的正是起止日期)。
|
|
596
|
+
const keyMap = {};
|
|
597
|
+
for (const [ck0, c0] of Object.entries((sub.columns || {}))) {
|
|
598
|
+
if (c0?.id)
|
|
599
|
+
keyMap[ck0] = { fieldId: String(c0.id), date: /date/i.test(String(c0.type || '')) };
|
|
600
|
+
if (c0?.startKey && c0?.startFieldId)
|
|
601
|
+
keyMap[String(c0.startKey)] = { fieldId: String(c0.startFieldId), date: true };
|
|
602
|
+
if (c0?.endKey && c0?.endFieldId)
|
|
603
|
+
keyMap[String(c0.endKey)] = { fieldId: String(c0.endFieldId), date: true };
|
|
604
|
+
}
|
|
605
|
+
rows.forEach((row, i) => {
|
|
606
|
+
const rowId = i < oldIds.length ? (oldIds[i] || '') : '';
|
|
607
|
+
for (const [ck, v] of Object.entries(row)) {
|
|
608
|
+
const col = keyMap[ck];
|
|
609
|
+
if (!col) {
|
|
610
|
+
droppedCells.push(`${dk}#${i + 1}.${ck} 无对应列(布局未解析到 fieldId),已跳过`);
|
|
611
|
+
continue;
|
|
612
|
+
}
|
|
613
|
+
const sv = String(v ?? '');
|
|
614
|
+
const dateVal = col.date ? normDateCell('Date', sv) : sv;
|
|
615
|
+
if (dateVal === null) {
|
|
616
|
+
droppedCells.push(`${dk}#${i + 1}.${ck}「${sv}」非日期值,已跳过`);
|
|
617
|
+
continue;
|
|
618
|
+
}
|
|
619
|
+
const isOption = /^\d{6,}$/.test(sv) && !!dictName(sv);
|
|
620
|
+
cells.push(isOption
|
|
621
|
+
? { dataIndex: i + 1, rowId, formField: { id: col.fieldId }, subForm: { id: sid }, dataOptions: [{ optionId: sv, content: dictName(sv) }] }
|
|
622
|
+
: { dataIndex: i + 1, rowId, formField: { id: col.fieldId }, subForm: { id: sid }, content: dateVal });
|
|
623
|
+
}
|
|
624
|
+
});
|
|
625
|
+
if (oldIds.length > rows.length) {
|
|
626
|
+
skippedOldRows.push(`${dk}:原表 ${oldIds.length} 行 > 本次解析 ${rows.length} 行,多出的旧行无法经本通道删除,需页面手工处理`);
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
return { cells, skippedOldRows, droppedCells };
|
|
630
|
+
}
|
|
475
631
|
// ── 标签链路 ──
|
|
476
632
|
// a) 触发后台「人才自动标签」规则匹配(talentId 走 query,body 为空)
|
|
477
633
|
async function matchTalentLabel(host, talentId) {
|
|
@@ -850,6 +1006,9 @@ async function prepare(args, env, opts = {}) {
|
|
|
850
1006
|
const fp = fingerprint(willSubmit);
|
|
851
1007
|
const continuation = await env.continuation.issue({ operation: 'recruit-stage.resume.import.apply', fingerprint: fp,
|
|
852
1008
|
enumMaps: await dsOptionsSnapshot(),
|
|
1009
|
+
// 🔴 2026-11-27 优化:签入已解析的 built(不含 structured,已在 parsedResume 里),
|
|
1010
|
+
// apply 直接复用,跳过 buildImport(省 ~6 HTTP)和 findExistingTalents(省 2 HTTP)。
|
|
1011
|
+
built: snapshotBuilt(built),
|
|
853
1012
|
// 🔴 2026-11-07 修复(同 arrange / jd.create / position.create 的同类缺陷):apply 只带
|
|
854
1013
|
// confirm + continuation 时,buildImport 需要的简历来源参数必须能从快照恢复,
|
|
855
1014
|
// 否则会报 resume_source_required(文档写法跑不通)。
|
|
@@ -889,25 +1048,14 @@ async function prepare(args, env, opts = {}) {
|
|
|
889
1048
|
},
|
|
890
1049
|
}, { continuation, fingerprint: fp, confirmHint: '用户明确确认后,携带 confirm:true 与 continuation 调用 apply' });
|
|
891
1050
|
}
|
|
892
|
-
//
|
|
893
|
-
//
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
}
|
|
901
|
-
catch (e) {
|
|
902
|
-
return { requested: built.tagNames, error: e.message };
|
|
903
|
-
}
|
|
904
|
-
})();
|
|
905
|
-
mark('prepare.查重建档并行前');
|
|
906
|
-
const [dupInfo, tagCheck] = await Promise.all([
|
|
907
|
-
findExistingTalents(ctx, { objId: built.objId, formId: built.formId, fields: built.fields, mobile: built.structured.telephone }),
|
|
908
|
-
tagCheckTask,
|
|
909
|
-
]);
|
|
910
|
-
mark('prepare.查重+标签预检');
|
|
1051
|
+
// 🔴 2026-11-27 优化:跳过标签预检(省 2-5 HTTP)。
|
|
1052
|
+
// 标签在 apply 时由 addEntityTags 自动解析并写入,prepare 预检只给确认摘要显示 found/missing,
|
|
1053
|
+
// 不影响功能正确性。学校标签由 schoolTagInfo 本地推导,不需要 HTTP。
|
|
1054
|
+
const dupInfo = await findExistingTalents(ctx, { objId: built.objId, formId: built.formId, fields: built.fields, mobile: built.structured.telephone });
|
|
1055
|
+
const tagCheck = built.tagNames.length
|
|
1056
|
+
? { requested: built.tagNames, note: '标签将在提交时自动解析并写入' }
|
|
1057
|
+
: null;
|
|
1058
|
+
mark('prepare.查重完成');
|
|
911
1059
|
const summary = {
|
|
912
1060
|
action: '简历导入建人才',
|
|
913
1061
|
resumeFile: built.fileName || ('fileid=' + built.fileid),
|
|
@@ -953,6 +1101,19 @@ async function prepare(args, env, opts = {}) {
|
|
|
953
1101
|
const fp = fingerprint(willSubmit);
|
|
954
1102
|
const continuation = await env.continuation.issue({ operation: 'recruit-stage.resume.import.apply', fingerprint: fp,
|
|
955
1103
|
enumMaps: await dsOptionsSnapshot(),
|
|
1104
|
+
// 🔴 2026-11-28 修复「提速失效」:新建模式此前**从未签入 built**(只有更新通道签了),
|
|
1105
|
+
// 导致 apply 每次都重跑 buildImport(~6 HTTP)与 findExistingTalents(2 HTTP),
|
|
1106
|
+
// 优化写了但完全没生效。现补上;同时把 prepare 的查重结果签入 dupCheck,
|
|
1107
|
+
// 让 apply 能据此决策:unique=true 才跳过 HTTP 查重,unique=false 直接拒绝写入。
|
|
1108
|
+
built: snapshotBuilt(built),
|
|
1109
|
+
dupCheck: {
|
|
1110
|
+
checked: dupInfo.checked,
|
|
1111
|
+
unique: dupInfo.unique,
|
|
1112
|
+
conflictCount: dupInfo.formConflicts.existing.length,
|
|
1113
|
+
unreadableCount: dupInfo.formConflicts.unreadable.length,
|
|
1114
|
+
byPhoneTalentId: dupInfo.byPhone?.talentId || null,
|
|
1115
|
+
byPhoneCandidateId: dupInfo.byPhone?.candidateId || null,
|
|
1116
|
+
},
|
|
956
1117
|
// 🔴 2026-11-07 修复(同 arrange / jd.create / position.create 的同类缺陷):apply 只带
|
|
957
1118
|
// confirm + continuation 时,buildImport 需要的简历来源参数必须能从快照恢复,
|
|
958
1119
|
// 否则会报 resume_source_required(文档写法跑不通)。
|
|
@@ -1015,8 +1176,17 @@ async function applyCore(args, env, payload) {
|
|
|
1015
1176
|
ctx.appId = ctx.cache.appId;
|
|
1016
1177
|
mark('apply.context');
|
|
1017
1178
|
const argsT = args;
|
|
1018
|
-
|
|
1019
|
-
|
|
1179
|
+
// 🔴 2026-11-27 优化:prepare 签入了已解析的 built,apply 直接复用,
|
|
1180
|
+
// 跳过 buildImport(省 ~6 HTTP)和 findExistingTalents(省 2 HTTP,prepare 已查重)
|
|
1181
|
+
let built;
|
|
1182
|
+
if (payload.built && (argsT.parsedResume || payload.built.structured)) {
|
|
1183
|
+
built = { ...payload.built, structured: argsT.parsedResume || payload.built.structured };
|
|
1184
|
+
mark('apply.复用prepare的built(跳过buildImport+查重)');
|
|
1185
|
+
}
|
|
1186
|
+
else {
|
|
1187
|
+
built = await buildImport(ctx, argsT);
|
|
1188
|
+
mark('apply.buildImport 完成');
|
|
1189
|
+
}
|
|
1020
1190
|
// 更新模式
|
|
1021
1191
|
if (argsT.updateTalentId) {
|
|
1022
1192
|
const updateTalentId = String(argsT.updateTalentId);
|
|
@@ -1027,9 +1197,17 @@ async function applyCore(args, env, payload) {
|
|
|
1027
1197
|
if (payload.fingerprint !== fingerprint(willSubmit)) {
|
|
1028
1198
|
throw rsValidationError('fingerprint_mismatch', '待提交内容与 prepare 确认摘要不一致,请重新 prepare 确认后再 apply');
|
|
1029
1199
|
}
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1200
|
+
// 🔴 2026-11-27 更新通道改造:dataset v2 对人才表单失明(readTalentRecordMeta 注释有实证链),
|
|
1201
|
+
// 改走 form/core saveFormData 更新(formDataId + updateTimeStamp 乐观锁 + layoutId,feedback 同款),
|
|
1202
|
+
// 主表格子与明细 subForm 格子一次提交;明细 rowId 对位旧行实现原地覆盖。
|
|
1203
|
+
const fresh = await readTalentRecordMeta(ctx, { formId: built.formId, objId: built.objId, dataId: updateTalentId });
|
|
1204
|
+
const subCells = buildSubFormCells(built, fresh.rowIdsBySubForm, makeDictLookup(ctx.cache));
|
|
1205
|
+
const savedId = await saveFormData(ctx.host, {
|
|
1206
|
+
appId: ctx.appId, formId: built.formId, objId: built.objId,
|
|
1207
|
+
name: built.structured.candidateName || undefined,
|
|
1208
|
+
dataDetails: [...built.dataDetails, ...subCells.cells],
|
|
1209
|
+
rightType: '2', formDataId: updateTalentId,
|
|
1210
|
+
updateTimeStamp: fresh.updateTimeStamp || undefined, layoutId: fresh.formLayoutId || undefined,
|
|
1033
1211
|
});
|
|
1034
1212
|
// 可选头像:用户主动给图才写;失败只记在 avatar.warning,不并入 verifyWarnings(不改变 result)
|
|
1035
1213
|
const avatarRes = await writeAvatarIfProvided(ctx, {
|
|
@@ -1051,16 +1229,17 @@ async function applyCore(args, env, payload) {
|
|
|
1051
1229
|
return out;
|
|
1052
1230
|
};
|
|
1053
1231
|
let after = await readTalentSnapshot(ctx, { formId: built.formId, objId: built.objId, fields: built.fields, subMeta: built.subMeta, dataId: updateTalentId });
|
|
1054
|
-
let verifyWarnings = checkAfter(after);
|
|
1232
|
+
let verifyWarnings = [...subCells.skippedOldRows, ...subCells.droppedCells, ...checkAfter(after)];
|
|
1055
1233
|
if (verifyWarnings.length) {
|
|
1056
1234
|
await new Promise((r) => setTimeout(r, 600));
|
|
1057
1235
|
after = await readTalentSnapshot(ctx, { formId: built.formId, objId: built.objId, fields: built.fields, subMeta: built.subMeta, dataId: updateTalentId });
|
|
1058
|
-
verifyWarnings = checkAfter(after);
|
|
1236
|
+
verifyWarnings = [...subCells.skippedOldRows, ...subCells.droppedCells, ...checkAfter(after)];
|
|
1059
1237
|
}
|
|
1060
1238
|
return rsSuccess('recruit-stage.resume.import.apply', {
|
|
1061
1239
|
// 更新模式同理:明细行/格数对不上时只能报 partial,不能因主表写入成功就报 success
|
|
1062
1240
|
mode: 'update', result: verifyWarnings.length ? 'partial' : 'success',
|
|
1063
1241
|
detailsState: verifyWarnings.length ? 'missing' : 'complete',
|
|
1242
|
+
writeChannel: 'form/core saveFormData(formDataId+乐观锁;dataset v2 对人才表失明已弃用)',
|
|
1064
1243
|
talentId: updateTalentId,
|
|
1065
1244
|
afterSummary: { mainFieldCount: Object.keys(after.main).length, subRows: after.subRows, subCells: after.subCells },
|
|
1066
1245
|
verifyWarnings: verifyWarnings.length ? verifyWarnings : undefined,
|
|
@@ -1073,32 +1252,59 @@ async function applyCore(args, env, payload) {
|
|
|
1073
1252
|
});
|
|
1074
1253
|
}
|
|
1075
1254
|
// 新建模式:查重阻断
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1255
|
+
// 🔴 2026-11-28:优先用 prepare 签入的 dupCheck 决策——
|
|
1256
|
+
// ① unique=false → 直接拒绝写入(防止「built 跳过查重」变成重复建档漏洞)
|
|
1257
|
+
// ② unique=true → 跳过 HTTP 查重(这才让原计划的提速真正生效)
|
|
1258
|
+
// ③ 旧 continuation(无 built / 无 dupCheck)→ 回退完整查重(兜底,行为与旧版一致)
|
|
1259
|
+
// 🔴 2026-11-28 补洞:只有 prepare **真的查过**(checked=true)才能用签入结论跳过查重。
|
|
1260
|
+
// findExistingTalents 的兜底结构是 { checked:false, unique:true }(没查过 = 当唯一),
|
|
1261
|
+
// 若网络/权限异常导致查重没执行,旧写法会把「没查过」当成「唯一」→ 跳过查重 → 重复建档。
|
|
1262
|
+
const signedDup = (payload.built && payload.dupCheck && payload.dupCheck.checked === true) ? payload.dupCheck : null;
|
|
1263
|
+
if (signedDup && signedDup.unique === false) {
|
|
1264
|
+
const hasBatch = !!(signedDup.byPhoneCandidateId || signedDup.byPhoneTalentId);
|
|
1079
1265
|
return rsSuccess('recruit-stage.resume.import.apply', {
|
|
1080
1266
|
mode: 'apply', result: 'duplicate',
|
|
1081
|
-
message:
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1267
|
+
message: hasBatch
|
|
1268
|
+
? '当前手机号已绑定人才信息,按页面规则不新建(未写入任何数据)'
|
|
1269
|
+
: '手机号在人才库已存在(表单唯一性命中,但无应聘批次),不新建(未写入任何数据)',
|
|
1270
|
+
existingTalent: hasBatch ? {
|
|
1271
|
+
talentId: signedDup.byPhoneTalentId || '',
|
|
1272
|
+
candidateId: signedDup.byPhoneCandidateId || '',
|
|
1273
|
+
} : undefined,
|
|
1085
1274
|
parsed: { name: built.structured.candidateName, mobile: built.structured.telephone },
|
|
1086
1275
|
nextStep: '如需按这份简历更新该人才,明确说明即可(updateTalentId 走更新通道)',
|
|
1087
1276
|
});
|
|
1088
1277
|
}
|
|
1089
|
-
if (
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1278
|
+
if (!signedDup) {
|
|
1279
|
+
const dupInfo = await findExistingTalents(ctx, { objId: built.objId, formId: built.formId, fields: built.fields, mobile: built.structured.telephone });
|
|
1280
|
+
if (dupInfo.byPhone?.candidateId || dupInfo.byPhone?.talentId) {
|
|
1281
|
+
const b = dupInfo.byPhone;
|
|
1282
|
+
return rsSuccess('recruit-stage.resume.import.apply', {
|
|
1283
|
+
mode: 'apply', result: 'duplicate',
|
|
1284
|
+
message: '当前手机号已绑定人才信息,按页面规则不新建(未写入任何数据)',
|
|
1285
|
+
existingTalent: { talentId: b.talentId, candidateId: b.candidateId, talentViewUrl: b.talentViewUrl, talentCardUrl: b.talentCardUrl },
|
|
1286
|
+
talentViewUrl: b.talentViewUrl,
|
|
1287
|
+
otherRecords: dupInfo.formConflicts.existing.length ? dupInfo.formConflicts.existing : undefined,
|
|
1288
|
+
parsed: { name: built.structured.candidateName, mobile: built.structured.telephone },
|
|
1289
|
+
nextStep: '如需按这份简历更新该人才,明确说明即可(updateTalentId 走更新通道)',
|
|
1290
|
+
});
|
|
1291
|
+
}
|
|
1292
|
+
if (dupInfo.formConflicts.existing.length) {
|
|
1293
|
+
return rsSuccess('recruit-stage.resume.import.apply', {
|
|
1294
|
+
mode: 'apply', result: 'duplicate',
|
|
1295
|
+
message: '手机号在人才库已存在(表单唯一性命中,但无应聘批次),不新建(未写入任何数据)',
|
|
1296
|
+
formConflicts: dupInfo.formConflicts.existing,
|
|
1297
|
+
parsed: { name: built.structured.candidateName, mobile: built.structured.telephone },
|
|
1298
|
+
nextStep: '如需按这份简历更新该人才,明确说明即可(updateTalentId 走更新通道)',
|
|
1299
|
+
});
|
|
1300
|
+
}
|
|
1301
|
+
if (!dupInfo.unique && dupInfo.formConflicts.unreadable.length) {
|
|
1302
|
+
throw rsFail('手机号被 ' + dupInfo.formConflicts.unreadable.length + ' 条已删除记录占用(平台唯一性校验仍拦新建,id=' + dupInfo.formConflicts.unreadable.join(',') + '):请先在回收站清理,或改为更新已有人才');
|
|
1303
|
+
}
|
|
1304
|
+
} // end if (!signedDup) — 无签入结果时才走完整查重(兜底)
|
|
1305
|
+
// 建人才:① 首选数据集通道(主表+明细一次写入);② 被拦时回退页面级通道——
|
|
1306
|
+
// 主表+明细 subForm 格子并入同一次 form/core saveFormData(新建记录明细为空 → rowId 留空=追加)。
|
|
1307
|
+
// 🔴 2026-11-27:回退段原「dataset update 补明细」对人才表单失效(数据集失明,实证见 readTalentRecordMeta 注释),弃用。
|
|
1102
1308
|
mark('apply.查重完成');
|
|
1103
1309
|
const datasetMain = toDatasetMainTable(built.dataDetails, built.fields);
|
|
1104
1310
|
let newId = '';
|
|
@@ -1110,18 +1316,11 @@ async function applyCore(args, env, payload) {
|
|
|
1110
1316
|
writeChannel = 'dataset/v2/saveFormData(主表 + 明细一次写入)';
|
|
1111
1317
|
}
|
|
1112
1318
|
catch (e) {
|
|
1113
|
-
writeWarnings.push('数据集新增未通过(' + e.message + '
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
// 新建记录的明细必然为空 → 走「追加」即可。不用 cover:实测 cover 会重建整行,把 EBuilder(关联)列清空。
|
|
1119
|
-
await datasetUpdateFormData(host, { objId: built.objId, dataId: newId, mainTable: {}, details: built.detailsPayload });
|
|
1120
|
-
}
|
|
1121
|
-
catch (e2) {
|
|
1122
|
-
writeWarnings.push('回退后补明细失败:' + e2.message);
|
|
1123
|
-
}
|
|
1124
|
-
}
|
|
1319
|
+
writeWarnings.push('数据集新增未通过(' + e.message + '),回退页面级通道:主表+明细一次写入');
|
|
1320
|
+
const subCells = buildSubFormCells(built, {}, makeDictLookup(ctx.cache));
|
|
1321
|
+
newId = await saveFormData(host, { appId: ctx.appId, formId: built.formId, objId: built.objId, name: built.structured.candidateName || '简历导入', dataDetails: [...built.dataDetails, ...subCells.cells] });
|
|
1322
|
+
writeChannel = 'form/core/saveFormData(主表 + 明细 subForm 一次写入)';
|
|
1323
|
+
writeWarnings.push(...subCells.droppedCells);
|
|
1125
1324
|
}
|
|
1126
1325
|
mark('apply.saveFormData');
|
|
1127
1326
|
const r2 = await host.request({ path: '/api/recruit/candidate/initTalentBatch?formDataId=' + newId, method: 'POST' });
|
|
@@ -1250,7 +1449,6 @@ async function applyCore(args, env, payload) {
|
|
|
1250
1449
|
// 产物链接(Agent 原样搬运:① 人才卡片单页 ② 人才库列表;缺失哪个只给另一个)
|
|
1251
1450
|
viewLink: talentCardUrl ? `[查看 ${built.structured.candidateName || '新人才'} 的人才卡片](${talentCardUrl})` : null,
|
|
1252
1451
|
listLocateLink: talentListLocateUrl ? `[打开人才库列表](${talentListLocateUrl})` : null,
|
|
1253
|
-
agentNote: '正文给两个 Markdown 链接——① [查看 <姓名> 的人才卡片](talentCardUrl) 详情单页 ② [打开人才库列表](talentListLocateUrl) 只打开列表、不打开详情;缺失哪个就只给另一个,不输出半截。不要用 artifact / browsertool。',
|
|
1254
1452
|
parsed: {
|
|
1255
1453
|
name: built.structured.candidateName, mobile: built.structured.telephone, email: built.structured.email || '(空)',
|
|
1256
1454
|
gender: built.structured.genderName, degree: built.structured.highest_degree_name, college: built.structured.college,
|
|
@@ -1494,9 +1692,6 @@ async function batchApply(args, env) {
|
|
|
1494
1692
|
skippedTotal: blockedAtPrepare + skipped,
|
|
1495
1693
|
items: results,
|
|
1496
1694
|
resultTable: lines.join('\n'),
|
|
1497
|
-
agentNote: '把 resultTable 原样放回答正文。汇总必须说全四类:成功 / 部分成功 / 跳过(重复,不新建)/ 失败;'
|
|
1498
|
-
+ '跳过数 = skippedAtPrepare(准备阶段查重)+ skipped(建档时发现重复);'
|
|
1499
|
-
+ '失败或部分成功要带 message 原因,不要只报总数。末尾附「人才库」固定地址一个链接。',
|
|
1500
1695
|
});
|
|
1501
1696
|
}
|
|
1502
1697
|
export const resumeImportOperations = [
|