weaver-work-cli 0.1.75 → 0.1.78
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/README.md +3 -1
- package/dist/chunks/{archive-OZJ6PYUR.js → archive-ENBSUMHV.js} +1 -1
- package/dist/chunks/{archive-oa-BHL5RK2F.js → archive-oa-7BFPQ6M5.js} +1 -1
- package/dist/chunks/{asset-HKRFRQR2.js → asset-V5SUD3PW.js} +1 -1
- package/dist/chunks/{asset-idle-GGIR4KE7.js → asset-idle-3CEL7WFX.js} +1 -1
- package/dist/chunks/{attachment-content-4OV65NK5.js → attachment-content-TFOC3Y3X.js} +3 -3
- package/dist/chunks/{blog-HYDP4DV3.js → blog-FLI4SS3P.js} +1 -1
- package/dist/chunks/{caizhilian-JS4RQZ6Z.js → caizhilian-7WCTKCCP.js} +3 -3
- package/dist/chunks/{calendar-SWRY4DIT.js → calendar-G726HUUH.js} +1 -1
- package/dist/chunks/{chunk-5ZJGPEIB.js → chunk-2KW7AI6P.js} +1 -1
- package/dist/chunks/{chunk-JOY3HZXL.js → chunk-2UV4IZIT.js} +21 -15
- package/dist/chunks/{chunk-FEZK536Z.js → chunk-4PBN7NJY.js} +353 -43
- package/dist/chunks/{chunk-VOMDD2C5.js → chunk-5E2FDXBU.js} +1 -1
- package/dist/chunks/{chunk-ZUB4M4N3.js → chunk-5VQ7JHV4.js} +134 -49
- package/dist/chunks/{chunk-I6NOHKEK.js → chunk-7SQN5IZR.js} +1 -1
- package/dist/chunks/{chunk-4FCBEWNB.js → chunk-BP7BONZO.js} +675 -86
- package/dist/chunks/{chunk-U6Y32KEV.js → chunk-BWFCTE43.js} +1 -1
- package/dist/chunks/{chunk-PG5YSNYY.js → chunk-DACQKJ6O.js} +3 -3
- package/dist/chunks/{chunk-KWJEICD4.js → chunk-E2EY3DMS.js} +2 -2
- package/dist/chunks/{chunk-KEA4XQPO.js → chunk-FAC4IFGQ.js} +4 -4
- package/dist/chunks/{chunk-MXCRKXOP.js → chunk-FPWCCRKT.js} +1 -1
- package/dist/chunks/{minute-doc-OQUMDTKG.js → chunk-IBTGXLOT.js} +101 -18
- package/dist/chunks/{chunk-OJ4JPD25.js → chunk-LQLIXBJF.js} +6 -8
- package/dist/chunks/{chunk-BNKUHN4N.js → chunk-OVTCWLNQ.js} +2 -2
- package/dist/chunks/{chunk-5D2V7ZAN.js → chunk-PMRNIGKZ.js} +1 -1
- package/dist/chunks/{chunk-OQCK5SAU.js → chunk-RVEKGVZU.js} +1 -1
- package/dist/chunks/{chunk-2AUFKU2D.js → chunk-SWFTWNWL.js} +11 -11
- package/dist/chunks/{chunk-TA2RBUTH.js → chunk-TBCKK6LH.js} +1 -1
- package/dist/chunks/{chunk-SU6IJD6D.js → chunk-TD5IOEGN.js} +1 -1
- package/dist/chunks/{chunk-J7FAAHWH.js → chunk-UDBQJLQF.js} +1 -1
- package/dist/chunks/{chunk-BSR5TM7U.js → chunk-USYFVIUR.js} +22 -7
- package/dist/chunks/{chunk-ERZY6GYL.js → chunk-UZ2E3VNI.js} +1 -1
- package/dist/chunks/{chunk-NWYHCZTY.js → chunk-VNEU7OUN.js} +1 -1
- package/dist/chunks/{chunk-5QUTQHXF.js → chunk-WNFDR5PC.js} +198 -80
- package/dist/chunks/{chunk-LJI4N6FV.js → chunk-XNN5PZTI.js} +1 -1
- package/dist/chunks/{chunk-QJWVYOOV.js → chunk-Z44YFIN6.js} +2 -2
- package/dist/chunks/{chunk-ZWIMLT6P.js → chunk-ZOTXXGUM.js} +7 -7
- package/dist/chunks/{cli-FULPXIKJ.js → cli-WA7FOQKC.js} +35 -35
- package/dist/chunks/{commands-BNWFNTD3.js → commands-J52MJ6NF.js} +3 -3
- package/dist/chunks/{conflict-5BKCDV2F.js → conflict-D4GVAURN.js} +2 -2
- package/dist/chunks/{contract-WI23OXVC.js → contract-GW7US3UF.js} +4400 -3548
- package/dist/chunks/{cowork-DZBBVNMQ.js → cowork-GZDODGKF.js} +1 -1
- package/dist/chunks/{create-flow-7ZRBRKX7.js → create-flow-ERDGW3FZ.js} +10 -6
- package/dist/chunks/{data-PAZVE6QE.js → data-HTQZRPPI.js} +1 -1
- package/dist/chunks/{ebuilder-form-5SQXIGXN.js → ebuilder-form-GHNIZ7ET.js} +2 -2
- package/dist/chunks/{ehr-CX5F4ZAU.js → ehr-P6T7OAAV.js} +2 -2
- package/dist/chunks/{entry-mode-I2BYNONZ.js → entry-mode-SQU5WTX6.js} +3 -3
- package/dist/chunks/{env-ZAQZ7EHN.js → env-DASBNSEM.js} +2 -2
- package/dist/chunks/{esb-DQTXDIBF.js → esb-ATRKVHCD.js} +3 -3
- package/dist/chunks/{factory-XRI6KZ7H.js → factory-A3NAKZAA.js} +1 -1
- package/dist/chunks/{fna-FK6HQVJL.js → fna-IKYI3SST.js} +1 -1
- package/dist/chunks/{group-chat-MLWNYM2P.js → group-chat-7SEAVAJR.js} +3 -3
- package/dist/chunks/{host-MEC4VQZA.js → host-6UOXYOOY.js} +2 -2
- package/dist/chunks/{host-KUMU3DDK.js → host-EJSJSLVK.js} +2 -2
- package/dist/chunks/{host-3EPREGXS.js → host-EYNLB6S4.js} +2 -2
- package/dist/chunks/{host-T6NNQGVZ.js → host-OT4KNR3G.js} +2 -2
- package/dist/chunks/{host-VI7Q45PM.js → host-UY4LQPN4.js} +2 -2
- package/dist/chunks/{host-J74JGYAW.js → host-XXGDQM7D.js} +2 -2
- package/dist/chunks/{hrm-KKVAW4P5.js → hrm-5JQ7QZ6A.js} +2 -2
- package/dist/chunks/{im-47CIWQNL.js → im-2YJW3EI5.js} +2 -2
- package/dist/chunks/{invoice-CDYRBNIG.js → invoice-37HR6L3W.js} +937 -552
- package/dist/chunks/{jiuchuanhui-M7QTRHZK.js → jiuchuanhui-KBWUZ7WT.js} +1 -1
- package/dist/chunks/{lazy-dispatch-FKQJZFI5.js → lazy-dispatch-ZDKLS5MR.js} +6 -6
- package/dist/chunks/{mail-NRBS5N6Y.js → mail-YBKUM6HM.js} +1 -1
- package/dist/chunks/{meeting-WC5LD3IO.js → meeting-7AEQGBAT.js} +19 -13
- package/dist/chunks/minute-doc-REI6RUE4.js +20 -0
- package/dist/chunks/{okr-EHKSKMPL.js → okr-HW7IULIR.js} +1 -1
- package/dist/chunks/{operations-V5VM5MS2.js → operations-4P2UYVLH.js} +3 -3
- package/dist/chunks/{performance-ZJADXJPN.js → performance-PM2G6L3E.js} +1 -1
- package/dist/chunks/{plan-OTDNBDJ7.js → plan-3YYGZ7ZM.js} +1 -1
- package/dist/chunks/{project-4XVBQ3HX.js → project-6PRGBLO2.js} +39 -15
- package/dist/chunks/{reception-3FAHOOH7.js → reception-7G3J2MA6.js} +1 -1
- package/dist/chunks/{recruit-stage-3WTVWW2K.js → recruit-stage-TLZJUFHD.js} +544 -464
- package/dist/chunks/{registry-TJGCVRCW.js → registry-3VTB3KLV.js} +3 -3
- package/dist/chunks/{registry-F4YFZLOD.js → registry-KQ4TNUWO.js} +1 -1
- package/dist/chunks/{registry-NBTBXR4L.js → registry-UVTI323K.js} +12 -11
- package/dist/chunks/{room-recommend-KL62XB2Y.js → room-recommend-ELEJUYBN.js} +4 -4
- package/dist/chunks/{schedule-XOISYUPB.js → schedule-XBKY7VEA.js} +4 -4
- package/dist/chunks/{smart-extract-UYGNV3BM.js → smart-extract-T5Z4AULN.js} +1 -1
- package/dist/chunks/{update-AV5VOXGY.js → update-77ZUIYSG.js} +2 -2
- package/dist/chunks/{workflow-V54LJPXL.js → workflow-SYCBS5XD.js} +3 -3
- package/dist/index.js +3 -3
- package/dist/internal/update/service.js +9 -8
- package/dist/shortcuts/contract/data/collection-ledger-html.js +109 -33
- package/dist/shortcuts/contract/data/collection-node-catalog.js +26 -2
- package/dist/shortcuts/contract/data/report-renderers.js +75 -31
- package/dist/shortcuts/contract/data/report-spec.js +17 -3
- package/dist/shortcuts/contract/manifest.js +20 -3
- package/dist/shortcuts/contract/operations/bizreview-report.js +23 -2
- package/dist/shortcuts/contract/operations/collection-node.js +116 -1
- package/dist/shortcuts/contract/operations/compare-report.js +27 -5
- package/dist/shortcuts/contract/operations/credit-page.js +11 -2
- package/dist/shortcuts/contract/operations/docx-slots.js +27 -2
- package/dist/shortcuts/contract/operations/draft-submit.js +9 -6
- package/dist/shortcuts/contract/operations/elements-build.js +162 -30
- package/dist/shortcuts/contract/operations/elements-spec.js +50 -0
- package/dist/shortcuts/contract/operations/generated-submit.js +35 -0
- package/dist/shortcuts/contract/operations/ledger-card.js +32 -2
- package/dist/shortcuts/contract/operations/ledger-stat.js +17 -5
- package/dist/shortcuts/contract/operations/ledger.js +88 -16
- package/dist/shortcuts/contract/operations/metrics.js +16 -3
- package/dist/shortcuts/contract/operations/ops-draft.js +359 -27
- package/dist/shortcuts/contract/operations/page.js +23 -0
- package/dist/shortcuts/contract/operations/quote-recognize.js +91 -13
- package/dist/shortcuts/contract/operations/quote-submit.js +16 -0
- package/dist/shortcuts/contract/operations/review-report.js +11 -3
- package/dist/shortcuts/contract/operations/save-recognize.js +62 -1
- package/dist/shortcuts/contract/operations/triage.js +18 -3
- package/dist/shortcuts/contract/operations/viewlink.js +17 -1
- package/dist/shortcuts/ehr/operations/recruit.js +255 -90
- package/dist/shortcuts/invoice/business-response.js +13 -0
- package/dist/shortcuts/invoice/calendar.js +24 -0
- package/dist/shortcuts/invoice/host.js +26 -15
- package/dist/shortcuts/invoice/index.js +2 -2
- package/dist/shortcuts/invoice/invoice-record.js +7 -2
- package/dist/shortcuts/invoice/manifest.js +179 -155
- package/dist/shortcuts/invoice/operations/get.js +9 -3
- package/dist/shortcuts/invoice/operations/issuing-red-requests.js +138 -0
- package/dist/shortcuts/invoice/operations/registry.js +4 -5
- package/dist/shortcuts/invoice/operations/reim-auto.js +40 -2
- package/dist/shortcuts/invoice/operations/reim-customer-projects.js +79 -0
- package/dist/shortcuts/invoice/operations/reim-customer.js +79 -30
- package/dist/shortcuts/invoice/operations/reim-relation.js +0 -146
- package/dist/shortcuts/invoice/operations/reim.js +2 -126
- package/dist/shortcuts/invoice/operations/shared.js +15 -17
- package/dist/shortcuts/invoice/preapproval-enrichment.js +180 -0
- package/dist/shortcuts/invoice/projection.js +14 -0
- package/dist/shortcuts/invoice/read-enrichment.js +123 -0
- package/dist/shortcuts/meeting/confirm-gate.js +42 -0
- package/dist/shortcuts/meeting/continuation.js +6 -2
- package/dist/shortcuts/meeting/minute-doc.js +119 -12
- package/dist/shortcuts/meeting/operations/attachment.js +19 -0
- package/dist/shortcuts/meeting/operations/compose-outcome.js +24 -2
- package/dist/shortcuts/meeting/operations/eb/conflict.js +2 -1
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +162 -19
- package/dist/shortcuts/meeting/operations/eb/room-recommend.js +22 -3
- package/dist/shortcuts/meeting/operations/group-share.js +268 -0
- package/dist/shortcuts/meeting/operations/minute-content.js +58 -1
- package/dist/shortcuts/meeting/operations/minute-export.js +295 -0
- package/dist/shortcuts/meeting/operations/registry.js +4 -0
- package/dist/shortcuts/project/operations/read.js +40 -15
- package/dist/shortcuts/recruit-stage/context.js +16 -81
- package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +89 -53
- package/dist/shortcuts/recruit-stage/operations/interview-feedback.js +15 -5
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +46 -108
- package/dist/shortcuts/recruit-stage/operations/list.js +203 -74
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +21 -85
- package/dist/shortcuts/recruit-stage/operations/search.js +113 -53
- package/dist/shortcuts/recruit-stage/shared.js +153 -4
- package/dist/shortcuts/workflow/endpoints.js +2 -0
- package/dist/shortcuts/workflow/operations/form.js +11 -0
- package/dist/shortcuts/workflow/operations/read.js +24 -5
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +2 -2
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +2 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +28 -4
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.node.js +198 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.prepareQuery.js +4 -2
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.subordinate.js +70 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/workflowClarification.js +15 -5
- package/docs/agent-invoice.md +28 -2
- package/docs/invoice.md +60 -9
- package/docs/project.md +1 -1
- package/package.json +1 -1
- package/skill-template/domains/yepiaotong.md +36 -7
- package/skills/weaver-e10-jinchengda/SKILL.md +64 -28
- package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +4 -4
- package/skills/weaver-e10-jinchengda/references/contract-bizreview-report-template.html +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-bizreview.md +5 -4
- package/skills/weaver-e10-jinchengda/references/contract-collection-node.md +26 -2
- package/skills/weaver-e10-jinchengda/references/contract-command-index.md +4 -4
- package/skills/weaver-e10-jinchengda/references/contract-compare-report.md +9 -8
- package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +47 -52
- package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +5 -5
- package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-element-save-record.md +7 -1
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +21 -12
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +44 -1
- package/skills/weaver-e10-jinchengda/references/contract-firstscreen-guide.md +5 -4
- package/skills/weaver-e10-jinchengda/references/contract-ledger-catalog.md +8 -0
- package/skills/weaver-e10-jinchengda/references/contract-ledger-query-playbook.md +33 -3
- package/skills/weaver-e10-jinchengda/references/contract-ledger-report.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-material-gap.md +17 -3
- package/skills/weaver-e10-jinchengda/references/contract-object-detect.md +12 -12
- package/skills/weaver-e10-jinchengda/references/contract-open-web-pages.md +18 -10
- package/skills/weaver-e10-jinchengda/references/contract-ops-draft.md +77 -37
- package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +7 -0
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +55 -12
- package/skills/weaver-e10-jinchengda/references/contract-review-todo.md +102 -0
- package/skills/weaver-e10-jinchengda/references/contract-sign-launch.md +1 -17
- package/skills/weaver-e10-jinchengda/references/contract-smart-draft.md +11 -8
- package/skills/weaver-e10-jinchengda/references/contract-type-fingerprints.md +2 -1
- package/skills/weaver-e10-jinchengda/references/orchestration.md +6 -6
- package/skills/weaver-e10-meeting/SKILL.md +203 -80
- package/skills/weaver-e10-meeting/references/create-quickstart.md +98 -0
- package/skills/weaver-e10-meeting/references/delivery-checklist.md +34 -0
- package/skills/weaver-e10-meeting/references/error-codes.md +44 -0
- package/skills/weaver-e10-meeting/references/minutes-pipeline.md +56 -3
- package/skills/weaver-e10-meeting/references/room-recommend.md +2 -0
- package/skills/weaver-e10-recruit-stage/SKILL.md +158 -146
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +64 -51
- package/skills/weaver-e10-recruit-stage/lib/interview-summary.mjs +56 -18
- package/skills/weaver-e10-recruit-stage/lib/recruit-attach-probe.mjs +127 -0
- package/skills/weaver-e10-recruit-stage/lib/recruit-shortlist.mjs +217 -30
- package/skills/weaver-e10-recruit-stage/lib/recruit-write-helper.mjs +39 -7
- package/skills/weaver-e10-recruit-stage/lib/recruit-xiaoe-file.mjs +2 -2
- package/skills/weaver-e10-recruit-stage/references/position-templates.md +10 -10
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +18 -18
- package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +29 -31
- package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +2 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-failure-fallback.md +4 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +19 -20
- package/skills/weaver-e10-recruit-stage/references/recruit-list-candidate.md +4 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +3 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-maint.md +10 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +4 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +21 -25
- package/skills/weaver-e10-recruit-stage/references/recruit-platform-compat.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-report-templates.md +19 -7
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +31 -58
- package/skills/weaver-e10-recruit-stage/references/recruit-search-candidate.md +3 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +2 -2
- package/skills/weaver-e10-recruit-stage/templates/candidate-evidence.html +2 -2
- package/skills/weaver-e10-recruit-stage/templates/interview-summary.html +1 -1
- package/skills/weaver-e10-recruit-stage/templates/match-report.html +25 -15
- package/skills/weaver-e10-shijingran/SKILL.md +2 -2
- package/skills/weaver-e10-shijingran/references/operations.md +5 -2
- package/skills/weaver-e10-shijingran/references/source-manifest.json +41 -40
- package/skills/weaver-e10-workflow/SKILL.md +13 -9
- package/skills/weaver-e10-workflow/references/todo-dialogue.md +33 -8
- package/skills/weaver-e10-workflow/references/todo-smart-convert.md +19 -14
- package/skills/weaver-e10-workflow/references/workflow-create.md +1 -1
- package/skills/weaver-e10-workflow/references/workflow-query.md +4 -2
- package/skills/weaver-e10-workflow/references/workflow-view.md +3 -3
- package/skills/weaver-e10-workflow/tools/todo-summary.cjs +132 -42
- package/skills/weaver-e10-yepiaotong/SKILL.md +133 -61
- package/skills/weaver-e10-yepiaotong/references/invoice-add.md +3 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-detail.md +18 -2
- package/skills/weaver-e10-yepiaotong/references/invoice-disabled-capabilities.md +3 -3
- package/skills/weaver-e10-yepiaotong/references/invoice-download.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +13 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-file-upload.md +3 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-import.md +6 -4
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +42 -45
- package/skills/weaver-e10-yepiaotong/references/invoice-ocr-preview.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-output-view.md +18 -2
- package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +14 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-red-workflow.md +96 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-reim-relation.md +56 -369
- package/skills/weaver-e10-yepiaotong/references/invoice-upload-and-validate.md +16 -6
- package/skills/weaver-e10-yepiaotong/references/name-fuzzy-search.md +38 -0
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +163 -646
- package/skills/weaver-e10-yepiaotong/references/reim-customer-search.md +90 -44
- package/skills/weaver-e10-yepiaotong/references/reim-eligibility-rules.md +85 -0
- package/skills/weaver-e10-yepiaotong/references/reim-fill-validation.md +61 -0
- package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +91 -280
- package/skills/weaver-e10-yepiaotong/references/reim-preapproval-rules.md +98 -0
- package/skills/weaver-e10-yepiaotong/references/reim-travel-invoice-matching.md +48 -0
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +234 -695
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +395 -204
- package/skills/weaver-e10-yepiaotong/references/travel-application-fill.md +84 -0
- package/skills/weaver-e10-yepiaotong/references/workflow-direct-fill.md +165 -0
- package/templates/meeting/minute.docx +0 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +0 -93
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +0 -774
- package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +0 -111
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +0 -360
- package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +0 -167
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
import { randomUUID } from 'node:crypto';
|
|
23
23
|
import { rsSuccess, schemaOf } from './types.js';
|
|
24
24
|
import { rsFail, rsValidationError, rsConfirmationError } from '../errors.js';
|
|
25
|
-
import { objIdOf, formIdOf, getFormLayout, getFormLayoutMeta, saveFormData, runEsb, getFormButtons, resolvePersonId, getDsOptions, getDsOptionsFull, findMenuNode, resolveCurrentUser, buildCardUrl, talentLinkExtra, pickSaveButtonActions, computeRequiredHint, randHex32, talentUiCardUrl, resolveInterviewListUrlOrNative, dsOptionsSnapshot, restoreDsOptions, invalidateEnvCache, verifySubmitted, expectedFields, probeCreatePermission, } from '../shared.js';
|
|
25
|
+
import { objIdOf, formIdOf, getFormLayout, getFormLayoutMeta, saveFormData, runEsb, getFormButtons, resolvePersonId, getDsOptions, getDsOptionsFull, findMenuNode, resolveCurrentUser, buildCardUrl, talentLinkExtra, pickSaveButtonActions, computeRequiredHint, randHex32, talentUiCardUrl, resolveInterviewListUrlOrNative, dsOptionsSnapshot, restoreDsOptions, invalidateEnvCache, verifySubmitted, expectedFields, probeCreatePermission, fetchDatasetRows, } from '../shared.js';
|
|
26
26
|
import { toMenuList } from '../../ehr/operations/shared.js';
|
|
27
27
|
// 面试计划表单字段 dataKey(缓存 fields 里取)。
|
|
28
28
|
// 注意:digital_id 不放入此列表——它只在「面试方式含 AI」时才是必填,
|
|
@@ -84,14 +84,29 @@ async function locateTalent(ctx, opts) {
|
|
|
84
84
|
const { host, cache } = ctx;
|
|
85
85
|
const listId = cache.lists?.talent?.listId;
|
|
86
86
|
const objId = cache.forms?.talent_pool?.objId;
|
|
87
|
-
if (!
|
|
88
|
-
throw rsFail('
|
|
87
|
+
if (!objId)
|
|
88
|
+
throw rsFail('环境缓存缺少人才表单(forms.talent_pool)');
|
|
89
89
|
const fields = cache.fields[objId] || {};
|
|
90
90
|
const nameKey = fields.candidate_name || fields.name;
|
|
91
91
|
if (opts.mobile && !fields.telephone)
|
|
92
92
|
throw rsFail('环境缓存缺少人才手机字段(telephone)');
|
|
93
93
|
if (!opts.mobile && opts.name && !nameKey)
|
|
94
94
|
throw rsFail('环境缓存缺少人才姓名字段(candidate_name/name)');
|
|
95
|
+
if (!listId) {
|
|
96
|
+
const ds = await fetchDatasetRows(host, objId, { pageSize: 200, maxRows: 1000 });
|
|
97
|
+
let rows = ds.rows;
|
|
98
|
+
if (opts.mobile)
|
|
99
|
+
rows = rows.filter((x) => String(x.telephone || '').includes(String(opts.mobile)));
|
|
100
|
+
else if (opts.name)
|
|
101
|
+
rows = rows.filter((x) => String(x.candidate_name || x.name || '').includes(String(opts.name)));
|
|
102
|
+
return rows.slice(0, 20).map((x) => ({
|
|
103
|
+
talentId: x.form_data_id || x.id || null,
|
|
104
|
+
name: x.candidate_name || x.name || null,
|
|
105
|
+
mobile: x.telephone || null,
|
|
106
|
+
position: x.position_manage_id || x.position || null,
|
|
107
|
+
recruitStatus: x.recruit_status || null,
|
|
108
|
+
}));
|
|
109
|
+
}
|
|
95
110
|
const conds = {};
|
|
96
111
|
if (opts.mobile) {
|
|
97
112
|
const mf = 'field_' + fields.telephone;
|
|
@@ -127,15 +142,6 @@ async function locateTalent(ctx, opts) {
|
|
|
127
142
|
}
|
|
128
143
|
// ── AI 面试方案(面试数字人配置表):objId 走 tag、listId 走菜单,全部运行时解析 ──
|
|
129
144
|
const PLAN_NAME_KEYS = ['msfa_name', 'digital_name', 'plan_name', 'scheme_name'];
|
|
130
|
-
function digitalMenuOf(cache) {
|
|
131
|
-
const hit = cache.digitalHumanMenu;
|
|
132
|
-
if (hit?.listId)
|
|
133
|
-
return hit;
|
|
134
|
-
const menus = cache.lists?.all_search || cache.menus || [];
|
|
135
|
-
return menus.find((m) => (m.menuName || '').includes('面试数字人'))
|
|
136
|
-
|| menus.find((m) => (m.menuName || '').includes('数字人配置'))
|
|
137
|
-
|| null;
|
|
138
|
-
}
|
|
139
145
|
async function digitalObjIdOf(ctx) {
|
|
140
146
|
const cached = ctx.cache.forms?.digital_human?.objId;
|
|
141
147
|
if (cached)
|
|
@@ -148,7 +154,7 @@ async function digitalObjIdOf(ctx) {
|
|
|
148
154
|
// 失败再回退「面试数字人配置」列表。两种都不写死任何 id。
|
|
149
155
|
async function listDigitalPlans(opts) {
|
|
150
156
|
const { ctx, formId, layoutId, fieldId } = opts;
|
|
151
|
-
const { host
|
|
157
|
+
const { host } = ctx;
|
|
152
158
|
// ① 关联字段候选(实测可用,返回 {id,name,ebObjId})
|
|
153
159
|
try {
|
|
154
160
|
const body = {
|
|
@@ -171,47 +177,18 @@ async function listDigitalPlans(opts) {
|
|
|
171
177
|
}
|
|
172
178
|
}
|
|
173
179
|
catch { /* 回退列表 */ }
|
|
174
|
-
// ②
|
|
175
|
-
const
|
|
176
|
-
if (!
|
|
177
|
-
return { available: false, items: [], reason: '
|
|
180
|
+
// ② 表直读兜底:按 tag/缓存解析 objId 直接读「面试数字人配置」表,不依赖列表菜单。
|
|
181
|
+
const objId = await digitalObjIdOf(ctx).catch(() => '');
|
|
182
|
+
if (!objId) {
|
|
183
|
+
return { available: false, items: [], reason: '候选接口不可用,且未能解析「面试数字人配置」对象 id(缓存/tag 均失败)' };
|
|
178
184
|
}
|
|
179
|
-
let
|
|
185
|
+
let rows = [];
|
|
180
186
|
try {
|
|
181
|
-
const
|
|
182
|
-
|
|
183
|
-
const li = await host.request({ path: '/api/ebuilder/form/list/listInit', body: liBody });
|
|
184
|
-
objId = String(li?.data?.objid || '');
|
|
185
|
-
}
|
|
186
|
-
catch { /* 回退 tag 解析 */ }
|
|
187
|
-
if (!objId)
|
|
188
|
-
objId = await digitalObjIdOf(ctx).catch(() => '');
|
|
189
|
-
if (!objId) {
|
|
190
|
-
return { available: false, items: [], reason: '未能解析「面试数字人配置」对象 id(listInit / tag 均失败)' };
|
|
187
|
+
const ds = await fetchDatasetRows(host, objId, { pageSize: 200, maxRows: 1000 });
|
|
188
|
+
rows = ds.rows;
|
|
191
189
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
const size = 100;
|
|
195
|
-
for (;;) {
|
|
196
|
-
const body = {
|
|
197
|
-
current: cur, pageSize: size, tableuid: randHex32(),
|
|
198
|
-
listId: menu.listId,
|
|
199
|
-
searchParamData: { searchType: '3', type: 'and' },
|
|
200
|
-
terminal: 'PC', browser: 'Chrome', requiredMatch: 1, mapResult: 1,
|
|
201
|
-
recheckQuery: 1, isFollow: 0, isShareToMe: 0, filterCondition: {},
|
|
202
|
-
cusMenuId: menu.cusMenuId, urlPageTitle: menu.menuName, menuName: menu.menuName,
|
|
203
|
-
};
|
|
204
|
-
const r = await host.request({
|
|
205
|
-
path: `/api/ebuilder/form/list/getListDatas?passid=${objId}&cid=${objId}`,
|
|
206
|
-
body, headers: { ebBusinessId: menu.listId },
|
|
207
|
-
});
|
|
208
|
-
const page = r?.data?.data || [];
|
|
209
|
-
rows.push(...page);
|
|
210
|
-
if (page.length < size)
|
|
211
|
-
break;
|
|
212
|
-
cur++;
|
|
213
|
-
if (cur > 20)
|
|
214
|
-
break; // 防御:最多 2000 条
|
|
190
|
+
catch (e) {
|
|
191
|
+
return { available: false, items: [], reason: '「面试数字人配置」表直读失败:' + (e?.message || e) };
|
|
215
192
|
}
|
|
216
193
|
const items = rows.map((x) => {
|
|
217
194
|
const nk = PLAN_NAME_KEYS.find((k) => String(x[k] || '').trim());
|
|
@@ -222,7 +199,7 @@ async function listDigitalPlans(opts) {
|
|
|
222
199
|
desc: String(x.zwjs || '').trim(),
|
|
223
200
|
};
|
|
224
201
|
}).filter((x) => x.id);
|
|
225
|
-
return { available: true, items, listId:
|
|
202
|
+
return { available: true, items, listId: 'dataset:' + objId, objId, menuName: '面试数字人配置', source: 'dataset' };
|
|
226
203
|
}
|
|
227
204
|
// 方案匹配:id 精确 → 名称全等 → 名称包含;多条命中视为歧义,绝不自动取第一条
|
|
228
205
|
function pickDigitalPlan(items, key) {
|
|
@@ -622,6 +599,7 @@ const baseInput = {
|
|
|
622
599
|
end: { type: 'string', pattern: '^\\d{4}-\\d{1,2}-\\d{1,2}[ T]\\d{1,2}:\\d{2}$', description: '结束时间(缺省=AI +7天 / 其它 +1小时)' },
|
|
623
600
|
email: { type: 'string', description: '候选人邮箱(AI 面试必填;补录值优先于人才资料)' },
|
|
624
601
|
aiPlan: { type: 'string', description: 'AI 面试方案名或 id(AI 面试必填;不传则 prepare 列出候选)' },
|
|
602
|
+
allowDuplicate: { type: 'boolean', description: '默认写前查重:同人才+同开始时间已有记录会阻断;确认要再建一条时显式置 true' },
|
|
625
603
|
};
|
|
626
604
|
async function prepare(args, env, opts = {}) {
|
|
627
605
|
const ctx = await makeCtx(env);
|
|
@@ -724,6 +702,40 @@ async function apply(args, env) {
|
|
|
724
702
|
const payload = await env.continuation.verify(String(args.continuation), 'recruit-stage.interview.arrange.apply');
|
|
725
703
|
return applyCore(args, env, payload);
|
|
726
704
|
}
|
|
705
|
+
/** 纯匹配逻辑(导出便于单测):同人才 + 同开始时间(分钟)+ 同面试方式视为重复。 */
|
|
706
|
+
export function matchDuplicateInterview(rows, target) {
|
|
707
|
+
const minute = (v) => String(v ?? '').trim().replace('T', ' ').slice(0, 16);
|
|
708
|
+
const text = (v) => {
|
|
709
|
+
if (v && typeof v === 'object') {
|
|
710
|
+
const c = v;
|
|
711
|
+
return String(c.fieldOptionId ?? c.fieldValue ?? '');
|
|
712
|
+
}
|
|
713
|
+
return String(v ?? '');
|
|
714
|
+
};
|
|
715
|
+
const wantStart = minute(target.startTime);
|
|
716
|
+
for (const row of rows) {
|
|
717
|
+
const s = minute(text(row.start_time));
|
|
718
|
+
if (!s || s !== wantStart)
|
|
719
|
+
continue;
|
|
720
|
+
const t = text(row.talent_id);
|
|
721
|
+
if (t !== String(target.talentId) && t !== String(target.talentName || ''))
|
|
722
|
+
continue;
|
|
723
|
+
const ty = text(row.interview_type);
|
|
724
|
+
if (target.type && ty && ty !== target.type)
|
|
725
|
+
continue;
|
|
726
|
+
return { formDataId: String(row.form_data_id || ''), start: s };
|
|
727
|
+
}
|
|
728
|
+
return null;
|
|
729
|
+
}
|
|
730
|
+
/**
|
|
731
|
+
* 写前查重(ISS-401):同人才 + 同开始时间(分钟)+ 同面试方式已有记录 → 视为重复 apply。
|
|
732
|
+
* 只扫首页 1000 行(面试台账按时间倒序,重复记录必是最近的),读失败按放行处理:
|
|
733
|
+
* 读不到表不能阻断正常安排,但调用方会把「查重未执行」写进 warnings。
|
|
734
|
+
*/
|
|
735
|
+
async function findDuplicateInterview(ctx, objId, talentId, talentName, startTime, type) {
|
|
736
|
+
const { rows } = await fetchDatasetRows(ctx.host, objId, { pageSize: 1000, maxRows: 1000 });
|
|
737
|
+
return matchDuplicateInterview(rows, { talentId, talentName, startTime, type });
|
|
738
|
+
}
|
|
727
739
|
/** 单个候选人的落库执行体(供单条 apply 与批量 apply 复用;payload 由调用方校验)。 */
|
|
728
740
|
async function applyCore(args, env, payload) {
|
|
729
741
|
restoreDsOptions(payload.enumMaps);
|
|
@@ -759,6 +771,26 @@ async function applyCore(args, env, payload) {
|
|
|
759
771
|
if (payload.fingerprint !== createHash('sha256').update(JSON.stringify(willSubmit)).digest('hex')) {
|
|
760
772
|
throw rsValidationError('fingerprint_mismatch', '待提交内容与 prepare 确认摘要不一致,请重新 prepare 确认后再 apply');
|
|
761
773
|
}
|
|
774
|
+
// 🔴 写前查重(ISS-401):此前只在失败文案里提醒「不要重新 apply」,重复提交仍会落两条记录。
|
|
775
|
+
// 这里按「同人才 + 同开始时间 + 同面试方式」拦一次;用户明确要建第二条时传 allowDuplicate:true。
|
|
776
|
+
let duplicateCheckSkipped = '';
|
|
777
|
+
if (merged.allowDuplicate !== true) {
|
|
778
|
+
try {
|
|
779
|
+
const dup = await findDuplicateInterview(ctx, plan.objId, talentId, String(plan.cand?.name || ''), String(startTime), String(merged.type || DEFAULT_INTERVIEW_TYPE));
|
|
780
|
+
if (dup) {
|
|
781
|
+
throw rsFail('已存在同人才、同开始时间的面试记录(formDataId=' + (dup.formDataId || '未知')
|
|
782
|
+
+ ',开始时间 ' + dup.start + '),本次未写入任何数据。'
|
|
783
|
+
+ '如确需再建一条(如多轮面试同一时段),请显式传 allowDuplicate:true 后重试;'
|
|
784
|
+
+ '若是上次 apply 已成功,请直接查看该记录,不要重复提交。', { duplicate: true, formDataId: dup.formDataId });
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
catch (e) {
|
|
788
|
+
// rsFail 是业务阻断,必须原样抛出;只有「读表失败」才放行并留痕
|
|
789
|
+
if (e?.type || e?.code)
|
|
790
|
+
throw e;
|
|
791
|
+
duplicateCheckSkipped = '面试记录查重未执行(读取面试台账失败:' + (e?.message || '未知原因') + '),本次仍继续写入';
|
|
792
|
+
}
|
|
793
|
+
}
|
|
762
794
|
const formDataId = await saveFormData(ctx.host, {
|
|
763
795
|
appId: plan.appId, formId: plan.formId, objId: plan.objId,
|
|
764
796
|
name: '面试管理-' + plan.cand.name + ' ' + plan.summary.time, dataDetails: plan.dataDetails,
|
|
@@ -796,7 +828,11 @@ async function applyCore(args, env, payload) {
|
|
|
796
828
|
aiPlan: plan.isAI && plan.aiPlanPicked ? { id: plan.aiPlanPicked.id, name: plan.aiPlanPicked.name } : undefined,
|
|
797
829
|
saveActions: actionsRun.executed,
|
|
798
830
|
verification: { checked: verification.checked, mismatches: verification.mismatches, unavailable: verification.unavailable || null },
|
|
799
|
-
warnings: [
|
|
831
|
+
warnings: [
|
|
832
|
+
...(actionsRun.warnings || []),
|
|
833
|
+
...(duplicateCheckSkipped ? [duplicateCheckSkipped] : []),
|
|
834
|
+
...verifyWarnings,
|
|
835
|
+
],
|
|
800
836
|
assigned: actionsRun.assigned || {},
|
|
801
837
|
});
|
|
802
838
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { rsSuccess, schemaOf } from './types.js';
|
|
2
2
|
import { rsFail, rsValidationError, rsConfirmationError } from '../errors.js';
|
|
3
|
-
import { objIdOf, formIdOf, saveFormData, runEsb, getDsOptions, getFormButtonsForData, findSubmitButton, analyzeButtonActions, getFormDataRecord, toSubmitDetails, randHex32, dsOptionsSnapshot, restoreDsOptions, } from '../shared.js';
|
|
3
|
+
import { objIdOf, formIdOf, saveFormData, runEsb, getDsOptions, getFormButtonsForData, findSubmitButton, analyzeButtonActions, getFormDataRecord, toSubmitDetails, randHex32, dsOptionsSnapshot, restoreDsOptions, fetchDatasetRows, } from '../shared.js';
|
|
4
4
|
// InterviewStatusEnum.INVALID(已失效):系统反馈按钮(填写/编辑/代评价)均要求非此状态
|
|
5
5
|
const INVALID_STATUS_ID = '841052191228968977';
|
|
6
6
|
const R = (v) => String(v ?? '').replace(/^<p>|<\/p>$/g, '').trim();
|
|
@@ -9,10 +9,20 @@ async function locateTalentId(host, cache, args) {
|
|
|
9
9
|
return String(args.talentId);
|
|
10
10
|
if (!args.mobile)
|
|
11
11
|
throw rsValidationError('locate_required', '请提供 talentId 或 mobile');
|
|
12
|
-
const
|
|
13
|
-
if (!
|
|
14
|
-
throw rsFail('
|
|
15
|
-
const
|
|
12
|
+
const poolObjId = cache.forms?.talent_pool?.objId;
|
|
13
|
+
if (!poolObjId)
|
|
14
|
+
throw rsFail('环境缓存缺少人才表单 objId');
|
|
15
|
+
const listId = cache.lists?.talent?.listId;
|
|
16
|
+
if (!listId) {
|
|
17
|
+
// 无菜单直读人才表,按手机号本地过滤;不再把列表菜单当定位前置条件。
|
|
18
|
+
const ds = await fetchDatasetRows(host, poolObjId, { pageSize: 200, maxRows: 1000 });
|
|
19
|
+
const rows = ds.rows.filter((x) => String(x.telephone || '').includes(String(args.mobile)));
|
|
20
|
+
if (!rows.length)
|
|
21
|
+
throw rsFail('未找到手机号为 ' + args.mobile + ' 的候选人');
|
|
22
|
+
if (rows.length > 1)
|
|
23
|
+
throw rsFail('该手机号命中多条候选人,请提供 talentId 精确定位');
|
|
24
|
+
return String(rows[0].talentId || rows[0].form_data_id || rows[0].id);
|
|
25
|
+
}
|
|
16
26
|
const r = await host.request({
|
|
17
27
|
path: '/api/ebuilder/form/list/getListDatas?passid=' + poolObjId + '&cid=' + poolObjId,
|
|
18
28
|
body: {
|
|
@@ -28,7 +28,7 @@ import { resolve as resolvePath, dirname } from 'node:path';
|
|
|
28
28
|
import { fileURLToPath } from 'node:url';
|
|
29
29
|
import { rsSuccess, schemaOf } from './types.js';
|
|
30
30
|
import { rsFail, rsValidationError, rsConfirmationError } from '../errors.js';
|
|
31
|
-
import { objIdOf, formIdOf, saveFormData, getDsOptions, getFormDataRecord, resolvePersonId, findMenuNode, resolveCurrentUser, resolveCurrentUserOrg, buildCardUrl, buildListUrl, randHex32, dsOptionsSnapshot, restoreDsOptions, invalidateEnvCache, verifySubmitted, expectedFields, probeCreatePermission, } from '../shared.js';
|
|
31
|
+
import { objIdOf, formIdOf, saveFormData, getDsOptions, getFormDataRecord, resolvePersonId, findMenuNode, resolveCurrentUser, resolveCurrentUserOrg, buildCardUrl, buildListUrl, randHex32, dsOptionsSnapshot, restoreDsOptions, invalidateEnvCache, verifySubmitted, expectedFields, probeCreatePermission, fetchDatasetRows, } from '../shared.js';
|
|
32
32
|
import { toMenuList } from '../../ehr/operations/shared.js';
|
|
33
33
|
import { isSelfTenant } from '../../ehr/operations/recruit.js';
|
|
34
34
|
const SCHEMA_ID_STR = { type: 'string', description: '18 位记录 id(字符串)' };
|
|
@@ -186,14 +186,8 @@ function refToSubmit(d) {
|
|
|
186
186
|
return null;
|
|
187
187
|
return o;
|
|
188
188
|
}
|
|
189
|
-
//
|
|
190
|
-
//
|
|
191
|
-
// 原实现直接读 cache.menus → 拿到 undefined → findMenuNode 返回 null → resolveWorkLocation 恒为 null
|
|
192
|
-
// → work_location 每次进 setSkipped(连完整地址都写不进去)。改为:
|
|
193
|
-
// ① cache.lists.all_search(与面试数字人菜单解析同一模式,已在用)
|
|
194
|
-
// ② cache.menus(若某环境确实有)
|
|
195
|
-
// ③ allMenus 接口兜底(resolvePositionNewUrl 已在用,同一写法)
|
|
196
|
-
const WORK_PLACE_NAMES = ['办公地点', '工作地点'];
|
|
189
|
+
// 工作地点不再按菜单/listId 定位:直接读 `uf_rcrt_work_place` 表单数据。
|
|
190
|
+
// 2026-11-30 用户口径:办公地点只允许直接读表,不保留菜单/列表备选。
|
|
197
191
|
/**
|
|
198
192
|
* `allMenus` 菜单树:**进程内按 appId 记忆**(原本 findWorkPlaceMenu / resolvePositionNewUrl /
|
|
199
193
|
* resolveHomePageUrl 三处各发一次,2026-11-18 实测同一次 jd.prefill 里发了 2 次,其中一次 787 ms)。
|
|
@@ -223,28 +217,6 @@ async function fetchAllMenusFlat(ctx) {
|
|
|
223
217
|
return []; // 接口不可用:调用方按「没找到」处理
|
|
224
218
|
}
|
|
225
219
|
}
|
|
226
|
-
async function findWorkPlaceMenu(ctx) {
|
|
227
|
-
const { host, appId, cache } = ctx;
|
|
228
|
-
const ok = (m) => m && m.listId;
|
|
229
|
-
// ① all_search
|
|
230
|
-
const allSearch = ((cache.lists || {}).all_search || []);
|
|
231
|
-
const hit1 = allSearch.find((m) => ok(m) && WORK_PLACE_NAMES.some((n) => String(m.menuName || '').includes(n)));
|
|
232
|
-
if (hit1)
|
|
233
|
-
return { listId: String(hit1.listId), cusMenuId: String(hit1.cusMenuId || ''), menuName: String(hit1.menuName || '') };
|
|
234
|
-
// ② cache.menus(可能不存在)
|
|
235
|
-
const hit2 = findMenuNode(cache.menus || [], WORK_PLACE_NAMES, (m) => ok(m));
|
|
236
|
-
if (hit2)
|
|
237
|
-
return { listId: String(hit2.listId), cusMenuId: String(hit2.cusMenuId || ''), menuName: String(hit2.menuName || '') };
|
|
238
|
-
// ③ allMenus 接口
|
|
239
|
-
try {
|
|
240
|
-
const flat = await fetchAllMenusFlat(ctx);
|
|
241
|
-
const hit3 = findMenuNode(flat, WORK_PLACE_NAMES, (m) => ok(m));
|
|
242
|
-
if (hit3)
|
|
243
|
-
return { listId: String(hit3.listId), cusMenuId: String(hit3.cusMenuId || ''), menuName: String(hit3.menuName || '') };
|
|
244
|
-
}
|
|
245
|
-
catch { /* 接口不可用则放弃 */ }
|
|
246
|
-
return null;
|
|
247
|
-
}
|
|
248
220
|
// ── 招聘流程「数据兜底」:缓存取不到时直接从列表数据解析 ──────────────────────────
|
|
249
221
|
// 🔴 2026-11-28 向下兼容:默认招聘流程原本只读 cache.defaultRecruitFlow,
|
|
250
222
|
// 而该值由 context 层解析、受「探测失败标记」影响可能长期为空(一次失败记住 6 小时),
|
|
@@ -339,92 +311,47 @@ async function resolveFlowByData(ctx) {
|
|
|
339
311
|
return null;
|
|
340
312
|
}
|
|
341
313
|
}
|
|
342
|
-
// 仅进程内 memo(不落盘):同一 CLI 进程内 prepare/apply 及多个 set
|
|
343
|
-
// 记录 id / 启用状态 optionId 一律运行时从列表解析,跨环境不缓存、不写死。
|
|
314
|
+
// 仅进程内 memo(不落盘):同一 CLI 进程内 prepare/apply 及多个 set 复用一次直读表请求。
|
|
344
315
|
const workPlaceMemo = new Map();
|
|
345
316
|
function stripHtml(s) {
|
|
346
317
|
return String(s ?? '').replace(/<[^>]*>/g, '').trim();
|
|
347
318
|
}
|
|
348
|
-
function parseSpans(raw) {
|
|
349
|
-
try {
|
|
350
|
-
const v = Array.isArray(raw) ? raw : JSON.parse(String(raw || '[]'));
|
|
351
|
-
return Array.isArray(v) ? v : [];
|
|
352
|
-
}
|
|
353
|
-
catch {
|
|
354
|
-
return [];
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
319
|
/** 「启用」判定:只读服务端翻译后的文本,不写死 optionId(跨环境 optionId 会变)。 */
|
|
358
320
|
function isEnabledText(s) {
|
|
359
321
|
const t = stripHtml(s);
|
|
360
322
|
return t.includes('启用') && !t.includes('禁用');
|
|
361
323
|
}
|
|
362
|
-
/**
|
|
324
|
+
/** 拉取「办公地点」:只直接读 `uf_rcrt_work_place` 表,不依赖菜单/listId。 */
|
|
363
325
|
async function loadWorkPlaces(ctx) {
|
|
364
326
|
const { host, appId } = ctx;
|
|
365
|
-
const
|
|
366
|
-
if (!menu)
|
|
367
|
-
return { rows: [], statusFiltered: false };
|
|
368
|
-
const key = appId + '|' + menu.listId;
|
|
327
|
+
const key = appId + '|work_place_table';
|
|
369
328
|
const cached = workPlaceMemo.get(key);
|
|
370
329
|
if (cached)
|
|
371
330
|
return cached;
|
|
372
|
-
const
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
const pObj = tagObjId || String(menu.objId || '');
|
|
379
|
-
if (!pObj)
|
|
331
|
+
const tag = await host.request({
|
|
332
|
+
path: `/api/ebuilder/form/obj/getObjsByTag?appId=${appId}&tag=uf_rcrt_work_place`,
|
|
333
|
+
method: 'GET',
|
|
334
|
+
}).catch(() => null);
|
|
335
|
+
const objId = Array.isArray(tag?.data) && tag.data[0] ? String(tag.data[0].id || '') : '';
|
|
336
|
+
if (!objId)
|
|
380
337
|
return { rows: [], statusFiltered: false };
|
|
381
|
-
const
|
|
382
|
-
const
|
|
383
|
-
const dispRows = [];
|
|
384
|
-
for (let page = 1; page <= 5; page++) {
|
|
385
|
-
const body = {
|
|
386
|
-
current: page, pageSize, tableuid: randHex32(),
|
|
387
|
-
listId: menu.listId, searchParamData: { searchType: '3', type: 'and' },
|
|
388
|
-
terminal: 'PC', browser: 'Chrome', requiredMatch: 1, mapResult: 1,
|
|
389
|
-
recheckQuery: 1, isFollow: 0, isShareToMe: 0, filterCondition: {},
|
|
390
|
-
cusMenuId: menu.cusMenuId, urlPageTitle: menu.menuName, menuName: menu.menuName,
|
|
391
|
-
};
|
|
392
|
-
const r = await host.request({
|
|
393
|
-
path: `/api/ebuilder/form/list/getListDatas?passid=${pObj}&cid=${pObj}`,
|
|
394
|
-
body, headers: { ebBusinessId: menu.listId },
|
|
395
|
-
});
|
|
396
|
-
const batch = (r?.data?.data || r?.data?.displayData || []);
|
|
397
|
-
rawRows.push(...batch);
|
|
398
|
-
dispRows.push(...(r?.data?.displayData || []));
|
|
399
|
-
if (batch.length < pageSize)
|
|
400
|
-
break; // 服务端 total/hasMore 不可信,唯一可靠判据是分页本身
|
|
401
|
-
}
|
|
402
|
-
// 从 displayData 学「启用」对应的 optionId 集合与行 id 集合(两种形态都兼容)
|
|
403
|
-
const enabledStatusIds = new Set();
|
|
404
|
-
const enabledRowIds = new Set();
|
|
405
|
-
for (const d of dispRows) {
|
|
406
|
-
const rid = String(d?.form_data_id || d?.id || '');
|
|
407
|
-
if (isEnabledText(d?.place_status) && rid)
|
|
408
|
-
enabledRowIds.add(rid);
|
|
409
|
-
for (const s of parseSpans(d?.place_statusSpan)) {
|
|
410
|
-
if (isEnabledText(s?.name) && s?.id)
|
|
411
|
-
enabledStatusIds.add(String(s.id));
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
const statusFiltered = enabledRowIds.size > 0 || enabledStatusIds.size > 0;
|
|
415
|
-
const rows = rawRows
|
|
416
|
-
.filter((x) => !statusFiltered
|
|
417
|
-
|| enabledRowIds.has(String(x?.form_data_id || x?.id || ''))
|
|
418
|
-
|| enabledStatusIds.has(String(x?.place_status || '')))
|
|
338
|
+
const { rows: rawRows } = await fetchDatasetRows(host, objId, { pageSize: 500, maxRows: 1000 });
|
|
339
|
+
const mapped = rawRows
|
|
419
340
|
.map((x) => ({
|
|
420
341
|
id: String(x?.form_data_id || x?.id || ''),
|
|
421
342
|
name: String(x?.name || ''),
|
|
422
343
|
detail: String(x?.detail_location || ''),
|
|
423
344
|
area: String(x?.area_text || ''),
|
|
424
345
|
city: String(x?.city || ''),
|
|
346
|
+
status: String(x?.place_status || ''),
|
|
425
347
|
}))
|
|
426
348
|
.filter((x) => !!x.id);
|
|
427
|
-
|
|
349
|
+
// place_status 只有翻译成中文文本时才可作为过滤依据;原始 optionId 一律不过滤。
|
|
350
|
+
const readableStatus = mapped.some((x) => /启用|禁用/.test(x.status));
|
|
351
|
+
const rows = readableStatus
|
|
352
|
+
? mapped.filter((x) => !x.status || isEnabledText(x.status))
|
|
353
|
+
: mapped;
|
|
354
|
+
const out = { rows, statusFiltered: readableStatus };
|
|
428
355
|
workPlaceMemo.set(key, out);
|
|
429
356
|
return out;
|
|
430
357
|
}
|
|
@@ -554,20 +481,27 @@ const REF_TEXT_KEYS = ['position_duty', 'work_request'];
|
|
|
554
481
|
async function fetchRecentReferences(ctx, jd, keyword) {
|
|
555
482
|
const { host, cache } = ctx;
|
|
556
483
|
const listParam = cache.lists?.position || null;
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
484
|
+
let rows = [];
|
|
485
|
+
if (listParam?.listId) {
|
|
486
|
+
const r = await host.request({
|
|
487
|
+
path: '/api/ebuilder/form/list/getListDatas?passid=' + jd.objId + '&cid=' + jd.objId,
|
|
488
|
+
body: {
|
|
489
|
+
current: 1, pageSize: 30, tableuid: randHex32(), listId: listParam.listId,
|
|
490
|
+
searchParamData: { searchType: '3', type: 'and' },
|
|
491
|
+
terminal: 'PC', browser: 'Chrome', requiredMatch: 1, mapResult: 1, recheckQuery: 1,
|
|
492
|
+
isFollow: 0, isShareToMe: 0, filterCondition: {},
|
|
493
|
+
cusMenuId: listParam.cusMenuId, urlPageTitle: listParam.menuName, menuName: listParam.menuName,
|
|
494
|
+
},
|
|
495
|
+
headers: { ebBusinessId: listParam.listId },
|
|
496
|
+
});
|
|
497
|
+
rows = r?.data?.displayData || r?.data?.data || [];
|
|
498
|
+
}
|
|
499
|
+
else {
|
|
500
|
+
// 无职位列表菜单时直读职位表;参考同类职位不是创建前置条件,不能因此阻断 JD,
|
|
501
|
+
// 但读失败必须让调用方看见原因(外层 catch 会转成 available:false + reason,ISS-501)。
|
|
502
|
+
const ds = await fetchDatasetRows(host, jd.objId, { pageSize: 1000, maxRows: 1000 });
|
|
503
|
+
rows = ds.rows;
|
|
504
|
+
}
|
|
571
505
|
const kw = String(keyword || '').trim();
|
|
572
506
|
const tokens = [...new Set(kw.split(/[^A-Za-z0-9\u4e00-\u9fff]+/).concat(kw).map((t) => t.trim()).filter((t) => t.length >= 2))];
|
|
573
507
|
const match = (row) => {
|
|
@@ -972,6 +906,10 @@ async function buildJd(opts) {
|
|
|
972
906
|
}
|
|
973
907
|
function setsOf(args) {
|
|
974
908
|
const raw = args.sets;
|
|
909
|
+
// 入参格式错误不能静默当空:object map 是最常见的误传形态(2026-11-30 实测)
|
|
910
|
+
if (raw && !Array.isArray(raw)) {
|
|
911
|
+
throw rsValidationError('set_invalid_format', 'sets 必须是数组 ["字段=值"] 或 [{key,value}];收到 object 已忽略,请改为数组形式');
|
|
912
|
+
}
|
|
975
913
|
if (Array.isArray(raw)) {
|
|
976
914
|
return raw.map((item) => {
|
|
977
915
|
if (typeof item === 'string') {
|