weaver-work-cli 0.1.50 → 0.1.53
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 +1 -1
- package/dist/chunks/{attachment-content-EJYIOJPH.js → attachment-content-W3TSJC3Y.js} +3 -3
- package/dist/chunks/{chunk-BFKLQLBK.js → chunk-2J3XY4ED.js} +7 -7
- package/dist/chunks/{chunk-K67FODVC.js → chunk-6GCXWKG6.js} +1 -1
- package/dist/chunks/{chunk-WNJUGI2F.js → chunk-76PRVYH4.js} +1 -1
- package/dist/chunks/{chunk-RYFRGTUV.js → chunk-DEHJ7PMA.js} +4 -4
- package/dist/chunks/{chunk-3NCFFHB2.js → chunk-IF33CG4V.js} +1 -1
- package/dist/chunks/{chunk-YB3AJYPY.js → chunk-PE334WL3.js} +4 -4
- package/dist/chunks/{chunk-MCZG6HPM.js → chunk-QQXMHM3J.js} +2 -2
- package/dist/chunks/{chunk-7ECB22G3.js → chunk-U7ROML5E.js} +23 -23
- package/dist/chunks/{chunk-7AYQJSFY.js → chunk-WTLQGS6D.js} +2 -2
- package/dist/chunks/{chunk-6T53BSWZ.js → chunk-XPQN4E5O.js} +50 -19
- package/dist/chunks/{chunk-HARQF5IP.js → chunk-Z4G7LLDD.js} +25 -25
- package/dist/chunks/{conflict-C4UDHCWV.js → conflict-57WDJWL7.js} +2 -2
- package/dist/chunks/{contract-VUC6JOPG.js → contract-LJRAXVZU.js} +8587 -1421
- package/dist/chunks/{create-flow-6OG2LYBD.js → create-flow-3FMMZBCA.js} +6 -6
- package/dist/chunks/{data-QO7QWOIV.js → data-WK5CQXNF.js} +17 -32
- package/dist/chunks/{env-WP57TF2S.js → env-JYZE3BZB.js} +2 -2
- package/dist/chunks/{factory-VUXI7N5C.js → factory-66SCIKW3.js} +1 -1
- package/dist/chunks/{group-chat-UQRGXILK.js → group-chat-MNRYMLNG.js} +3 -3
- package/dist/chunks/{invoice-E7GOITEU.js → invoice-V7ZTITUO.js} +725 -205
- package/dist/chunks/{meeting-4BBLVAWM.js → meeting-IIY4UAJL.js} +10 -10
- package/dist/chunks/{recruit-stage-FKWS5UQF.js → recruit-stage-XCMVEQA2.js} +718 -131
- package/dist/chunks/{registry-V4CHRQDI.js → registry-CJOVECZD.js} +1 -1
- package/dist/chunks/{registry-5CRCN2TV.js → registry-METZ2LWE.js} +10 -10
- package/dist/chunks/{room-recommend-AYR3UG7R.js → room-recommend-YFY7HTOF.js} +4 -4
- package/dist/chunks/{schedule-JZEFIXUS.js → schedule-6I63TERA.js} +4 -4
- package/dist/chunks/smart-extract-FOUYNIG3.js +2882 -0
- package/dist/chunks/{workflow-3ZAF2J5E.js → workflow-YHXFIU63.js} +1 -1
- package/dist/index.js +11 -6
- package/dist/shortcuts/contract/manifest.js +251 -0
- package/dist/shortcuts/contract/ooxml/docx-table.js +233 -0
- package/dist/shortcuts/contract/operations/card-action.js +1165 -0
- package/dist/shortcuts/contract/operations/card-ebdf-list.js +571 -0
- package/dist/shortcuts/contract/operations/card-plan.js +327 -0
- package/dist/shortcuts/contract/operations/card-risk-report.js +565 -0
- package/dist/shortcuts/contract/operations/card.js +6 -5
- package/dist/shortcuts/contract/operations/docx-fillfromquote.js +532 -0
- package/dist/shortcuts/contract/operations/docx-verify.js +258 -0
- package/dist/shortcuts/contract/operations/elements-build.js +761 -0
- package/dist/shortcuts/contract/operations/elements-spec.js +216 -0
- package/dist/shortcuts/contract/operations/first-screen.js +588 -0
- package/dist/shortcuts/contract/operations/flow.js +81 -25
- package/dist/shortcuts/contract/operations/ledger.js +438 -0
- package/dist/shortcuts/contract/operations/modeltext.js +132 -0
- package/dist/shortcuts/contract/operations/op-resolver.js +22 -0
- package/dist/shortcuts/contract/operations/performance.js +104 -3
- package/dist/shortcuts/contract/operations/quote.js +131 -25
- package/dist/shortcuts/contract/operations/quotescreen.js +529 -0
- package/dist/shortcuts/contract/operations/registry.js +30 -0
- package/dist/shortcuts/contract/operations/review.js +73 -58
- package/dist/shortcuts/contract/operations/summary-validate.js +293 -0
- package/dist/shortcuts/contract/operations/summary.js +4 -2
- package/dist/shortcuts/contract/operations/triage.js +1100 -0
- package/dist/shortcuts/contract/operations/upload.js +48 -7
- package/dist/shortcuts/contract/prewarm-cache.js +90 -0
- package/dist/shortcuts/contract/prewarm.js +88 -0
- package/dist/shortcuts/contract/upload-cache.js +49 -4
- package/dist/shortcuts/data/index.js +1 -6
- package/dist/shortcuts/data/manifest.js +2 -2
- package/dist/shortcuts/data/operations/index.js +1 -1
- package/dist/shortcuts/data/operations/query.js +23 -46
- package/dist/shortcuts/index.js +5 -0
- package/dist/shortcuts/invoice/index.js +0 -12
- package/dist/shortcuts/invoice/manifest.js +200 -49
- package/dist/shortcuts/invoice/operations/registry.js +4 -2
- package/dist/shortcuts/invoice/operations/reim-relation.js +438 -0
- package/dist/shortcuts/invoice/operations/shared.js +3 -19
- package/dist/shortcuts/invoice/operations/upload-and-validate.js +109 -73
- package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +4 -2
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +6 -2
- package/dist/shortcuts/recruit-stage/operations/list.js +217 -1
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +144 -158
- package/dist/shortcuts/recruit-stage/operations/search.js +348 -0
- package/dist/shortcuts/recruit-stage/shared.js +5 -0
- package/dist/shortcuts/recruit-stage/tag-lookup.js +136 -0
- package/dist/shortcuts/smart-extract/constants.js +79 -0
- package/dist/shortcuts/smart-extract/continuation.js +71 -0
- package/dist/shortcuts/smart-extract/errors.js +68 -0
- package/dist/shortcuts/smart-extract/host.js +191 -0
- package/dist/shortcuts/smart-extract/index.js +105 -0
- package/dist/shortcuts/smart-extract/ledger.js +70 -0
- package/dist/shortcuts/smart-extract/manifest.js +35 -0
- package/dist/shortcuts/smart-extract/operations/attachment.js +212 -0
- package/dist/shortcuts/smart-extract/operations/batch.js +67 -0
- package/dist/shortcuts/smart-extract/operations/config.js +118 -0
- package/dist/shortcuts/smart-extract/operations/fill.js +492 -0
- package/dist/shortcuts/smart-extract/operations/preview.js +174 -0
- package/dist/shortcuts/smart-extract/operations/registry.js +34 -0
- package/dist/shortcuts/smart-extract/operations/save.js +355 -0
- package/dist/shortcuts/smart-extract/operations/shared.js +191 -0
- package/dist/shortcuts/smart-extract/operations/structure.js +401 -0
- package/dist/shortcuts/smart-extract/operations/target.js +167 -0
- package/dist/shortcuts/smart-extract/operations/types.js +22 -0
- package/dist/shortcuts/smart-extract/operations/validate.js +454 -0
- package/dist/shortcuts/workflow/operations/form.js +68 -33
- package/dist/shortcuts/workflow/operations/read.js +19 -1
- package/docs/SKILL.md +1 -1
- package/docs/_catalog.md +3 -0
- package/docs/agent-invoice.md +5 -7
- package/docs/data.md +5 -1
- package/docs/fna.md +14 -1
- package/docs/invoice.md +7 -5
- package/docs/smart-extract.md +156 -0
- package/package.json +1 -1
- package/skill-template/business-info.json +16 -1
- package/skill-template/domains/qiyecheng.md +2 -0
- package/skill-template/domains/smart-extract.md +16 -0
- package/skill-template/domains/yepiaotong.md +2 -2
- package/skills/weaver-e10-data/references/scene-and-misc.md +4 -3
- package/skills/weaver-e10-jinchengda/SKILL.md +223 -35
- package/skills/weaver-e10-jinchengda/references/contract-action-card.md +47 -481
- package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +11 -11
- package/skills/weaver-e10-jinchengda/references/contract-agent-entry.md +3 -3
- package/skills/weaver-e10-jinchengda/references/contract-ai-assistant.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +32 -16
- package/skills/weaver-e10-jinchengda/references/contract-card-render-internals.md +478 -0
- package/skills/weaver-e10-jinchengda/references/contract-command-index.md +4 -4
- package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +2 -2
- package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +39 -61
- package/skills/weaver-e10-jinchengda/references/contract-element-save-record.md +18 -13
- package/skills/weaver-e10-jinchengda/references/contract-execution-rules.md +2 -2
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +21 -6
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +6 -4
- package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +3 -3
- package/skills/weaver-e10-jinchengda/references/contract-ledger-catalog.md +263 -0
- package/skills/weaver-e10-jinchengda/references/contract-ledger-query-playbook.md +525 -0
- package/skills/weaver-e10-jinchengda/references/contract-ledger-rules.md +36 -0
- package/skills/weaver-e10-jinchengda/references/contract-modeltext-library.md +128 -0
- package/skills/weaver-e10-jinchengda/references/contract-multi-file.md +87 -0
- package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +80 -54
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +110 -14
- package/skills/weaver-e10-jinchengda/references/contract-template-selector.md +19 -21
- package/skills/weaver-e10-jinchengda/references/orchestration.md +12 -12
- package/skills/weaver-e10-jinchengda/references/source-manifest.json +1 -6
- package/skills/weaver-e10-jinchengda/scripts/fill_plan.py +2 -1
- package/skills/weaver-e10-qiyecheng/SKILL.md +37 -0
- package/skills/weaver-e10-qiyecheng/references/ai-check-audit.md +14 -0
- package/skills/weaver-e10-qiyecheng/references/budget.md +14 -0
- package/skills/weaver-e10-qiyecheng/references/catalog.md +25 -0
- package/skills/weaver-e10-qiyecheng/references/expense-center.md +8 -0
- package/skills/weaver-e10-qiyecheng/references/expense-chart.md +9 -0
- package/skills/weaver-e10-qiyecheng/references/invoice-writeoff.md +13 -0
- package/skills/weaver-e10-qiyecheng/references/loan-management.md +14 -0
- package/skills/weaver-e10-qiyecheng/references/self-hosted-mode.md +239 -0
- package/skills/weaver-e10-qiyecheng/references/source-manifest.json +34 -27
- package/skills/weaver-e10-recruit-stage/SKILL.md +62 -4
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +42 -8
- package/skills/weaver-e10-recruit-stage/references/env-ziyong.md +79 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +11 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +3 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-interview-not-attended.md +153 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +7 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-my-positions.md +66 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +156 -42
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import-batch.md +122 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +36 -8
- package/skills/weaver-e10-recruit-stage/references/recruit-search-by-tag.md +157 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +35 -0
- package/skills/weaver-e10-smart-extract/SKILL.md +180 -0
- package/skills/weaver-e10-smart-extract/references/api-contract.md +71 -0
- package/skills/weaver-e10-smart-extract/references/result-format.md +102 -0
- package/skills/weaver-e10-smart-extract/references/troubleshooting.md +106 -0
- package/skills/weaver-e10-workflow/references/workflow-create.md +6 -5
- package/skills/weaver-e10-workflow/references/workflow-edit.md +1 -1
- package/skills/weaver-e10-workflow/references/workflow-query.md +1 -1
- package/skills/weaver-e10-workflow/references/workflow-view.md +1 -1
- package/skills/weaver-e10-yepiaotong/SKILL.md +46 -33
- package/skills/weaver-e10-yepiaotong/references/invoice-add.md +2 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-file-upload.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-import.md +19 -2
- package/skills/weaver-e10-yepiaotong/references/invoice-ocr-preview.md +8 -2
- package/skills/weaver-e10-yepiaotong/references/invoice-reim-relation.md +407 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +12 -8
- package/skills/weaver-e10-yepiaotong/references/invoice-upload-and-validate.md +97 -39
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +91 -2
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +12 -12
- package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +8 -4
- package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +136 -91
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +109 -23
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +110 -43
- package/dist/shortcuts/invoice/operations/validate-preview.js +0 -40
- package/skills/weaver-e10-jinchengda/scripts/plan_actions.py +0 -279
- package/skills/weaver-e10-jinchengda/scripts/render_action_card.py +0 -450
- package/skills/weaver-e10-jinchengda/scripts/render_ebdf_list_card.py +0 -265
- package/skills/weaver-e10-jinchengda/scripts/render_risk_report.py +0 -358
- package/skills/weaver-e10-jinchengda/scripts/validate_action_card.py +0 -588
- package/skills/weaver-e10-jinchengda/scripts/verify_docx_placeholders.py +0 -118
- package/skills/weaver-e10-yepiaotong/references/invoice-validation-preview.md +0 -40
|
@@ -117,9 +117,10 @@ CLI 已默认 `sreim="3"`、`bill_type=0`、`page_size=10`。报销查票时默
|
|
|
117
117
|
| "报销我的出差" / "按出差流程报销" / "报销 10 月 26 号武汉出差" | 先找**出差流程**,按它的起始日期前 1 天 ~ 结束日期后 1 天查票,这段时间可报的发票**全部列入**(见 Step 1A「按出差流程查票」)→ **展示发票汇总,询问确认** → 确认后走后续流程 |
|
|
118
118
|
| "报销上周去北京的费用" / "报销去重庆的发票" | 同上先找出差流程;**找不到出差流程**才按**出差时间 + 城市**查票:目的城市的票,加上出差期间**出发城市(没说默认上海)**的打车票(见 Step 1A「出差 / 城市意图查票」)→ **展示发票汇总,询问确认** → 确认后走后续流程 |
|
|
119
119
|
| "报销发票号码 xxx" | 设置 `number="xxx"` 精确匹配 → **展示发票汇总,询问确认** → 确认后走后续流程 |
|
|
120
|
-
| "帮我报销上月的话费补贴" / "帮我发起本月我的话费补贴报销" / "报一下油费补贴" | 按 [reim-phone-subsidy-rules.md](reim-phone-subsidy-rules.md):不按月份筛票,查票夹**全部历史**话费 / 油费发票 →
|
|
120
|
+
| "帮我报销上月的话费补贴" / "帮我发起本月我的话费补贴报销" / "报一下油费补贴" | 按 [reim-phone-subsidy-rules.md](reim-phone-subsidy-rules.md):不按月份筛票,查票夹**全部历史**话费 / 油费发票 → 事前申请先用上传时登记的,没有再自动找固定流程,都没有给发起链接(提交即可,不等审批)→ **不拦金额、不等确认**,用 `invoice.reim.subsidy.submit` 直接提交(报销金额超过月补贴额度时按额度报),只展示流程链接(见 Step 4.6) |
|
|
121
121
|
| 用户直接提供了发票数据 | **跳过 Step 1A** → **展示发票汇总,询问确认** → 确认后继续后续流程 |
|
|
122
122
|
| 用户提供了 fileId | 先调用 `invoice.reim.file-ocr.preview`(Step 0)→ **展示发票汇总,询问确认** → 确认后继续 |
|
|
123
|
+
| 用户上传了发票文件说要报销(「上传这几张发票帮我报销」) | 每个文件调一次 `invoice.upload-and-validate`(Step 0)→ **展示发票汇总,询问确认**(查验没通过的列出原因、不进报销单)→ 确认后继续 |
|
|
123
124
|
|
|
124
125
|
#### 纯查询意图
|
|
125
126
|
|
|
@@ -139,11 +140,12 @@ CLI 已默认 `sreim="3"`、`bill_type=0`、`page_size=10`。报销查票时默
|
|
|
139
140
|
|
|
140
141
|
| 用户输入 | 起始步骤 |
|
|
141
142
|
|----------|---------|
|
|
142
|
-
| "帮我报销" | 1A → **1C(发票确认)→ 用户确认** → 1B → 2 → 2.5 → 3 → 4 → 5 |
|
|
143
|
+
| "帮我报销" | 1A → **1C(发票确认)→ 用户确认** → 1B + 1D → 2 → 2.5 → 3 → 4 → 5 |
|
|
143
144
|
| "报销打车费" / "报销上周的" | 1A(加筛选条件)→ **1C → 用户确认** → 后续同上 |
|
|
144
|
-
| "报销我的出差" / "报销去北京出差的费用" | 1A「按出差流程查票」→ **1C → 用户确认** → 跳过 1B、2(全部绑这条出差流程)→ 2.5 → 3 → 4 → 5 |
|
|
145
|
-
| "报销话费补贴" / "报销油费补贴" | Step 4.6(全量历史发票 +
|
|
145
|
+
| "报销我的出差" / "报销去北京出差的费用" | 1A「按出差流程查票」→ **1C → 用户确认** → 1D(只取客户 / 项目)→ 跳过 1B、2(全部绑这条出差流程)→ 2.5 → 3 → 4 → 5 |
|
|
146
|
+
| "报销话费补贴" / "报销油费补贴" | Step 4.6(全量历史发票 + 事前申请:先用上传时登记的,没有再查固定流程,都没有给发起链接)→ `invoice.reim.subsidy.submit` 直接提交;跳过 1C 确认、1B、1D、2、2.5、3、4、5 |
|
|
146
147
|
| 提供 fileId | Step 0 → **1C → 用户确认** → 1B → 后续同上 |
|
|
148
|
+
| 上传发票文件要报销 | Step 0(`invoice.upload-and-validate`)→ **1C → 用户确认** → 1B → 后续同上 |
|
|
147
149
|
| 直接给发票数据 | **1C → 用户确认** → 1B → 后续同上 |
|
|
148
150
|
|
|
149
151
|
#### 模糊意图引导
|
|
@@ -165,6 +167,8 @@ CLI 已默认 `sreim="3"`、`bill_type=0`、`page_size=10`。报销查票时默
|
|
|
165
167
|
|
|
166
168
|
- **用户已提供发票数据 → 跳过 Step 1A,直接用已有数据继续**
|
|
167
169
|
- 发票列表有数据 → **先展示发票汇总信息(Step 1C),告知用户查询范围,等用户确认后再往下走**
|
|
170
|
+
- 发票上传时登记过相关客户 / 相关项目 / 事前申请 → **直接用登记的值,不再问客户、项目,也不再选事前申请**(Step 1D);只登记了项目时,相关客户由项目带出,不问
|
|
171
|
+
- 差旅 / 外出没登记项目 → **沿用最近一张历史报销单的相关项目和相关客户**(Step 4.4「差旅 / 外出」),历史里也没有才问用户
|
|
168
172
|
- 最近一周无结果 → **自动 fallback 到最近一个月再查一次,不需要问用户**
|
|
169
173
|
- 事前申请有数据 → 只按开票日期和事前申请发起日期关联(只比日期,同一天算对上)。一张发票时间上只落在一条里 → 直接绑定,不问「是否关联」
|
|
170
174
|
- 一张发票时间上落在多条事前申请里、发票没有开票日期、或用户点名的事前申请对上多条 → 确认不了是哪条,必须问用户,一次列出候选让用户选定;选定前不往下走(不 `workflow.resolve`、不建单),回答含糊就再问,不替用户选。见 Step 2
|
|
@@ -179,13 +183,15 @@ CLI 已默认 `sreim="3"`、`bill_type=0`、`page_size=10`。报销查票时默
|
|
|
179
183
|
```
|
|
180
184
|
前置: CLI 认证(由 weaver-e10-shared 处理)
|
|
181
185
|
↓
|
|
182
|
-
Step 0 (可选): invoice.reim.file-ocr.preview
|
|
186
|
+
Step 0 (可选): 上传的文件 → invoice.upload-and-validate(上传 + 识别 + 查验)/ E10 fileId → invoice.reim.file-ocr.preview
|
|
183
187
|
↓
|
|
184
188
|
Step 1A: invoice.list / invoice.reim.candidates.list (可跳过) ←→ Step 1B: invoice.reim.requests.list
|
|
185
189
|
↓
|
|
186
190
|
Step 1C: 展示发票汇总 → 用户确认是否报销
|
|
187
191
|
↓ (用户确认)
|
|
188
|
-
Step
|
|
192
|
+
Step 1D: invoice.reim.relation.list → 读上传时登记的相关客户 / 相关项目 / 事前申请(与 1B 并行)
|
|
193
|
+
↓
|
|
194
|
+
Step 2: 发票 ↔ 事前申请匹配绑定 (reim-matching-rules.md;登记了事前申请的发票直接绑登记的那条)
|
|
189
195
|
↓
|
|
190
196
|
Step 2.5: invoice.reim.workflow.resolve → 获取报销工作流 ID 与名称
|
|
191
197
|
↓
|
|
@@ -201,9 +207,9 @@ Step 2.9: Read ../weaver-e10-workflow/references/workflow-create.md 全文(本
|
|
|
201
207
|
↓ (全部返回后)
|
|
202
208
|
Step 4: 组装 createRequest 的 data (reim-form-fill-rules.md)
|
|
203
209
|
↓
|
|
204
|
-
Step 4.4:
|
|
210
|
+
Step 4.4: 历史报销单参考 → 差旅 / 外出没登记项目时直接沿用最近一张历史单的项目和客户;总部费用报销历史客户 / 项目与默认不同时,和用户要填的客户、项目放在同一次提问里;合同号按确认后的项目从历史带出,不问
|
|
205
211
|
Step 4.5: 相关客户、相关项目必须在建单前一次问齐(空着禁止 createRequest;出差客户不能用泛微上海顶;不问合同号)
|
|
206
|
-
Step 4.6: 话费 / 油费 → 全量历史发票 +
|
|
212
|
+
Step 4.6: 话费 / 油费 → 全量历史发票 + 事前申请(先用登记的,没有再查固定流程,都没有给发起链接;提交即可,不等审批)→ invoice.reim.subsidy.submit 直接提交(不走 Step 2.5~5,不拦金额,超过月补贴额度按额度报)
|
|
207
213
|
Step 4.7: 差旅 / 外出 → 每一行明细「相关流程」必须填事前申请,空着禁止 createRequest
|
|
208
214
|
↓
|
|
209
215
|
Step 5: workflow.createRequest(action 固定 draft,直接存草稿,不问用户)→ 原样展示 finalMarkdown
|
|
@@ -218,13 +224,31 @@ Step 6 (可选): workflow.editLoad / editPrepare / editApply → 用户修正(
|
|
|
218
224
|
| 并行组 | 可并行的操作 | 说明 |
|
|
219
225
|
|--------|------------|------|
|
|
220
226
|
| **Step 1 并行** | `invoice.reim.requests.list` 与 Step 1C 发票展示 | 用户确认期间预取事前申请 |
|
|
227
|
+
| **Step 1D 并行** | `invoice.reim.relation.list` 与 `invoice.reim.requests.list`(还没返回时) | 用户确认发票后立刻发起,不等事前申请 |
|
|
221
228
|
| **Step 3 并行** | `workflow.createForm` + `invoice.browse-field.data` | 互相独立,**必须同时发起** |
|
|
222
229
|
|
|
223
230
|
> **`createForm` 不跨组复用**:它返回的 `continuation` 与本次单据绑定,**每个报销单各调一次 `createForm`**,不能拿上一单的 `continuation` 再发起。
|
|
224
231
|
|
|
225
232
|
---
|
|
226
233
|
|
|
227
|
-
## Step 0(可选): fileId → 发票识别
|
|
234
|
+
## Step 0(可选): 上传文件 / fileId → 发票识别
|
|
235
|
+
|
|
236
|
+
### 用户上传了发票 / 行程单文件
|
|
237
|
+
|
|
238
|
+
用户给了本地文件或 URL 并说要报销时,每个文件调用一次 `invoice.upload-and-validate`,一步完成上传、识别、查验,发票和行程单进个人票夹。行程单和发票一样走这条命令,不要单独跳过;**先上传发票,后上传行程单 / 相关凭证**(规则见 [invoice-upload-and-validate.md](invoice-upload-and-validate.md)「先上传发票,后上传行程单 / 相关凭证」)。调用前先按 [invoice-upload-and-validate.md](invoice-upload-and-validate.md)「注意」提醒用户文件会上传,用户确认后才执行。**跳过 Step 1A**,按每张发票的结果决定是否进报销单:
|
|
239
|
+
|
|
240
|
+
| 结果 | 处理方式 |
|
|
241
|
+
|------|----------|
|
|
242
|
+
| `ret.ret=0`,或 `ret.ret=6022`(当天查验次数用完) | 列入本次报销 |
|
|
243
|
+
| `ret.ret` 是其他非 0 值 | **不进报销单**;在 Step 1C 汇总里单独列出发票号码和 `ret.message` 里的原因 |
|
|
244
|
+
| `fid` 为空 | 没进票夹,**不进报销单**;在 Step 1C 汇总里列出原因 |
|
|
245
|
+
| `message` 含「发票已被您添加」(`1705`) | 票夹里已有:用 `invoice.list` 按发票号码查出来,当作票夹里的发票继续 |
|
|
246
|
+
| 行程单等相关凭证(`type` 是 `17` / `18` / `57` / `58`) | 照常在 Step 1C 汇总里列出识别和查验结果,但**不单独成行、不算报销张数**,由对应发票联动带出(见 [reim-form-fill-rules.md](reim-form-fill-rules.md)「发票与相关凭证分类」)。航空运输电子客票行程单(`16` / `48`)是发票,按上面几行处理 |
|
|
247
|
+
| 所有发票都没通过 | **暂停**,告诉用户每张的原因,不往下走 |
|
|
248
|
+
|
|
249
|
+
**报销意图下禁止登记咨询**:用户上传文件是为了报销(「上传这几张发票帮我报销」等),或已在报销流程里上传 → **不要问「要不要登记」、不要采集登记数据、不要调 `invoice.reim.relation.save` / `invoice.reim.relation.search`**(不走 [invoice-reim-relation.md](invoice-reim-relation.md)「一、上传时登记」)。有登记就按 Step 1D 读回带出;没有则客户 / 项目按 Step 4.4 / 4.5、事前申请按时间匹配处理。
|
|
250
|
+
|
|
251
|
+
### 用户给了 E10 fileId
|
|
228
252
|
|
|
229
253
|
当用户提供了 `fileId`(文件/附件ID)时,调用 `invoice.reim.file-ocr.preview` 一步完成识别。
|
|
230
254
|
|
|
@@ -347,7 +371,7 @@ Step 6 (可选): workflow.editLoad / editPrepare / editApply → 用户修正(
|
|
|
347
371
|
|
|
348
372
|
| 用户响应 | 处理方式 |
|
|
349
373
|
|----------|----------|
|
|
350
|
-
| 确认 | 继续 Step 1B → Step 2 → 后续流程 |
|
|
374
|
+
| 确认 | 继续 Step 1B + Step 1D → Step 2 → 后续流程 |
|
|
351
375
|
| 选择部分发票("只报第1、3张") | 按用户指定筛选发票,继续后续流程 |
|
|
352
376
|
| 否认 | 结束报销流程 |
|
|
353
377
|
| 补充条件 | 调整查询条件重新查询,再次展示确认 |
|
|
@@ -362,7 +386,7 @@ Step 6 (可选): workflow.editLoad / editPrepare / editApply → 用户修正(
|
|
|
362
386
|
|
|
363
387
|
- 结束日:用户指定的日期,没指定为东八区当天;发给接口时 CLI 再 + 1 天,调用方不要自己加。
|
|
364
388
|
- 开始日:结束日前 7 天;第 1 页查不到时 CLI 自动放宽到结束日前 1 个月再查一次。
|
|
365
|
-
- 话费 / 油费补贴不用本 operation
|
|
389
|
+
- 话费 / 油费补贴不用本 operation 找事前申请:先用上传时登记的,没有再用 `workflow.search` 查固定流程,见 Step 4.6。
|
|
366
390
|
- 返回的 `data.query` 写明实际用的窗口;翻页时把 `data.query.cusCreateDateStart` 原样传回。
|
|
367
391
|
|
|
368
392
|
### Step 1 执行顺序与预筛选策略
|
|
@@ -372,13 +396,49 @@ Step 6 (可选): workflow.editLoad / editPrepare / editApply → 用户修正(
|
|
|
372
396
|
| 场景 | 筛选方式 |
|
|
373
397
|
|------|----------|
|
|
374
398
|
| 先有发票 → 筛选事前申请 | 不传日期,用 CLI 默认窗口(最近 7 天 → 1 个月) |
|
|
375
|
-
| **话费 / 油费补贴** |
|
|
399
|
+
| **话费 / 油费补贴** | 不查事前申请列表:先用上传时登记的(`invoice.reim.relation.list`),没有再用 `workflow.search` 查固定事前申请流程(见 [reim-phone-subsidy-rules.md](reim-phone-subsidy-rules.md) 第 3 步) |
|
|
376
400
|
| 先有事前申请 → 筛选发票 | `consumption_tm_begin` = 最早 `createTime` 的日期部分 |
|
|
377
401
|
| 按出差流程查票 | 不再查事前申请,直接用选中的出差流程(见 Step 1A「按出差流程查票」) |
|
|
378
402
|
| 并行获取 | 不做预筛选,Step 2 匹配时统一过滤 |
|
|
379
403
|
|
|
380
404
|
---
|
|
381
405
|
|
|
406
|
+
## Step 1D: 读回上传时登记的关联信息(`invoice.reim.relation.list`,只读不问登记)
|
|
407
|
+
|
|
408
|
+
> **完整规则见 [invoice-reim-relation.md](invoice-reim-relation.md)「二、报销时自动带出」。**
|
|
409
|
+
|
|
410
|
+
用户在 Step 1C 确认了发票后,用这些发票的 `fid` 调用一次,和 Step 1B 并行:
|
|
411
|
+
|
|
412
|
+
macOS/Linux(bash/zsh):
|
|
413
|
+
|
|
414
|
+
```bash
|
|
415
|
+
weaver-work-cli --json invoice run invoice.reim.relation.list --input-json '{"fids":["1331350097087250435"]}'
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
Windows PowerShell:
|
|
419
|
+
|
|
420
|
+
```powershell
|
|
421
|
+
weaver-work-cli --json invoice run invoice.reim.relation.list --input-json '{"fids":["1331350097087250435"]}'
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
- **只读、不问登记**:不要问「要不要登记」,不要调 `invoice.reim.relation.save` / `invoice.reim.relation.search`。
|
|
425
|
+
- 同一会话里非报销上传时用户刚说过的值,直接用,不必再查。
|
|
426
|
+
- 话费 / 油费补贴不走这里:它在 Step 4.6 里只读登记的事前申请(见 [reim-phone-subsidy-rules.md](reim-phone-subsidy-rules.md) 第 3 步)。查询失败或没有登记的发票按原规则处理,不告诉用户查询失败,也不改口去问要不要登记。
|
|
427
|
+
- 优先级:本轮用户明确说的 > 登记的值 > 时间匹配、默认值、历史单据。
|
|
428
|
+
|
|
429
|
+
| 读到的登记 | 后面怎么用 |
|
|
430
|
+
| --- | --- |
|
|
431
|
+
| `preApproval` | 这张发票直接绑它(Step 2 不做时间匹配、不问);`preApproval.requestId` 放进 Step 2.5 的 `requestIds`;明细「相关流程」写 `preApproval.value`;差旅 / 外出时也满足 Step 4.7 |
|
|
432
|
+
| `customer`(同一张单里只有一种) | 相关客户已确认,直接用 `customer.value`,不再 `field.search` |
|
|
433
|
+
| `project`(同一张单里只有一种) | 相关项目已确认,直接用 `project.value` |
|
|
434
|
+
| 有 `project`、没有 `customer`(差旅 / 打车 / 滴滴上传时只登记项目) | 相关客户**由项目带出**,不问:Step 3 返回后,用 `historyRequestData` 里同一项目最近一条的相关客户(总部费用报销的合同号也取这一条)。历史里对不上这个项目:非出差且合同号仍是 `20260999` 用「泛微上海」;出差只问一次客户,项目不再问 |
|
|
435
|
+
| `found=true` 且 `project=null` | 相关项目视为「不填」,不再问 |
|
|
436
|
+
| 同一张单里登记了不同的客户或项目 | 只列登记过的值,和其他待确认的问题合在一条消息里问一次 |
|
|
437
|
+
|
|
438
|
+
客户、项目都确认后,Step 4.4 的历史提问和 Step 4.5 的提问都跳过;合同号照旧按项目从历史带出。差旅 / 外出没登记项目时按 Step 4.4「差旅 / 外出」沿用历史,不要直接问。用到了登记的值时,在 `finalMarkdown` 之后用一句话告诉用户「按上传发票时登记的填写」(客户按项目带出的写「相关客户按项目带出」)。
|
|
439
|
+
|
|
440
|
+
---
|
|
441
|
+
|
|
382
442
|
## Step 2: 发票与事前申请匹配绑定
|
|
383
443
|
|
|
384
444
|
> **详细匹配规则见 [reim-matching-rules.md](reim-matching-rules.md)**
|
|
@@ -412,6 +472,7 @@ Step 6 (可选): workflow.editLoad / editPrepare / editApply → 用户修正(
|
|
|
412
472
|
|
|
413
473
|
其他情况:
|
|
414
474
|
|
|
475
|
+
- Step 1D 读到上传时登记了事前申请的发票 → 不做时间匹配,直接绑登记的那条(`preApprovalId` = `preApproval.requestId`,`preApprovalName` = `preApproval.requestName`);只有没登记的发票才按时间匹配
|
|
415
476
|
- 按出差流程查的票 → 不做时间匹配,全部绑这条出差流程
|
|
416
477
|
- 每张发票时间上都只有 1 条 → 直接绑定,不展示、不问「是否关联」
|
|
417
478
|
- 时间上一条都对不上 → 非差旅 / 外出不绑定,继续填单;差旅 / 外出按 Step 4.7 让用户选
|
|
@@ -527,17 +588,39 @@ weaver-work-cli --json invoice run invoice.browse-field.data --input-json '{"fid
|
|
|
527
588
|
|
|
528
589
|
---
|
|
529
590
|
|
|
530
|
-
## Step 4.4:
|
|
591
|
+
## Step 4.4: 历史报销单参考(差旅项目、总部费用报销合同号)
|
|
531
592
|
|
|
532
593
|
> **不询问合同号。** 相关客户、相关项目若还要用户填,与历史参考放在同一次提问里。未确认前禁止进入 Step 5。
|
|
533
594
|
> 完整落值见 [reim-form-fill-rules.md - 总部费用报销历史参考](reim-form-fill-rules.md#总部费用报销历史参考)。
|
|
534
595
|
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
数据用 Step 3 `workflow.createForm` 已返回的 `historyRequestData`。流程技能取的就是本工作流、近一年、非草稿、我发起的、按发起时间倒序的前 5 条。**不要再调用 `workflow.search` 或 `workflow.detail`**。`historyRequestData` 为 `null` 时,合同号用默认,客户和项目仍按 Step 4.5 一次问齐。大表单超线时,这些字段在 `resultFile` 里,和 `fields` 一起读。
|
|
596
|
+
数据用 Step 3 `workflow.createForm` 已返回的 `historyRequestData`。流程技能取的就是本工作流、近一年、非草稿、我发起的、按发起时间倒序的前 5 条,每条有 `requestName`、`createdatetime` 和 `fieldValues`。**不要再调用 `workflow.search` 或 `workflow.detail`**(`workflow.search` 的卡片里没有相关客户、相关项目)。大表单超线时,这些字段在 `resultFile` 里,和 `fields` 一起读。
|
|
538
597
|
|
|
539
598
|
按 `fields[].name` 对上字段 id,从 `fieldValues` 取合同号、相关客户、相关项目。值逐字符原样使用。**不从历史里带**发票、金额、费用日期、费用说明、费用科目、附件、报销事由、流程标题。
|
|
540
599
|
|
|
600
|
+
### 差旅 / 外出:沿用最近一张历史报销单的项目和客户
|
|
601
|
+
|
|
602
|
+
差旅 / 外出(判断同 Step 4.7)且 Step 1D 没读到登记的项目时执行,**不限于总部费用报销**。相关项目按下面的顺序定,定了就不问:
|
|
603
|
+
|
|
604
|
+
1. 用户本轮说了项目 → 用用户的(先 `invoice.reim.field.search` 消歧)。
|
|
605
|
+
2. 上传时登记的项目(Step 1D)。
|
|
606
|
+
3. `historyRequestData` 里**相关项目非空的最近一条** → 直接沿用它的相关项目,相关客户、合同号(总部费用报销)也取**同一条**,不问。
|
|
607
|
+
4. 都没有(`historyRequestData` 为 `null`,或 5 条都没有项目)→ 按 Step 4.5 一次问齐客户和项目。
|
|
608
|
+
|
|
609
|
+
| 沿用的那条历史 | 处理 |
|
|
610
|
+
| --- | --- |
|
|
611
|
+
| 相关客户是具体客户 | 项目、客户都沿用,出差客户硬拦截解除 |
|
|
612
|
+
| 相关客户是「泛微上海」或空 | 只沿用项目;出差不能用泛微上海顶,只问一次客户,项目不再问 |
|
|
613
|
+
|
|
614
|
+
用户本轮说了客户 → 客户用用户的,项目仍按上面沿用。
|
|
615
|
+
|
|
616
|
+
沿用历史时**不提问**,建单后在 `finalMarkdown` 之后加一句:「相关项目、相关客户按最近一张报销单「{requestName}」沿用:{项目}、{客户},不对告诉我改。」用户要改就走 Step 6。
|
|
617
|
+
|
|
618
|
+
### 总部费用报销:用历史项目带出合同号
|
|
619
|
+
|
|
620
|
+
只在 `workFlowName` 含「总部费用报销」,或工作流 ID 为 `100003460000000060` 时执行。其他报销流程不问合同号,合同号仍用默认 `20260999`。
|
|
621
|
+
|
|
622
|
+
Step 1D 已从上传登记里确认了客户和项目、或差旅 / 外出已按上一节沿用了历史项目时,**下面的历史提问跳过**,直接按已确认的项目带出合同号。`historyRequestData` 为 `null` 时,合同号用默认,客户和项目仍按 Step 4.5 一次问齐。
|
|
623
|
+
|
|
541
624
|
**合同号怎么定(不问用户):**
|
|
542
625
|
|
|
543
626
|
1. 用户本轮自己说了合同号 → 用用户的
|
|
@@ -573,9 +656,11 @@ weaver-work-cli --json invoice run invoice.browse-field.data --input-json '{"fid
|
|
|
573
656
|
> **相关客户没有已确认的值,或相关项目还没问过(也没说「不填」)时,禁止进入 Step 5。不要先建空草稿再问。**
|
|
574
657
|
> 完整规则见 [reim-form-fill-rules.md - 相关客户、相关项目必须在建单前确认](reim-form-fill-rules.md#相关客户相关项目必须在建单前确认)。
|
|
575
658
|
|
|
576
|
-
**相关客户已确认(满足任一):** 用户本轮给了名称并已 `invoice.reim.field.search` 消歧;或 Step 4.4
|
|
659
|
+
**相关客户已确认(满足任一):** 用户本轮给了名称并已 `invoice.reim.field.search` 消歧;或 Step 1D 读到上传时登记的客户(本单只有一种);或 Step 1D 只登记了项目,已按这个项目从 `historyRequestData` 带出客户;或 Step 4.4 差旅 / 外出沿用了历史里的具体客户,或确认采用了历史相关客户;或非出差且合同号仍是 `20260999`,可用默认 `"泛微上海(100504500000311504)"`。
|
|
660
|
+
|
|
661
|
+
**相关项目已确认(满足任一):** 用户本轮给了项目名称并已按「相关项目」字段 `invoice.reim.field.search` 消歧;或用户明确说「不填」;或 Step 1D 读到上传时登记的项目(本单只有一种),或有登记记录但项目为空(视为「不填」);或 Step 4.4 差旅 / 外出沿用了最近历史单的项目,或确认采用了非空的历史相关项目。
|
|
577
662
|
|
|
578
|
-
|
|
663
|
+
只缺其中一项时只问那一项(如差旅已沿用项目、只缺客户),不要把已确认的再问一遍。
|
|
579
664
|
|
|
580
665
|
未确认时**一次**让用户把两项一起输入,不要拆成两轮,也不要另问合同号。例如:
|
|
581
666
|
|
|
@@ -594,11 +679,11 @@ weaver-work-cli --json invoice run invoice.browse-field.data --input-json '{"fid
|
|
|
594
679
|
|
|
595
680
|
## Step 4.6: 话费 / 油费补贴报销
|
|
596
681
|
|
|
597
|
-
> **用户要报销话费(电话费)或油费补贴时,按 [reim-phone-subsidy-rules.md](reim-phone-subsidy-rules.md) 执行。不走 Step 2.5 ~ Step 5 的表单填单,用 `invoice.reim.subsidy.submit`
|
|
682
|
+
> **用户要报销话费(电话费)或油费补贴时,按 [reim-phone-subsidy-rules.md](reim-phone-subsidy-rules.md) 执行。不走 Step 2.5 ~ Step 5 的表单填单,用 `invoice.reim.subsidy.submit` 直接提交。没有已提交的事前申请(登记的、固定流程里都没有,或只有草稿)时禁止提交;事前申请审批中不拦。**
|
|
598
683
|
|
|
599
684
|
简要规则:
|
|
600
|
-
- 查票夹里**全部历史**话费 / 油费发票(不按「上月 /
|
|
601
|
-
-
|
|
685
|
+
- 查票夹里**全部历史**话费 / 油费发票(不按「上月 / 本月」筛日期),未挂单的全部列入,不等用户确认,**票夹(台账)里已有的不查验**;票夹没有就提醒用户上传,**上传的发票必须查验**,用 `invoice.upload-and-validate` 上传并查验后再判断能不能报;查验返回「单张发票每天最多查验5次」视为查验通过
|
|
686
|
+
- 事前申请先用上传发票时登记的(第 1 步返回后 `invoice.reim.relation.list`),没登记再用 `workflow.search` 查固定流程兜底(话费 `流程(100003460000002556)`、油费 `流程(100003460000001017)`),都不问用户;**提交了就能用,不等审批通过**;都没有就按固定模板给出发起链接:话费 `{baseUrl}/sp/workflow/flowpage/create/100003460000002556?workflowId=100003460000002556&isCreate=1`,油费 `{baseUrl}/sp/workflow/flowpage/create/100003460000001017?workflowId=100003460000001017&isCreate=1`
|
|
602
687
|
- **不拦金额**:所有明细行的报销金额加起来不超过事前申请「月补贴额度」,超过时最后一行报「月补贴额度 − 前面明细行累加的金额」,额度用完后剩下的发票不进明细、留到下次(CLI 自动算明细里的 `reimbursedAmount`)
|
|
603
688
|
- 调 `invoice.reim.subsidy.submit`:`processTitle`、`reason` 按标题与事由公式生成,`relatedProcessId` 传事前申请 `requestId`,`invoices` 传全部发票的 `{fid,total}`(抄 `invoice.list` 的这两个字段),`monthlyAllowance` 传 `workflow.search` 的 `finalMarkdown` 摘要行里的「月补贴额度」(读不到不传);不问用户确认,直接创建并提交
|
|
604
689
|
- 相关客户 / 项目不主动问:不传时客户默认泛微上海、项目为空;用户自己说了名称才用 `invoice.reim.field.search` 换成 ID 传 `customerId` / `projectId`
|
|
@@ -613,7 +698,7 @@ weaver-work-cli --json invoice run invoice.browse-field.data --input-json '{"fid
|
|
|
613
698
|
|
|
614
699
|
**如何判断(满足任一):** `workFlowName` 含「差旅」「出差」或「外出」;事前申请名称含「出差」「差旅」或「外出」;用户明确说「出差报销」「差旅报销」「外出报销」。
|
|
615
700
|
|
|
616
|
-
|
|
701
|
+
取值:该行已绑定的事前申请(含 Step 1D 上传时登记的)→ 本次只有一条差旅 / 外出事前申请时未绑定的行也用它 → 多条未绑定则按 Step 2「多条事前申请无法确认时必须问用户」问清楚每行用哪条 → 一条都没有则先列出事前申请让用户选。用户说「不填」、拒绝或不选 → **结束报销**。主表「事前申请流程 / 相关流程」不赋值,保留空值。
|
|
617
702
|
|
|
618
703
|
---
|
|
619
704
|
|
|
@@ -734,9 +819,10 @@ Step 5.3 里写回已确认的客户 / 项目、或用户刚给出的客户名
|
|
|
734
819
|
## 参考文档
|
|
735
820
|
|
|
736
821
|
- [reim-api-reference.md](reim-api-reference.md) - 报销数据准备 CLI operation 入参与返回值
|
|
822
|
+
- [invoice-reim-relation.md](invoice-reim-relation.md) - 上传时登记相关客户 / 项目 / 事前申请,报销时自动带出
|
|
737
823
|
- [reim-matching-rules.md](reim-matching-rules.md) - 发票与事前申请匹配逻辑
|
|
738
824
|
- [reim-form-fill-rules.md](reim-form-fill-rules.md) - `createRequest` 的 `data` 填值规则
|
|
739
825
|
- [reim-expense-subject-rules.md](reim-expense-subject-rules.md) - 费用科目匹配规则(建单不用;只在用户明确要求改某行科目时参考)
|
|
740
|
-
- [reim-phone-subsidy-rules.md](reim-phone-subsidy-rules.md) - 话费 /
|
|
826
|
+
- [reim-phone-subsidy-rules.md](reim-phone-subsidy-rules.md) - 话费 / 油费补贴报销:全量历史发票、事前申请(先登记的、再固定流程、都没有给发起链接)、`invoice.reim.subsidy.submit` 直接提交
|
|
741
827
|
- [reim-examples.md](reim-examples.md) - 完整端到端示例
|
|
742
828
|
- [`workflow-create.md`](../../weaver-e10-workflow/references/workflow-create.md) / [`workflow-edit.md`](../../weaver-e10-workflow/references/workflow-edit.md) - 发起与修改流程的命令契约
|
|
@@ -267,13 +267,10 @@
|
|
|
267
267
|
"id": "invoice.validate.preview",
|
|
268
268
|
"sourcePath": "weaver-interface/backend/business-apis/inc/weaver-e10-yepiaotong/references/invoice-validation.md",
|
|
269
269
|
"anchor": "source:invoice-validation.md",
|
|
270
|
-
"status": "
|
|
271
|
-
"
|
|
272
|
-
|
|
273
|
-
]
|
|
274
|
-
"references": [
|
|
275
|
-
"references/invoice-validation-preview.md"
|
|
276
|
-
]
|
|
270
|
+
"status": "not-applicable",
|
|
271
|
+
"reason": "已下线,发票文件统一走 invoice.upload-and-validate",
|
|
272
|
+
"mapsToOperations": [],
|
|
273
|
+
"references": []
|
|
277
274
|
},
|
|
278
275
|
{
|
|
279
276
|
"id": "invoice.import",
|
|
@@ -467,6 +464,21 @@
|
|
|
467
464
|
"references/invoice-issuing-workflow.md"
|
|
468
465
|
]
|
|
469
466
|
},
|
|
467
|
+
{
|
|
468
|
+
"id": "invoice.reim.relation",
|
|
469
|
+
"sourcePath": "user-provided: 发票关联信息登记 ESB 动作流(/api/esb/server/event/triggerActionFlow,esbFlowId 908258457763844096)与发票附加信息表(/api/ebuilder/form/eblist/getData)请求体与返回样例;相关客户列表(/api/ebuilder/coms/nlist/getData,pageId 1218181956452048911)与相关项目浏览框(/api/ebuilder/form/common/browser/data/ebuilder)请求体与返回样例",
|
|
470
|
+
"anchor": "source:esb/triggerActionFlow",
|
|
471
|
+
"status": "converted",
|
|
472
|
+
"mapsToOperations": [
|
|
473
|
+
"invoice.reim.relation.search",
|
|
474
|
+
"invoice.reim.relation.save",
|
|
475
|
+
"invoice.reim.relation.list"
|
|
476
|
+
],
|
|
477
|
+
"references": [
|
|
478
|
+
"references/invoice-reim-relation.md",
|
|
479
|
+
"references/reim-api-reference.md"
|
|
480
|
+
]
|
|
481
|
+
},
|
|
470
482
|
{
|
|
471
483
|
"id": "invoice.share",
|
|
472
484
|
"sourcePath": "weaver-interface/backend/business-apis/inc/weaver-e10-yepiaotong/references/invoice-share.md",
|
|
@@ -704,35 +716,6 @@
|
|
|
704
716
|
"workflow.state"
|
|
705
717
|
]
|
|
706
718
|
},
|
|
707
|
-
"invoice.validate.preview": {
|
|
708
|
-
"risk": "external-read",
|
|
709
|
-
"sourceChunks": [
|
|
710
|
-
"invoice.validate.preview"
|
|
711
|
-
],
|
|
712
|
-
"references": [
|
|
713
|
-
"references/invoice-validation-preview.md"
|
|
714
|
-
],
|
|
715
|
-
"requiresConfirmationChain": false,
|
|
716
|
-
"inputFields": [
|
|
717
|
-
"fid",
|
|
718
|
-
"scope"
|
|
719
|
-
],
|
|
720
|
-
"outputFields": [
|
|
721
|
-
"preview.fid",
|
|
722
|
-
"preview.targetFid",
|
|
723
|
-
"preview.resultFid",
|
|
724
|
-
"preview.scope",
|
|
725
|
-
"preview.validation",
|
|
726
|
-
"preview.invoiceStatus",
|
|
727
|
-
"info.fid",
|
|
728
|
-
"info.number",
|
|
729
|
-
"saved",
|
|
730
|
-
"result",
|
|
731
|
-
"workflow.workflow",
|
|
732
|
-
"workflow.version",
|
|
733
|
-
"workflow.state"
|
|
734
|
-
]
|
|
735
|
-
},
|
|
736
719
|
"invoice.import.prepare": {
|
|
737
720
|
"risk": "read-before-write",
|
|
738
721
|
"sourceChunks": [
|
|
@@ -1197,6 +1180,95 @@
|
|
|
1197
1180
|
"workflow.state"
|
|
1198
1181
|
]
|
|
1199
1182
|
},
|
|
1183
|
+
"invoice.reim.relation.search": {
|
|
1184
|
+
"risk": "read",
|
|
1185
|
+
"sourceChunks": [
|
|
1186
|
+
"invoice.reim.relation"
|
|
1187
|
+
],
|
|
1188
|
+
"references": [
|
|
1189
|
+
"references/invoice-reim-relation.md",
|
|
1190
|
+
"references/reim-api-reference.md"
|
|
1191
|
+
],
|
|
1192
|
+
"requiresConfirmationChain": false,
|
|
1193
|
+
"inputFields": [
|
|
1194
|
+
"target",
|
|
1195
|
+
"keywords"
|
|
1196
|
+
],
|
|
1197
|
+
"outputFields": [
|
|
1198
|
+
"target",
|
|
1199
|
+
"keywords",
|
|
1200
|
+
"match",
|
|
1201
|
+
"items[].id",
|
|
1202
|
+
"items[].name",
|
|
1203
|
+
"selected",
|
|
1204
|
+
"workflow.workflow",
|
|
1205
|
+
"workflow.version",
|
|
1206
|
+
"workflow.state"
|
|
1207
|
+
]
|
|
1208
|
+
},
|
|
1209
|
+
"invoice.reim.relation.save": {
|
|
1210
|
+
"risk": "write",
|
|
1211
|
+
"sourceChunks": [
|
|
1212
|
+
"invoice.reim.relation"
|
|
1213
|
+
],
|
|
1214
|
+
"references": [
|
|
1215
|
+
"references/invoice-reim-relation.md",
|
|
1216
|
+
"references/reim-api-reference.md"
|
|
1217
|
+
],
|
|
1218
|
+
"requiresConfirmationChain": false,
|
|
1219
|
+
"inputFields": [
|
|
1220
|
+
"fid",
|
|
1221
|
+
"fids",
|
|
1222
|
+
"customerId",
|
|
1223
|
+
"customerName",
|
|
1224
|
+
"projectId",
|
|
1225
|
+
"projectName",
|
|
1226
|
+
"flowId"
|
|
1227
|
+
],
|
|
1228
|
+
"outputFields": [
|
|
1229
|
+
"saved",
|
|
1230
|
+
"savedCount",
|
|
1231
|
+
"failedCount",
|
|
1232
|
+
"results[].fid",
|
|
1233
|
+
"results[].saved",
|
|
1234
|
+
"results[].message",
|
|
1235
|
+
"relation",
|
|
1236
|
+
"workflow.workflow",
|
|
1237
|
+
"workflow.version",
|
|
1238
|
+
"workflow.state"
|
|
1239
|
+
]
|
|
1240
|
+
},
|
|
1241
|
+
"invoice.reim.relation.list": {
|
|
1242
|
+
"risk": "read",
|
|
1243
|
+
"sourceChunks": [
|
|
1244
|
+
"invoice.reim.relation"
|
|
1245
|
+
],
|
|
1246
|
+
"references": [
|
|
1247
|
+
"references/invoice-reim-relation.md",
|
|
1248
|
+
"references/reim-api-reference.md"
|
|
1249
|
+
],
|
|
1250
|
+
"requiresConfirmationChain": false,
|
|
1251
|
+
"inputFields": [
|
|
1252
|
+
"fid",
|
|
1253
|
+
"fids"
|
|
1254
|
+
],
|
|
1255
|
+
"outputFields": [
|
|
1256
|
+
"items[].fid",
|
|
1257
|
+
"items[].found",
|
|
1258
|
+
"items[].customer",
|
|
1259
|
+
"items[].project",
|
|
1260
|
+
"items[].preApproval",
|
|
1261
|
+
"items[].recordedAt",
|
|
1262
|
+
"groups.customers",
|
|
1263
|
+
"groups.projects",
|
|
1264
|
+
"groups.preApprovals",
|
|
1265
|
+
"failed",
|
|
1266
|
+
"summary",
|
|
1267
|
+
"workflow.workflow",
|
|
1268
|
+
"workflow.version",
|
|
1269
|
+
"workflow.state"
|
|
1270
|
+
]
|
|
1271
|
+
},
|
|
1200
1272
|
"invoice.issuing.contracts.list": {
|
|
1201
1273
|
"risk": "read",
|
|
1202
1274
|
"sourceChunks": [
|
|
@@ -1429,13 +1501,8 @@
|
|
|
1429
1501
|
},
|
|
1430
1502
|
{
|
|
1431
1503
|
"sourcePath": "weaver-interface/backend/business-apis/inc/weaver-e10-yepiaotong/references/invoice-validation.md",
|
|
1432
|
-
"status": "
|
|
1433
|
-
"
|
|
1434
|
-
"invoice.validate.preview"
|
|
1435
|
-
],
|
|
1436
|
-
"references": [
|
|
1437
|
-
"references/invoice-validation-preview.md"
|
|
1438
|
-
]
|
|
1504
|
+
"status": "not-applicable",
|
|
1505
|
+
"reason": "已下线,发票文件统一走 invoice.upload-and-validate"
|
|
1439
1506
|
},
|
|
1440
1507
|
{
|
|
1441
1508
|
"sourcePath": "weaver-interface/backend/business-apis/inc/weaver-e10-yepiaotong/references/issuing/api-reference.md",
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { InvoiceCliError } from '../errors.js';
|
|
2
|
-
import { detailInfo, getDetail, identityFingerprint, normalizeScope, operateType, reqBase, validationPreview, workflow, } from './shared.js';
|
|
3
|
-
export class InvoiceValidatePreviewOperation {
|
|
4
|
-
name = 'invoice.validate.preview';
|
|
5
|
-
async execute(input, { host }) {
|
|
6
|
-
const scope = normalizeScope(input.scope);
|
|
7
|
-
const session = await host.getSession();
|
|
8
|
-
const detail = await getDetail({ fid: input.fid }, host);
|
|
9
|
-
const info = detailInfo(detail);
|
|
10
|
-
const result = await host.invoiceRequest({
|
|
11
|
-
path: '/api/inc/valid',
|
|
12
|
-
method: 'POST',
|
|
13
|
-
body: {
|
|
14
|
-
info,
|
|
15
|
-
flag: 100,
|
|
16
|
-
is_cut: 0,
|
|
17
|
-
is_save: 1,
|
|
18
|
-
operate_type: operateType(scope),
|
|
19
|
-
needLog: true,
|
|
20
|
-
req_base: reqBase({ numericTrace: true }),
|
|
21
|
-
},
|
|
22
|
-
});
|
|
23
|
-
if (!result?.info) {
|
|
24
|
-
throw new InvoiceCliError('api', 'validation_empty', '查验接口未返回发票信息', { details: { result }, exitCode: 1 });
|
|
25
|
-
}
|
|
26
|
-
if (identityFingerprint(result.info) !== identityFingerprint(info)) {
|
|
27
|
-
throw new InvoiceCliError('api', 'validation_target_mismatch', '查验返回的票面身份字段与目标发票不一致', { exitCode: 1 });
|
|
28
|
-
}
|
|
29
|
-
return {
|
|
30
|
-
status: 'COMPLETE',
|
|
31
|
-
data: {
|
|
32
|
-
preview: validationPreview(result.info, scope, input.fid, session.baseUrl),
|
|
33
|
-
info: result.info,
|
|
34
|
-
saved: false,
|
|
35
|
-
result,
|
|
36
|
-
workflow: workflow('invoice.validate.preview', 'COMPLETE'),
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
}
|