45 lines
1.7 KiB
Markdown
45 lines
1.7 KiB
Markdown
# rpa_rebate
|
||
|
||
返利班。领表 4 起草行、表 3 只录协议行,按合同号查返利中心。搜到再录协议、写表 4。查号走页面;录协议仍用替身。接口 4 组包在 `rpa_oms`,本班不推、不改 `push_status`。
|
||
|
||
| | |
|
||
| --- | --- |
|
||
| 读 | 表 4 `action_code=1 AND contract_status=1`(已有合同号、尚未回成功);表 3 `contract_entry_status=0` 且已有 `contractNo` |
|
||
| 写 | 表 4:搜到则起草行 `contractStatus=2`;录协议后插 `actionCode=2`、`agreementStatus=1` |
|
||
| 口 | 口 4(组包在 oms,path 空) |
|
||
|
||
与合同同一天两班,建议合同班跑完再跑。查号挂在本班,不单开查状态任务。搜不到不重录合同,戳改回 `合同班`,留给下一班再搜。
|
||
|
||
口径:`docs/RPA订单中心接口开发口径_20260930.md` 第 5 节。
|
||
|
||
## 运行
|
||
|
||
内存替身(不连库、不开浏览器):
|
||
|
||
```bash
|
||
cd rpa_rebate
|
||
uv sync --python 3.12
|
||
uv run pytest tests/test_job.py::test_job_finds_contract_and_writes_agreement -q
|
||
uv run pytest tests/test_finder.py::test_find_flow_writes_accept_for_missing_number -q
|
||
```
|
||
|
||
页面查号(不开录协议、不连 Oracle)。账号放本机 `.env`:
|
||
|
||
```bash
|
||
cd rpa_rebate
|
||
uv run python run_find.py
|
||
```
|
||
|
||
验收看控制台 `ACCEPT SUMMARY REBATE_FIND` 或 `screenshots/REBATE_FIND/ACCEPT.txt`。默认搜哨兵号,期望 `found=no`。要搜真号:`REBATE_ACCEPT_CONTRACT_NO=合同号`。
|
||
|
||
接口 4 组包(`rpa_oms`,不发 HTTP):
|
||
|
||
```bash
|
||
cd rpa_oms
|
||
uv run pytest tests/test_contract_agreement_outbound.py::test_assembles_unpushed_rows_as_document_envelope -q
|
||
```
|
||
|
||
## 本期不做
|
||
|
||
录协议(总单 / 导入 / 送审)、映射表默认值、向订单中心发 HTTP、改 `push_status`。
|