weaver-work-cli 0.1.2 → 0.1.5
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 +176 -78
- package/dist/cmd/setup/index.js +5 -5
- package/dist/cmd/skills/index.js +1 -1
- package/dist/core/hooks.js +7 -0
- package/dist/index.js +0 -0
- package/dist/internal/e10/auth/commands.js +159 -54
- package/dist/internal/e10/auth/xiaoe.js +268 -0
- package/dist/internal/e10/context.js +16 -2
- package/dist/internal/e10/index.js +1 -0
- package/dist/internal/e10/request-runtime.js +345 -0
- package/dist/internal/skills/install.js +48 -6
- package/dist/internal/skills/reader.js +27 -0
- package/dist/shortcuts/archive/continuation.js +70 -0
- package/dist/shortcuts/archive/errors.js +53 -0
- package/dist/shortcuts/archive/host.js +197 -0
- package/dist/shortcuts/archive/index.js +363 -0
- package/dist/shortcuts/archive/manifest.js +45 -0
- package/dist/shortcuts/archive/operations/archive-info.js +55 -0
- package/dist/shortcuts/archive/operations/borrow-car.js +146 -0
- package/dist/shortcuts/archive/operations/borrow-list.js +200 -0
- package/dist/shortcuts/archive/operations/confirm.js +46 -0
- package/dist/shortcuts/archive/operations/download.js +238 -0
- package/dist/shortcuts/archive/operations/flow-url.js +240 -0
- package/dist/shortcuts/archive/operations/fonds.js +95 -0
- package/dist/shortcuts/archive/operations/getPageUrl.js +137 -0
- package/dist/shortcuts/archive/operations/registry.js +43 -0
- package/dist/shortcuts/archive/operations/search.js +88 -0
- package/dist/shortcuts/archive/operations/shared.js +120 -0
- package/dist/shortcuts/archive/operations/types.js +23 -0
- package/dist/shortcuts/archive/operations/upload.js +182 -0
- package/dist/shortcuts/archive/operations.js +13 -0
- package/dist/shortcuts/archive/render/search-format.js +276 -0
- package/dist/shortcuts/archive/render/search-view.js +125 -0
- package/dist/shortcuts/asset/continuation.js +70 -0
- package/dist/shortcuts/asset/errors.js +67 -0
- package/dist/shortcuts/asset/host.js +438 -0
- package/dist/shortcuts/asset/index.js +255 -0
- package/dist/shortcuts/asset/manifest.js +471 -0
- package/dist/shortcuts/asset/operations/query.js +249 -0
- package/dist/shortcuts/asset/operations/registry.js +85 -0
- package/dist/shortcuts/asset/operations/shared.js +100 -0
- package/dist/shortcuts/asset/operations/type-cache.js +49 -0
- package/dist/shortcuts/asset/operations/types.js +1 -0
- package/dist/shortcuts/asset/operations/viewlink.js +117 -0
- package/dist/shortcuts/asset/operations/write.js +435 -0
- package/dist/shortcuts/asset/operations.js +9 -0
- package/dist/shortcuts/calendar/continuation.js +70 -0
- package/dist/shortcuts/calendar/errors.js +53 -0
- package/dist/shortcuts/calendar/host.js +148 -0
- package/dist/shortcuts/calendar/index.js +125 -0
- package/dist/shortcuts/calendar/manifest.js +26 -0
- package/dist/shortcuts/calendar/operations/read.js +259 -0
- package/dist/shortcuts/calendar/operations/registry.js +31 -0
- package/dist/shortcuts/calendar/operations/shared.js +132 -0
- package/dist/shortcuts/calendar/operations/types.js +25 -0
- package/dist/shortcuts/calendar/operations/write.js +439 -0
- package/dist/shortcuts/calendar/operations.js +8 -0
- package/dist/shortcuts/ehr/continuation.js +70 -0
- package/dist/shortcuts/ehr/errors.js +53 -0
- package/dist/shortcuts/ehr/host.js +213 -0
- package/dist/shortcuts/ehr/index.js +205 -0
- package/dist/shortcuts/ehr/manifest.js +47 -0
- package/dist/shortcuts/ehr/operations/attend-read.js +373 -0
- package/dist/shortcuts/ehr/operations/attend-write.js +514 -0
- package/dist/shortcuts/ehr/operations/hr-contact.js +363 -0
- package/dist/shortcuts/ehr/operations/hr-ds.js +298 -0
- package/dist/shortcuts/ehr/operations/hr-report.js +386 -0
- package/dist/shortcuts/ehr/operations/recruit-write.js +1629 -0
- package/dist/shortcuts/ehr/operations/recruit.js +803 -0
- package/dist/shortcuts/ehr/operations/registry.js +43 -0
- package/dist/shortcuts/ehr/operations/salary.js +319 -0
- package/dist/shortcuts/ehr/operations/shared.js +246 -0
- package/dist/shortcuts/ehr/operations/types.js +25 -0
- package/dist/shortcuts/ehr/operations.js +25 -0
- package/dist/shortcuts/esb/continuation.js +70 -0
- package/dist/shortcuts/esb/errors.js +65 -0
- package/dist/shortcuts/esb/host.js +187 -0
- package/dist/shortcuts/esb/index.js +112 -0
- package/dist/shortcuts/esb/manifest.js +91 -0
- package/dist/shortcuts/esb/operations/input-format.js +31 -0
- package/dist/shortcuts/esb/operations/registry.js +48 -0
- package/dist/shortcuts/esb/operations/shared.js +152 -0
- package/dist/shortcuts/esb/operations/trigger.js +76 -0
- package/dist/shortcuts/esb/operations/types.js +21 -0
- package/dist/shortcuts/esb/operations.js +15 -0
- package/dist/shortcuts/fna/continuation.js +70 -0
- package/dist/shortcuts/fna/errors.js +59 -0
- package/dist/shortcuts/fna/host.js +146 -0
- package/dist/shortcuts/fna/index.js +111 -0
- package/dist/shortcuts/fna/manifest.js +41 -0
- package/dist/shortcuts/fna/operations/budget.js +124 -0
- package/dist/shortcuts/fna/operations/expense-center.js +148 -0
- package/dist/shortcuts/fna/operations/invoice-writeoff.js +212 -0
- package/dist/shortcuts/fna/operations/loan.js +195 -0
- package/dist/shortcuts/fna/operations/registry.js +35 -0
- package/dist/shortcuts/fna/operations/shared.js +210 -0
- package/dist/shortcuts/fna/operations/types.js +25 -0
- package/dist/shortcuts/fna/operations.js +19 -0
- package/dist/shortcuts/hrm/errors.js +38 -0
- package/dist/shortcuts/hrm/host.js +156 -0
- package/dist/shortcuts/hrm/index.js +111 -0
- package/dist/shortcuts/hrm/manifest.js +32 -0
- package/dist/shortcuts/hrm/operations/employee.js +338 -0
- package/dist/shortcuts/hrm/operations/org.js +110 -0
- package/dist/shortcuts/hrm/operations/position.js +176 -0
- package/dist/shortcuts/hrm/operations/registry.js +33 -0
- package/dist/shortcuts/hrm/operations/shared.js +143 -0
- package/dist/shortcuts/hrm/operations/types.js +23 -0
- package/dist/shortcuts/hrm/operations.js +19 -0
- package/dist/shortcuts/index.js +24 -0
- package/dist/shortcuts/invoice/host.js +99 -94
- package/dist/shortcuts/invoice/index.js +58 -59
- package/dist/shortcuts/invoice/manifest.js +200 -3
- package/dist/shortcuts/invoice/operations/browse-field.js +17 -0
- package/dist/shortcuts/invoice/operations/issuing.js +198 -0
- package/dist/shortcuts/invoice/operations/registry.js +17 -0
- package/dist/shortcuts/invoice/operations/reim.js +401 -0
- package/dist/shortcuts/invoice/operations/shared.js +247 -0
- package/dist/shortcuts/jiuchuanhui/cache.js +441 -0
- package/dist/shortcuts/jiuchuanhui/continuation.js +70 -0
- package/dist/shortcuts/jiuchuanhui/errors.js +59 -0
- package/dist/shortcuts/jiuchuanhui/host.js +159 -0
- package/dist/shortcuts/jiuchuanhui/index.js +109 -0
- package/dist/shortcuts/jiuchuanhui/manifest.js +469 -0
- package/dist/shortcuts/jiuchuanhui/operations/datajson.js +214 -0
- package/dist/shortcuts/jiuchuanhui/operations/esb.js +157 -0
- package/dist/shortcuts/jiuchuanhui/operations/generic.js +146 -0
- package/dist/shortcuts/jiuchuanhui/operations/registry.js +133 -0
- package/dist/shortcuts/jiuchuanhui/operations/shared.js +158 -0
- package/dist/shortcuts/jiuchuanhui/operations/types.js +1 -0
- package/dist/shortcuts/jiuchuanhui/operations.js +8 -0
- package/dist/shortcuts/mail/continuation.js +70 -0
- package/dist/shortcuts/mail/errors.js +53 -0
- package/dist/shortcuts/mail/host.js +182 -0
- package/dist/shortcuts/mail/index.js +519 -0
- package/dist/shortcuts/mail/manifest.js +38 -0
- package/dist/shortcuts/mail/operations/mail-blacklist.js +79 -0
- package/dist/shortcuts/mail/operations/mail-contacts.js +195 -0
- package/dist/shortcuts/mail/operations/mail-manage.js +335 -0
- package/dist/shortcuts/mail/operations/mail-read.js +508 -0
- package/dist/shortcuts/mail/operations/mail-send.js +474 -0
- package/dist/shortcuts/mail/operations/mail-sign.js +203 -0
- package/dist/shortcuts/mail/operations/mail-template.js +170 -0
- package/dist/shortcuts/mail/operations/registry.js +41 -0
- package/dist/shortcuts/mail/operations/shared.js +64 -0
- package/dist/shortcuts/mail/operations/types.js +27 -0
- package/dist/shortcuts/mail/operations.js +19 -0
- package/dist/shortcuts/meeting/continuation.js +70 -0
- package/dist/shortcuts/meeting/errors.js +63 -0
- package/dist/shortcuts/meeting/host.js +167 -0
- package/dist/shortcuts/meeting/index.js +123 -0
- package/dist/shortcuts/meeting/manifest.js +64 -0
- package/dist/shortcuts/meeting/operations/catalogs.js +58 -0
- package/dist/shortcuts/meeting/operations/change.js +242 -0
- package/dist/shortcuts/meeting/operations/conflicts.js +142 -0
- package/dist/shortcuts/meeting/operations/create.js +349 -0
- package/dist/shortcuts/meeting/operations/env.js +191 -0
- package/dist/shortcuts/meeting/operations/lifecycle.js +139 -0
- package/dist/shortcuts/meeting/operations/meetings.js +73 -0
- package/dist/shortcuts/meeting/operations/receipts.js +195 -0
- package/dist/shortcuts/meeting/operations/registry.js +47 -0
- package/dist/shortcuts/meeting/operations/rooms.js +132 -0
- package/dist/shortcuts/meeting/operations/shared.js +112 -0
- package/dist/shortcuts/meeting/operations/signs.js +41 -0
- package/dist/shortcuts/meeting/operations/types.js +25 -0
- package/dist/shortcuts/meeting/operations.js +19 -0
- package/dist/shortcuts/plan/continuation.js +70 -0
- package/dist/shortcuts/plan/errors.js +70 -0
- package/dist/shortcuts/plan/host.js +180 -0
- package/dist/shortcuts/plan/index.js +150 -0
- package/dist/shortcuts/plan/manifest.js +53 -0
- package/dist/shortcuts/plan/operations/link.js +256 -0
- package/dist/shortcuts/plan/operations/read.js +259 -0
- package/dist/shortcuts/plan/operations/registry.js +33 -0
- package/dist/shortcuts/plan/operations/shared.js +246 -0
- package/dist/shortcuts/plan/operations/types.js +49 -0
- package/dist/shortcuts/plan/operations/version.js +49 -0
- package/dist/shortcuts/plan/operations/write.js +710 -0
- package/dist/shortcuts/plan/operations.js +8 -0
- package/dist/shortcuts/yimiaoban/continuation.js +70 -0
- package/dist/shortcuts/yimiaoban/errors.js +61 -0
- package/dist/shortcuts/yimiaoban/host.js +469 -0
- package/dist/shortcuts/yimiaoban/index.js +271 -0
- package/dist/shortcuts/yimiaoban/manifest.js +28 -0
- package/dist/shortcuts/yimiaoban/operations/file-user.js +288 -0
- package/dist/shortcuts/yimiaoban/operations/group-read.js +477 -0
- package/dist/shortcuts/yimiaoban/operations/group-write.js +591 -0
- package/dist/shortcuts/yimiaoban/operations/msg-parse.js +429 -0
- package/dist/shortcuts/yimiaoban/operations/msg-sync.js +519 -0
- package/dist/shortcuts/yimiaoban/operations/msg-write.js +593 -0
- package/dist/shortcuts/yimiaoban/operations/person.js +102 -0
- package/dist/shortcuts/yimiaoban/operations/registry.js +38 -0
- package/dist/shortcuts/yimiaoban/operations/session.js +437 -0
- package/dist/shortcuts/yimiaoban/operations/shared.js +236 -0
- package/dist/shortcuts/yimiaoban/operations/types.js +27 -0
- package/dist/shortcuts/yimiaoban/operations/write-util.js +78 -0
- package/dist/shortcuts/yimiaoban/operations.js +8 -0
- package/docs/SKILL.md +11 -7
- package/docs/_catalog.md +28 -5
- package/docs/agent-invoice.md +19 -9
- package/docs/agent-skill-install.md +141 -22
- package/docs/calendar.md +87 -0
- package/docs/e10-auth.md +28 -9
- package/docs/ehr.md +186 -0
- package/docs/esb.md +64 -0
- package/docs/fna.md +72 -0
- package/docs/hrm.md +89 -0
- package/docs/invoice.md +61 -20
- package/docs/jiuchuanhui.md +131 -0
- package/docs/meeting.md +48 -0
- package/docs/operation-manual.md +443 -0
- package/docs/plan.md +82 -0
- package/docs/wenshuding.md +129 -0
- package/docs/yimiaoban.md +86 -0
- package/docs/ziguanjia.md +89 -0
- package/package.json +4 -4
- package/scripts/package-skill.mjs +127 -34
- package/scripts/postbuild.mjs +13 -0
- package/skill-template/business-info.json +16 -2
- package/skill-template/domains/calendar.md +15 -0
- package/skill-template/domains/esb.md +13 -0
- package/skill-template/domains/hrm.md +16 -0
- package/skill-template/domains/jiuchuanhui.md +23 -0
- package/skill-template/domains/jucailin.md +22 -0
- package/skill-template/domains/mail.md +21 -0
- package/skill-template/domains/meeting.md +3 -0
- package/skill-template/domains/plan.md +17 -0
- package/skill-template/domains/qiyecheng.md +17 -0
- package/skill-template/domains/shared.md +5 -3
- package/skill-template/domains/skill-maker.md +10 -0
- package/skill-template/domains/wenshuding.md +22 -0
- package/skill-template/domains/{invoice.md → yepiaotong.md} +4 -0
- package/skill-template/domains/yimiaoban.md +21 -0
- package/skill-template/domains/ziguanjia.md +21 -0
- package/skill-template/master-skill-template.md +12 -6
- package/skill-template/skill-template.md +26 -10
- package/skills/weaver-e10-calendar/SKILL.md +102 -0
- package/skills/weaver-e10-calendar/product.json +8 -0
- package/skills/weaver-e10-calendar/references/calendar-app-check.md +65 -0
- package/skills/weaver-e10-calendar/references/calendar-dict.md +55 -0
- package/skills/weaver-e10-calendar/references/calendar-query.md +70 -0
- package/skills/weaver-e10-calendar/references/calendar-write.md +97 -0
- package/skills/weaver-e10-calendar/references/source-manifest.json +54 -0
- package/skills/weaver-e10-esb/SKILL.md +103 -0
- package/skills/weaver-e10-esb/product.json +8 -0
- package/skills/weaver-e10-esb/references/input-format.md +52 -0
- package/skills/weaver-e10-esb/references/source-manifest.json +242 -0
- package/skills/weaver-e10-esb/references/trigger.md +99 -0
- package/skills/weaver-e10-hrm/SKILL.md +88 -0
- package/skills/weaver-e10-hrm/product.json +8 -0
- package/skills/weaver-e10-hrm/references/employee.md +109 -0
- package/skills/weaver-e10-hrm/references/org.md +95 -0
- package/skills/weaver-e10-hrm/references/position.md +95 -0
- package/skills/weaver-e10-hrm/references/source-manifest.json +121 -0
- package/skills/weaver-e10-jiuchuanhui/SKILL.md +175 -0
- package/skills/weaver-e10-jiuchuanhui/product.json +8 -0
- package/skills/weaver-e10-jiuchuanhui/references/cache.md +110 -0
- package/skills/weaver-e10-jiuchuanhui/references/clue.md +61 -0
- package/skills/weaver-e10-jiuchuanhui/references/contact-plan.md +56 -0
- package/skills/weaver-e10-jiuchuanhui/references/contact-records.md +48 -0
- package/skills/weaver-e10-jiuchuanhui/references/contact.md +56 -0
- package/skills/weaver-e10-jiuchuanhui/references/customer.md +69 -0
- package/skills/weaver-e10-jiuchuanhui/references/disabled-capabilities.md +24 -0
- package/skills/weaver-e10-jiuchuanhui/references/discovery-config.md +60 -0
- package/skills/weaver-e10-jiuchuanhui/references/general-helpers.md +59 -0
- package/skills/weaver-e10-jiuchuanhui/references/jiuchuanhui-entry.md +60 -0
- package/skills/weaver-e10-jiuchuanhui/references/sale.md +72 -0
- package/skills/weaver-e10-jiuchuanhui/references/source-manifest.json +2632 -0
- package/skills/weaver-e10-jucailin/SKILL.md +102 -0
- package/skills/weaver-e10-jucailin/product.json +8 -0
- package/skills/weaver-e10-jucailin/references/attend-read.md +73 -0
- package/skills/weaver-e10-jucailin/references/attend-write.md +82 -0
- package/skills/weaver-e10-jucailin/references/hr-contact.md +92 -0
- package/skills/weaver-e10-jucailin/references/hr-datasource.md +104 -0
- package/skills/weaver-e10-jucailin/references/hr-report.md +76 -0
- package/skills/weaver-e10-jucailin/references/recruit-read.md +76 -0
- package/skills/weaver-e10-jucailin/references/recruit-write.md +70 -0
- package/skills/weaver-e10-jucailin/references/safety-boundaries.md +35 -0
- package/skills/weaver-e10-jucailin/references/salary.md +110 -0
- package/skills/weaver-e10-jucailin/references/source-manifest.json +152 -0
- package/skills/weaver-e10-mail/SKILL.md +152 -0
- package/skills/weaver-e10-mail/product.json +8 -0
- package/skills/weaver-e10-mail/references/mail-agent-entry.md +47 -0
- package/skills/weaver-e10-mail/references/mail-attachment.md +30 -0
- package/skills/weaver-e10-mail/references/mail-blacklist.md +27 -0
- package/skills/weaver-e10-mail/references/mail-contacts.md +33 -0
- package/skills/weaver-e10-mail/references/mail-manage.md +44 -0
- package/skills/weaver-e10-mail/references/mail-read.md +76 -0
- package/skills/weaver-e10-mail/references/mail-send.md +43 -0
- package/skills/weaver-e10-mail/references/mail-sign.md +33 -0
- package/skills/weaver-e10-mail/references/mail-template.md +31 -0
- package/skills/weaver-e10-mail/references/safety-boundaries.md +32 -0
- package/skills/weaver-e10-meeting/SKILL.md +106 -0
- package/skills/weaver-e10-meeting/product.json +8 -0
- package/skills/weaver-e10-meeting/references/meeting-change.md +67 -0
- package/skills/weaver-e10-meeting/references/meeting-create.md +52 -0
- package/skills/weaver-e10-meeting/references/meeting-lifecycle.md +57 -0
- package/skills/weaver-e10-meeting/references/meeting-queries.md +61 -0
- package/skills/weaver-e10-meeting/references/meeting-receipts-signs.md +48 -0
- package/skills/weaver-e10-meeting/references/meeting-update.md +7 -0
- package/skills/weaver-e10-meeting/references/source-manifest.json +50 -0
- package/skills/weaver-e10-plan/SKILL.md +140 -0
- package/skills/weaver-e10-plan/product.json +8 -0
- package/skills/weaver-e10-plan/references/plan-collect-and-compose.md +123 -0
- package/skills/weaver-e10-plan/references/plan-overview-and-routing.md +138 -0
- package/skills/weaver-e10-plan/references/plan-report-query.md +154 -0
- package/skills/weaver-e10-plan/references/plan-report-remind.md +104 -0
- package/skills/weaver-e10-plan/references/plan-report-write.md +162 -0
- package/skills/weaver-e10-plan/references/source-manifest.json +858 -0
- package/skills/weaver-e10-qiyecheng/SKILL.md +119 -0
- package/skills/weaver-e10-qiyecheng/product.json +8 -0
- package/skills/weaver-e10-qiyecheng/references/budget.md +65 -0
- package/skills/weaver-e10-qiyecheng/references/catalog.md +56 -0
- package/skills/weaver-e10-qiyecheng/references/expense-center.md +51 -0
- package/skills/weaver-e10-qiyecheng/references/invoice-writeoff.md +57 -0
- package/skills/weaver-e10-qiyecheng/references/loan-management.md +59 -0
- package/skills/weaver-e10-qiyecheng/references/source-manifest.json +698 -0
- package/skills/weaver-e10-shared/SKILL.md +90 -0
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +127 -0
- package/skills/{weaver-work-cli-shared → weaver-e10-shared}/references/json-output-contract.md +34 -0
- package/skills/weaver-e10-shared/references/weaver-e10-installation.md +110 -0
- package/skills/weaver-e10-skill-maker/SKILL.md +78 -0
- package/skills/weaver-e10-skill-maker/product.json +8 -0
- package/skills/weaver-e10-skill-maker/references/business-skill-generation.md +124 -0
- package/skills/weaver-e10-skill-maker/references/detector-validation.md +101 -0
- package/skills/weaver-e10-skill-maker/references/module-cli-generation.md +230 -0
- package/skills/weaver-e10-skill-maker/references/post-generation-install.md +105 -0
- package/skills/weaver-e10-skill-maker/references/source-update-detection.md +261 -0
- package/skills/weaver-e10-skill-maker/references/weaver-skill-style.md +141 -0
- package/skills/weaver-e10-wenshuding/SKILL.md +158 -0
- package/skills/weaver-e10-wenshuding/product.json +8 -0
- package/skills/weaver-e10-wenshuding/references/archive-agent-entry.md +63 -0
- package/skills/weaver-e10-wenshuding/references/archive-borrow-car.md +52 -0
- package/skills/weaver-e10-wenshuding/references/archive-borrow-list.md +52 -0
- package/skills/weaver-e10-wenshuding/references/archive-disabled-capabilities.md +22 -0
- package/skills/weaver-e10-wenshuding/references/archive-download.md +48 -0
- package/skills/weaver-e10-wenshuding/references/archive-flow.md +46 -0
- package/skills/weaver-e10-wenshuding/references/archive-fonds.md +34 -0
- package/skills/weaver-e10-wenshuding/references/archive-info.md +33 -0
- package/skills/weaver-e10-wenshuding/references/archive-search.md +52 -0
- package/skills/weaver-e10-wenshuding/references/archive-upload.md +41 -0
- package/skills/weaver-e10-wenshuding/references/source-manifest.json +517 -0
- package/skills/weaver-e10-yepiaotong/SKILL.md +184 -0
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-add.md +1 -1
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-agent-entry.md +16 -9
- package/skills/weaver-e10-yepiaotong/references/invoice-browse-field-data.md +204 -0
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-delete.md +1 -1
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-detail.md +13 -5
- package/skills/weaver-e10-yepiaotong/references/invoice-disabled-capabilities.md +28 -0
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-download.md +9 -2
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-enterprise-list.md +12 -4
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-file-upload.md +9 -2
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-import.md +16 -7
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-examples.md +120 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-field-rules.md +161 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing.md +99 -0
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-ocr-preview.md +12 -4
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-personal-list.md +12 -4
- package/skills/weaver-e10-yepiaotong/references/invoice-red.md +261 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +97 -0
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-update.md +1 -1
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-validation-preview.md +9 -2
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +1340 -0
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +845 -0
- package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +94 -0
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +449 -0
- package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +266 -0
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +494 -0
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +1103 -0
- package/skills/weaver-e10-yimiaoban/SKILL.md +104 -0
- package/skills/weaver-e10-yimiaoban/product.json +8 -0
- package/skills/weaver-e10-yimiaoban/references/ding-write.md +68 -0
- package/skills/weaver-e10-yimiaoban/references/error-codes.md +85 -0
- package/skills/weaver-e10-yimiaoban/references/field-resolution.md +46 -0
- package/skills/weaver-e10-yimiaoban/references/file-user-i18n.md +54 -0
- package/skills/weaver-e10-yimiaoban/references/group-read.md +55 -0
- package/skills/weaver-e10-yimiaoban/references/group-write.md +72 -0
- package/skills/weaver-e10-yimiaoban/references/msg-read.md +59 -0
- package/skills/weaver-e10-yimiaoban/references/msg-write.md +64 -0
- package/skills/weaver-e10-yimiaoban/references/person.md +44 -0
- package/skills/weaver-e10-yimiaoban/references/safety-boundaries.md +61 -0
- package/skills/weaver-e10-yimiaoban/references/session-sysmsg.md +47 -0
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +485 -0
- package/skills/weaver-e10-ziguanjia/SKILL.md +163 -0
- package/skills/weaver-e10-ziguanjia/product.json +8 -0
- package/skills/weaver-e10-ziguanjia/references/source-manifest.json +147 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-agent-entry.md +65 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-create.md +45 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-depre.md +48 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-disabled-capabilities.md +22 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-purch.md +57 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-query.md +62 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-repair.md +83 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-resolve.md +49 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-return.md +70 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-update.md +45 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-use.md +60 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-viewlink.md +81 -0
- package/skills/weaver-work-cli-invoice/SKILL.md +0 -122
- package/skills/weaver-work-cli-invoice/references/invoice-disabled-capabilities.md +0 -26
- package/skills/weaver-work-cli-shared/SKILL.md +0 -63
- package/skills/weaver-work-cli-shared/references/e10-auth-and-session.md +0 -90
- package/skills/weaver-work-cli-shared/references/weaver-work-cli-installation.md +0 -73
- /package/skills/{weaver-work-cli-shared → weaver-e10-shared}/references/high-risk-write.md +0 -0
- /package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/product.json +0 -0
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
# AI 报销单自动填单 — 工作流编排
|
|
2
|
+
|
|
3
|
+
> 本文件是报销自动填单的完整工作流参考。
|
|
4
|
+
> CLI 命令用法见 [`invoice-reim.md`](invoice-reim.md)。
|
|
5
|
+
> 实际调用通过 `weaver-work-cli --json invoice run <operation>` 执行,不能直接 curl E10 接口。
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## ⚠️⚠️⚠️ 最高优先级规则:严禁篡改任何原始数据值 ⚠️⚠️⚠️
|
|
10
|
+
|
|
11
|
+
**所有从 CLI 返回、用户提供、或上下文已有的数据值,都必须逐字符原样使用,严禁做任何修改。**
|
|
12
|
+
**这包括但不限于:ID、日期、金额、名称等一切字段值。**
|
|
13
|
+
|
|
14
|
+
已知反复出现的错误:
|
|
15
|
+
|
|
16
|
+
| 类型 | 正确值 | 错误值(被AI篡改) | 错误原因 |
|
|
17
|
+
|------|--------|-------------------|---------|
|
|
18
|
+
| ID | `100003720000076271` | `100003720000000076271` | 中间被插入了 `000` |
|
|
19
|
+
| ID | `100003720000077896` | `100003720000000077896` | 中间被插入了 `000` |
|
|
20
|
+
| 日期 | `2026-07-19` | `2026-00000000007-19` | 月份被篡改,插入了多余的 `0` |
|
|
21
|
+
| 金额 | `108.2` | 不得修改 | — |
|
|
22
|
+
|
|
23
|
+
**处理规则:**
|
|
24
|
+
1. 从 CLI 返回的 JSON 中获取的值 → **逐字符原样复制**,一个字符都不能改
|
|
25
|
+
2. 用户提供的值 → 原样使用
|
|
26
|
+
3. **绝不做"对齐位数"、"补零"、"格式化"、"规范化"等任何处理**
|
|
27
|
+
4. 日期值从 CLI 获取后直接使用,不要尝试拆分再拼接
|
|
28
|
+
5. 如果不确定某个值是否正确,回溯到原始数据源重新复制
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## 时间戳内联计算(零工具调用)
|
|
33
|
+
|
|
34
|
+
> **所有日期 → 秒级时间戳的转换由 AI 直接计算,无需调用外部脚本。**
|
|
35
|
+
|
|
36
|
+
### 计算公式(UTC+8 时区)
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
日期 → 秒级时间戳:
|
|
40
|
+
起始时间 = Date("YYYY-MM-DD 00:00:00 +08:00") 的 Unix 秒数
|
|
41
|
+
结束时间 = Date("YYYY-MM-DD 23:59:59 +08:00") 的 Unix 秒数
|
|
42
|
+
|
|
43
|
+
默认查询(最近一周):
|
|
44
|
+
begin = 今天00:00:00秒时间戳 - 7 * 86400
|
|
45
|
+
end = 今天23:59:59秒时间戳
|
|
46
|
+
|
|
47
|
+
扩大到一个月(fallback):
|
|
48
|
+
begin = 今天00:00:00秒时间戳 - 30 * 86400
|
|
49
|
+
end = 今天23:59:59秒时间戳
|
|
50
|
+
|
|
51
|
+
用户指定日期范围:
|
|
52
|
+
begin = 指定起始日 00:00:00 秒时间戳
|
|
53
|
+
end = 指定结束日 23:59:59 秒时间戳
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 发票查询默认入参
|
|
57
|
+
|
|
58
|
+
CLI 已默认 `sreim="3"`、`bill_type=0`、`page_size=10`。报销查票时只传日期范围:
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"page_size": 20,
|
|
63
|
+
"start_pos": 0,
|
|
64
|
+
"date_begin": "{begin}",
|
|
65
|
+
"date_end": "{end}"
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
可选筛选参数(按用户意图添加):
|
|
70
|
+
- `"content"`: 消费内容关键词(如 `"滴滴"`、`"住宿"`)
|
|
71
|
+
- `"number"`: 发票号码精确匹配
|
|
72
|
+
- `"types"`: 发票类型 ID 数组
|
|
73
|
+
|
|
74
|
+
> 按发票号码查询时不设 `date_begin` / `date_end`。
|
|
75
|
+
> 不要传 `flag`、`fylxs`、`consumption_tm_begin`、`consumption_tm_end`(CLI 不接受这些字段)。
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 核心行为准则(必须遵守)
|
|
80
|
+
|
|
81
|
+
### 1. 立即获取数据,展示后确认
|
|
82
|
+
|
|
83
|
+
当用户表达报销意图时(如"帮我报销"、"我要报销"、"报销一下"等),**必须立即调用 `invoice.list` 获取发票数据,展示发票汇总信息后询问用户确认,确认后再自动执行后续填单流程**。禁止反问用户要求提供发票信息、事前申请信息、报销用途等。
|
|
84
|
+
|
|
85
|
+
**禁止的行为:**
|
|
86
|
+
|
|
87
|
+
- 问用户"请提供发票信息"
|
|
88
|
+
- 问用户"是否有事前申请"
|
|
89
|
+
- 问用户"报销用途是什么"
|
|
90
|
+
- 列出一堆需要用户提供的信息清单
|
|
91
|
+
- 任何形式的"请先提供XX"
|
|
92
|
+
- **输出内部推理过程**(如"我需要引导确认"、"我现在要调用 XX CLI"、"我需要先获取XX数据"),直接对用户说话
|
|
93
|
+
|
|
94
|
+
**正确的行为:**
|
|
95
|
+
|
|
96
|
+
- 按内联公式计算时间戳参数,调用 `invoice.list` 获取发票数据
|
|
97
|
+
- 最近一周无结果 → 自动用一个月参数再查
|
|
98
|
+
- 直接调用 `invoice.reim.requests.list` 获取用户的事前申请
|
|
99
|
+
- **获取到发票后,先展示发票汇总信息(张数、基础信息),明确告知用户查询范围,询问用户确认是否报销**
|
|
100
|
+
- 用户确认后,自动执行匹配 → 获取表单结构 → 组装填单 JSON → `invoice.reim.flow.create.prepare` → 用户确认 → `.apply` 生成报销单
|
|
101
|
+
|
|
102
|
+
### 2. 根据用户意图智能构建查询条件
|
|
103
|
+
|
|
104
|
+
#### 报销填单意图
|
|
105
|
+
|
|
106
|
+
| 用户说的话 | AI 应该做的 |
|
|
107
|
+
|------------|-------------|
|
|
108
|
+
| "帮我报销" / "我要报销" | 查**最近一周**发票 → 无结果则查**最近一个月** → **展示发票汇总,询问确认** → 确认后走后续流程 |
|
|
109
|
+
| "报销打车费" | 设置 `content="滴滴"` 筛选交通类 → **展示发票汇总,询问确认** → 确认后走后续流程 |
|
|
110
|
+
| "报销上周的发票" | 设置时间范围为上周 → **展示发票汇总,询问确认** → 确认后走后续流程 |
|
|
111
|
+
| "报销发票号码 xxx" | 设置 `number="xxx"` 精确匹配 → **展示发票汇总,询问确认** → 确认后走后续流程 |
|
|
112
|
+
| 用户直接提供了发票数据 | **跳过 Step 1A** → **展示发票汇总,询问确认** → 确认后继续后续流程 |
|
|
113
|
+
| 用户提供了 fileId | 先调用 `invoice.reim.file-ocr.preview`(Step 0)→ **展示发票汇总,询问确认** → 确认后继续 |
|
|
114
|
+
|
|
115
|
+
#### 纯查询意图
|
|
116
|
+
|
|
117
|
+
> **纯查询操作**(查发票、查流程、查申请等)不走本工作流,直接用对应的查询 operation。
|
|
118
|
+
|
|
119
|
+
#### 查询结果上下文复用(重要)
|
|
120
|
+
|
|
121
|
+
如果上下文中已有查询过的数据,报销时**直接复用**:
|
|
122
|
+
|
|
123
|
+
- 已有事前申请 → 用 `createTime` 筛选发票
|
|
124
|
+
- 已有发票 → 用 `invoiceDate` 筛选事前申请
|
|
125
|
+
- 两者都有 → 直接跳过 Step 1A/1B,进入 Step 2 匹配
|
|
126
|
+
|
|
127
|
+
### 3. 用户操作场景全覆盖
|
|
128
|
+
|
|
129
|
+
#### 直接报销
|
|
130
|
+
|
|
131
|
+
| 用户输入 | 起始步骤 |
|
|
132
|
+
|----------|---------|
|
|
133
|
+
| "帮我报销" | 1A → **1C(发票确认)→ 用户确认** → 1B → 2 → 2.5 → 3 → 3.5 → 4 → 5 |
|
|
134
|
+
| "报销打车费" / "报销上周的" | 1A(加筛选条件)→ **1C → 用户确认** → 后续同上 |
|
|
135
|
+
| 提供 fileId | Step 0 → **1C → 用户确认** → 1B → 后续同上 |
|
|
136
|
+
| 直接给发票数据 | **1C → 用户确认** → 1B → 后续同上 |
|
|
137
|
+
|
|
138
|
+
#### 模糊意图引导
|
|
139
|
+
|
|
140
|
+
| 用户输入特征 | 处理方式 |
|
|
141
|
+
|-------------|---------|
|
|
142
|
+
| 含"报销"关键词 | 直接执行报销流程 |
|
|
143
|
+
| 含"出差"/"采购"/"买了"等间接关键词,不含"报销" | 直接问用户"需要我帮您创建报销单吗?" |
|
|
144
|
+
| 用户确认 | 进入全自动报销流程 |
|
|
145
|
+
| 用户否认 | 正常回应,不执行报销 |
|
|
146
|
+
|
|
147
|
+
> **⚠️ 禁止输出内部推理过程**。直接对用户说话,不要解释自己在做什么。
|
|
148
|
+
|
|
149
|
+
#### 报销后修正(`invoice.reim.flow.update`)
|
|
150
|
+
|
|
151
|
+
用户确认 `need_user_confirm`、补充 `unable_to_fill`、修改字段值、删除/追加明细行 → 均通过 `invoice.reim.flow.update.prepare/apply` 完成。
|
|
152
|
+
|
|
153
|
+
### 4. 自动化决策原则
|
|
154
|
+
|
|
155
|
+
- **用户已提供发票数据 → 跳过 Step 1A,直接用已有数据继续**
|
|
156
|
+
- 发票列表有数据 → **先展示发票汇总信息(Step 1C),告知用户查询范围,等用户确认后再往下走**
|
|
157
|
+
- 最近一周无结果 → **自动 fallback 到最近一个月再查一次,不需要问用户**
|
|
158
|
+
- 事前申请有数据 → 自动匹配,不需要用户确认"是否关联"
|
|
159
|
+
- 事前申请为空 → 跳过匹配,直接用发票数据填单,不需要问用户
|
|
160
|
+
- 匹配到唯一结果 → 直接使用,不需要用户确认
|
|
161
|
+
- **只有在必须用户做选择时才暂停**(如:多候选需要选一个、发票列表为空无法继续、**出差流程必须填写相关客户**)
|
|
162
|
+
- **⚠️ 严禁篡改任何原始数据值**
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## 整体工作流程
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
前置: CLI 认证(由 weaver-e10-shared 处理)
|
|
170
|
+
↓
|
|
171
|
+
Step 0 (可选): invoice.reim.file-ocr.preview → 识别发票
|
|
172
|
+
↓
|
|
173
|
+
Step 1A: invoice.list (可跳过) ←→ Step 1B: invoice.reim.requests.list
|
|
174
|
+
↓
|
|
175
|
+
Step 1C: 展示发票汇总 → 用户确认是否报销
|
|
176
|
+
↓ (用户确认)
|
|
177
|
+
Step 2: 发票 ↔ 事前申请匹配绑定 (reim-matching-rules.md)
|
|
178
|
+
↓
|
|
179
|
+
Step 2.5: invoice.reim.workflow.resolve → 获取工作流ID
|
|
180
|
+
↓
|
|
181
|
+
Step 2.6: 按工作流ID分组(多个工作流 → 多组,各组独立执行后续步骤)
|
|
182
|
+
↓ ↓ ↓ (每组)
|
|
183
|
+
┌──────────────────────────────────────────┐
|
|
184
|
+
│ ▼ 并行组 A(同时发起) │
|
|
185
|
+
│ Step 3: invoice.reim.form.structure │
|
|
186
|
+
│ Step 3.5: invoice.reim.row-info × N │
|
|
187
|
+
│ Step 3.6: invoice.reim.employee-superiors │
|
|
188
|
+
│ 交通类额外: invoice.get × M │
|
|
189
|
+
└──────────────────────────────────────────┘
|
|
190
|
+
↓ (全部返回后)
|
|
191
|
+
Step 4: 组装填单 JSON (reim-form-fill-rules.md)
|
|
192
|
+
↓
|
|
193
|
+
Step 4.5: 出差流程 → 提醒用户填写相关客户(未提供则不允许报销)
|
|
194
|
+
↓
|
|
195
|
+
Step 5: invoice.reim.flow.create.prepare → 用户确认 → .apply → 展示汇总
|
|
196
|
+
↓
|
|
197
|
+
Step 6 (可选): invoice.reim.flow.update.prepare/apply → 用户修正
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### ⚡ 并行调用策略(必须遵守)
|
|
201
|
+
|
|
202
|
+
| 并行组 | 可并行的操作 | 说明 |
|
|
203
|
+
|--------|------------|------|
|
|
204
|
+
| **Step 1 并行** | `invoice.reim.requests.list` 与 Step 1C 发票展示 | 用户确认期间预取事前申请 |
|
|
205
|
+
| **Step 3 并行** | `form.structure` + `row-info` × N + `employee-superiors` + `invoice.get` × M | 全部互相独立,**必须同时发起** |
|
|
206
|
+
| **多张发票** | 多张发票的 `row-info` | 各发票独立,强制并行 |
|
|
207
|
+
| **交通类行程** | 多张交通发票的 `invoice.get` | 各发票独立,强制并行 |
|
|
208
|
+
|
|
209
|
+
> **缓存策略**:`form.structure` 和 `employee-superiors` 在同一会话、同一 workFlowId 下只需调用一次,结果可跨多组报销单复用。
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Step 0(可选): fileId → 发票识别
|
|
214
|
+
|
|
215
|
+
当用户提供了 `fileId`(文件/附件ID)时,调用 `invoice.reim.file-ocr.preview` 一步完成识别。
|
|
216
|
+
|
|
217
|
+
| 识别结果 | 处理方式 |
|
|
218
|
+
|----------|----------|
|
|
219
|
+
| 全部成功 | **跳过 Step 1A**,用识别结果继续 |
|
|
220
|
+
| 部分成功 | 用成功的继续,提示失败项 |
|
|
221
|
+
| **全部失败** | **暂停询问用户**,确认后才继续 |
|
|
222
|
+
|
|
223
|
+
> CLI 详情见 [reim-api-reference.md](reim-api-reference.md#0-文件ID转发票识别)
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## Step 1A: 获取发票数据
|
|
228
|
+
|
|
229
|
+
> **如果用户已提供发票数据或已通过 Step 0 获取,则跳过此步骤。**
|
|
230
|
+
|
|
231
|
+
通过 `invoice.list` 查询。
|
|
232
|
+
|
|
233
|
+
### 默认查询策略(用户未指定日期时)
|
|
234
|
+
|
|
235
|
+
1. 按内联公式计算最近一周时间戳 → 调用
|
|
236
|
+
2. 有结果 → Step 1C 展示汇总,告知"查询的是最近一周"
|
|
237
|
+
3. 无有效发票 → 计算最近一个月时间戳 → 再次调用
|
|
238
|
+
4. 有结果 → Step 1C 展示汇总,告知"最近一周没找到,已扩大到一个月"
|
|
239
|
+
5. 仍无结果 → 告知用户未找到发票,建议指定日期范围
|
|
240
|
+
|
|
241
|
+
### 日期筛选参数
|
|
242
|
+
|
|
243
|
+
| 参数 | 用途 | 使用时机 |
|
|
244
|
+
|------|------|----------|
|
|
245
|
+
| `date_begin` / `date_end` | 开票日期范围 | 默认使用 |
|
|
246
|
+
| `create_tm_begin` / `create_tm_end` | 录入/创建日期范围 | 用户明确说"录入日期"/"创建日期"时 |
|
|
247
|
+
|
|
248
|
+
**⚠️ 数据过滤:** `info.comm_info.pro.status == 8` 的发票为**全额红冲发票**,**必须过滤掉,不允许报销**
|
|
249
|
+
|
|
250
|
+
关键返回字段映射见 [reim-api-reference.md](reim-api-reference.md#1-获取发票数据)。
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Step 1C: 展示发票汇总,等待用户确认
|
|
255
|
+
|
|
256
|
+
获取到发票数据后,**必须先展示发票汇总信息,询问用户确认后才继续后续流程**。
|
|
257
|
+
|
|
258
|
+
### 展示格式
|
|
259
|
+
|
|
260
|
+
展示时必须包含:**查询范围说明** + **发票汇总表格** + **确认提示**。
|
|
261
|
+
|
|
262
|
+
| 场景 | 开头说明 |
|
|
263
|
+
|------|----------|
|
|
264
|
+
| 默认查一周有结果 | "已为您查询最近一周({起始} ~ {结束})..." |
|
|
265
|
+
| 一周无结果、一个月有结果 | "最近一周未找到,已扩大到最近一个月({起始} ~ {结束})..." |
|
|
266
|
+
| 一个月也无结果 | "均未找到未报销发票。您可以指定日期范围或检查是否已录入。"(结束) |
|
|
267
|
+
| 用户指定日期范围 | "共找到 N 张({用户指定的范围描述})..." |
|
|
268
|
+
|
|
269
|
+
表格列:`# | 发票类型 | 开票日期 | 发票号码 | 金额 | 销方名称 | 费用类型`
|
|
270
|
+
|
|
271
|
+
尾部:「请确认是否使用以上发票进行报销?如需查询其他日期范围,请告诉我。」
|
|
272
|
+
|
|
273
|
+
### 用户响应处理
|
|
274
|
+
|
|
275
|
+
| 用户响应 | 处理方式 |
|
|
276
|
+
|----------|----------|
|
|
277
|
+
| 确认 | 继续 Step 1B → Step 2 → 后续流程 |
|
|
278
|
+
| 选择部分发票("只报第1、3张") | 按用户指定筛选发票,继续后续流程 |
|
|
279
|
+
| 否认 | 结束报销流程 |
|
|
280
|
+
| 补充条件 | 调整查询条件重新查询,再次展示确认 |
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
## Step 1B: 获取事前申请流程
|
|
285
|
+
|
|
286
|
+
通过 `invoice.reim.requests.list` 获取。
|
|
287
|
+
|
|
288
|
+
默认入参:`{"pageNo": 1, "pageSize": 20}`
|
|
289
|
+
|
|
290
|
+
### Step 1 执行顺序与预筛选策略
|
|
291
|
+
|
|
292
|
+
> **核心时间关系:事前申请日期一定在开票日期之前。**
|
|
293
|
+
|
|
294
|
+
| 场景 | 筛选方式 |
|
|
295
|
+
|------|----------|
|
|
296
|
+
| 先有发票 → 筛选事前申请 | `cusCreateDateEnd` = 最晚 invoiceDate,`cusCreateDateStart` = 最早 invoiceDate - 90天 |
|
|
297
|
+
| 先有事前申请 → 筛选发票 | `date_begin` = 最早 createTime 秒时间戳 |
|
|
298
|
+
| 并行获取 | 不做预筛选,Step 2 匹配时统一过滤 |
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
## Step 2: 发票与事前申请匹配绑定
|
|
303
|
+
|
|
304
|
+
> **详细匹配规则见 [reim-matching-rules.md](reim-matching-rules.md)**
|
|
305
|
+
|
|
306
|
+
匹配完成后产出绑定关系数据结构:
|
|
307
|
+
|
|
308
|
+
```json
|
|
309
|
+
[
|
|
310
|
+
{
|
|
311
|
+
"invoiceId": "INV001",
|
|
312
|
+
"preApprovalId": "1298294241967177729",
|
|
313
|
+
"preApprovalWorkflowId": "1181057526276915214",
|
|
314
|
+
"matchConfidence": "high",
|
|
315
|
+
"matchReasons": ["时间范围匹配", "费用类型一致"]
|
|
316
|
+
}
|
|
317
|
+
]
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
---
|
|
321
|
+
|
|
322
|
+
## Step 2.5: 获取报销单工作流ID
|
|
323
|
+
|
|
324
|
+
通过 `invoice.reim.workflow.resolve` 获取。
|
|
325
|
+
|
|
326
|
+
**⚠️ 核心逻辑:当存在多个工作流时,需要将发票/事前申请按工作流分组,每组各创建一个报销单。**
|
|
327
|
+
|
|
328
|
+
| 场景 | 处理方式 |
|
|
329
|
+
|------|----------|
|
|
330
|
+
| 有事前申请 → 同一 workFlowId | 创建 1 个报销单 |
|
|
331
|
+
| 有事前申请 → 不同 workFlowId | 按 workFlowId 分组,每组各创建一个报销单 |
|
|
332
|
+
| 无事前申请 → 候选工作流只有 1 个 | 创建 1 个报销单 |
|
|
333
|
+
| 无事前申请 → 候选工作流有多个 | 发票按匹配规则分组,每组各创建一个报销单 |
|
|
334
|
+
|
|
335
|
+
### 发票 → 工作流匹配规则(按优先级)
|
|
336
|
+
|
|
337
|
+
1. **事前申请绑定**:发票已匹配到事前申请 → 使用该事前申请对应的 workFlowId
|
|
338
|
+
2. **发票费用类型匹配**:用 `expenseType` 与候选 `workFlowName` 做关键词匹配
|
|
339
|
+
3. **通用兜底**:归入 workFlowName 含"日常"/"通用"/"报销"的;仍无法区分归入第一个
|
|
340
|
+
|
|
341
|
+
每组独立执行 Step 3 → 3.5 → 3.6 → 4 → 5,不能省略任何字段。
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
|
|
345
|
+
## Step 3: 获取报销单表单字段结构
|
|
346
|
+
|
|
347
|
+
通过 `invoice.reim.form.structure` 获取。
|
|
348
|
+
|
|
349
|
+
> **可缓存**:同一 workFlowId 下只需调用一次。
|
|
350
|
+
|
|
351
|
+
返回 `mainFields`(主表)和 `subTables`(明细表),每个字段含 `fieldId`、`fieldName`、`fieldType`、`single`、`marked`、`options`。
|
|
352
|
+
|
|
353
|
+
> 完整返回示例见 [reim-api-reference.md](reim-api-reference.md#3-获取报销单表单字段结构)
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
## Step 3.5: 获取发票预填信息(`invoice.reim.row-info`)
|
|
358
|
+
|
|
359
|
+
通过 `invoice.reim.row-info` 获取。
|
|
360
|
+
|
|
361
|
+
> **⚠️ 多张发票的 row-info 调用必须并行发起。**
|
|
362
|
+
|
|
363
|
+
- 入参:`cdzt`=当前用户ID,`requestid`=事前申请ID(无则留空),`invoiceId`=发票ID
|
|
364
|
+
- 返回的 `date`、`fysm`、`itinerary`、`subjectId` **在 Step 4 中优先使用**
|
|
365
|
+
- 某字段返回空/null → 回退到 AI 推断逻辑
|
|
366
|
+
|
|
367
|
+
### 交通类发票额外处理
|
|
368
|
+
|
|
369
|
+
交通类发票(`expenseType` 含交通/出行/打车,或 `consumeContent` 含客运服务费/运输服务,或 `sellerName` 含滴滴/享道等)→ **额外并行调用 `invoice.get`** 获取出发地和目的地。
|
|
370
|
+
|
|
371
|
+
> 详细精简规则见 [reim-form-fill-rules.md](reim-form-fill-rules.md#地名精简规则)
|
|
372
|
+
|
|
373
|
+
---
|
|
374
|
+
|
|
375
|
+
## Step 3.6: 获取当前人员及上级信息
|
|
376
|
+
|
|
377
|
+
通过 `invoice.reim.employee-superiors` 获取。
|
|
378
|
+
|
|
379
|
+
> **可缓存**:同一会话只需调用一次。
|
|
380
|
+
|
|
381
|
+
- `allSuperiors[0].id` → "报销人上级" + "承担人直接上级"(⚠️ 必填)
|
|
382
|
+
- `allSuperiors` 全部 `id` 逗号拼接 → "承担人所有上级"(⚠️ 必填)
|
|
383
|
+
|
|
384
|
+
---
|
|
385
|
+
|
|
386
|
+
## Step 4: 组装填单结构化 JSON
|
|
387
|
+
|
|
388
|
+
> **详细填单规则见 [reim-form-fill-rules.md](reim-form-fill-rules.md)**
|
|
389
|
+
> **费用科目匹配规则见 [reim-expense-subject-rules.md](reim-expense-subject-rules.md)**
|
|
390
|
+
>
|
|
391
|
+
> **⚠️ 费用类型(科目)字段必须有值。匹配不到时直接填兜底值 `"100502270000000104"`。**
|
|
392
|
+
> **⚠️ 出差流程相关客户规则见 Step 4.5。**
|
|
393
|
+
|
|
394
|
+
核心结构概览:
|
|
395
|
+
|
|
396
|
+
```json
|
|
397
|
+
{
|
|
398
|
+
"work_flow_id": "报销流程工作流ID(Step 2.5)",
|
|
399
|
+
"mainFormId": "主表formId(Step 3)",
|
|
400
|
+
"request_name": "流程标题",
|
|
401
|
+
"main_fields": [{"fieldId": "...", "value": "...", "fieldName": "..."}],
|
|
402
|
+
"detail_rows": [{"dataIndex": 1, "subFormId": "...", "invoiceId": "...", "fields": [...]}],
|
|
403
|
+
"need_user_confirm": [],
|
|
404
|
+
"unable_to_fill": []
|
|
405
|
+
}
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
**关键约束:**
|
|
409
|
+
- **发票 vs 相关凭证分类**:`invoiceTypeCode` 为 17/18/57/58 的是相关凭证,不能独立成行,必须与对应发票配对放在同一行明细中
|
|
410
|
+
- 每行 `fields` 中有两个 `EinvoiceComponent` 字段:`single=false` 填**发票** `invoiceId`,`single=true` 填**配对凭证** `invoiceId`
|
|
411
|
+
- `dataIndex` 从 1 递增,`subFormId` 只用 `subTables[0]` 的
|
|
412
|
+
|
|
413
|
+
---
|
|
414
|
+
|
|
415
|
+
## Step 4.5: 出差流程必须确认相关客户
|
|
416
|
+
|
|
417
|
+
> **出差报销未拿到用户提供的具体相关客户前,禁止进入 Step 5。**
|
|
418
|
+
> 完整规则见 [reim-form-fill-rules.md - 出差流程相关客户](reim-form-fill-rules.md#出差流程相关客户硬拦截)。
|
|
419
|
+
|
|
420
|
+
简要规则:
|
|
421
|
+
- `workFlowName` 或 `requestname` 含「差旅」「出差」→ 暂停,提醒用户提供具体客户名称
|
|
422
|
+
- 用户给出客户名称 → `invoice.reim.field.search` 搜索 ID → 填入主表和明细
|
|
423
|
+
- 用户拒绝 / 不提供 → **结束报销,禁止调用 `invoice.reim.flow.create.prepare`**
|
|
424
|
+
- 非出差流程:相关客户固定填 `"100504500000311504"`
|
|
425
|
+
|
|
426
|
+
---
|
|
427
|
+
|
|
428
|
+
## Step 5: 生成报销单流程
|
|
429
|
+
|
|
430
|
+
通过 `invoice.reim.flow.create.prepare` → 用户确认 → `invoice.reim.flow.create.apply` 完成。
|
|
431
|
+
|
|
432
|
+
> **⚠️ 禁止重复调用:同一组发票数据只能调用一次。调用成功后,修改已创建的报销单使用 Step 6 的 update。**
|
|
433
|
+
> **⚠️ 出差流程拦截:相关客户未由用户提供具体信息前,禁止调用。**
|
|
434
|
+
|
|
435
|
+
### 创建成功后
|
|
436
|
+
|
|
437
|
+
CLI 返回 `requestId` 和 `viewUrl`,**用结构化汇总信息展示给用户**(链接用 CLI 返回的 `viewUrl`,不要自己拼接):
|
|
438
|
+
|
|
439
|
+
```markdown
|
|
440
|
+
✅ 报销单创建成功!
|
|
441
|
+
|
|
442
|
+
---
|
|
443
|
+
|
|
444
|
+
**报销标题**:交通费报销-后端开发111-2026-08-04(共2笔)
|
|
445
|
+
**报销事由**:2026-07-30 市内交通 - 滴滴出行
|
|
446
|
+
**汇总金额**:¥185.80
|
|
447
|
+
**查看链接**:[点击查看报销单](viewUrl)
|
|
448
|
+
|
|
449
|
+
| # | 发票号码 | 发票金额 | 费用类型 | 发生地点 | 关联凭证 |
|
|
450
|
+
|---|----------|----------|----------|----------|----------|
|
|
451
|
+
| 1 | 36901189 | ¥108.20 | 市内交通 | 仁济医院南院→浦江瑞和城 | ✅ 已关联 |
|
|
452
|
+
| 2 | 36901200 | ¥77.60 | 市内交通 | 虹桥机场T2→人民广场 | ❌ 无凭证 |
|
|
453
|
+
|
|
454
|
+
---
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
---
|
|
458
|
+
|
|
459
|
+
## Step 6(可选): 更新报销单流程
|
|
460
|
+
|
|
461
|
+
通过 `invoice.reim.flow.update.prepare/apply` 完成。
|
|
462
|
+
|
|
463
|
+
- 支持 `deleteDetailRows` + `main_fields` + `detail_rows` 三种操作组合
|
|
464
|
+
- 删除先于更新执行,删除失败不阻断更新
|
|
465
|
+
|
|
466
|
+
---
|
|
467
|
+
|
|
468
|
+
## 异常处理
|
|
469
|
+
|
|
470
|
+
**需暂停询问用户的情况:**
|
|
471
|
+
- 发票列表为空 → 提示"未找到未报销的发票",结束
|
|
472
|
+
- 出差/差旅流程缺少相关客户 → 见 Step 4.5
|
|
473
|
+
- 模糊搜索返回多结果 → 放入 `need_user_confirm` 让用户选择
|
|
474
|
+
|
|
475
|
+
**严禁重复调用:**
|
|
476
|
+
- **`create.apply` 已调用成功 → 严禁再次调用,后续修改一律使用 `update`**
|
|
477
|
+
|
|
478
|
+
**自动继续(不问用户):**
|
|
479
|
+
- 事前申请为空 / 匹配失败 → 跳过事前关联,直接用发票填单
|
|
480
|
+
- 匹配结果唯一 / 模糊搜索唯一结果 → 直接使用
|
|
481
|
+
|
|
482
|
+
**用户中途取消:**
|
|
483
|
+
- 用户说"取消"/"不报了"/"算了" → 立即停止
|
|
484
|
+
- 已调用 create 成功 → 告知用户可通过链接手动删除
|
|
485
|
+
|
|
486
|
+
---
|
|
487
|
+
|
|
488
|
+
## 参考文档
|
|
489
|
+
|
|
490
|
+
- [reim-api-reference.md](reim-api-reference.md) - 所有 CLI operation 入参与返回值
|
|
491
|
+
- [reim-matching-rules.md](reim-matching-rules.md) - 发票与事前申请匹配逻辑
|
|
492
|
+
- [reim-form-fill-rules.md](reim-form-fill-rules.md) - 表单字段填充策略与填单 JSON 组装规则
|
|
493
|
+
- [reim-expense-subject-rules.md](reim-expense-subject-rules.md) - 费用科目自动匹配规则(JSON 查找表)
|
|
494
|
+
- [reim-examples.md](reim-examples.md) - 完整端到端示例
|