137 Commits
Author SHA1 Message Date
wuzilongandCursor d22b06dbe7 feat(pl): 易制毒先安排待确认与购买证管理
含易制毒计划安排后进入已安排待确认,确认通过后再占合同并生成链接/地磅;新增购买证/运输证主数据、产品行关联、余量校验与 OCR 配置,并停止跟踪 api_key/app.pid。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-09 18:41:10 +08:00
wuzilongandCursor 811e6a129f feat(pl): allocate copy_seq_no on first driver plan share-to-group
Add ensure-copy-seq API and miniprogram clipboard prefix so each plan
gets a tenant-scoped fixed serial on first copy; cover allocation with
unit tests and refresh the backend graph.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-09 12:36:58 +08:00
wuzilong 318b934b86 提交 2026-10-06 17:55:20 +08:00
zlwu c55f22a603 提交 2026-10-02 09:28:00 +08:00
zlwuandCursor 7f1f60e259 test: fix vehicle recharge submit fixture required fields
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-29 12:17:04 +08:00
zlwuandCursor c1113cc2ef test: assert current_node attribute on withdraw apply read model
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-29 12:09:19 +08:00
zlwuandCursor 388eb8cc7e test: add failing cases for vehicle recharge apply withdraw
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-29 12:06:12 +08:00
zlwu 4f364bc9a0 提交 2026-09-29 07:07:51 +08:00
zlwu c9fb39395c 提交 2026-09-28 10:47:42 +08:00
zlwuandCursor 0d2c5a2048 feat(pl): enforce mineVehicles write rules on recharge apply
Reject foreign plates on create and require own applicant for update/submit/cancel when mineVehicles is enabled.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-27 18:33:25 +08:00
zlwuandCursor ae1d01bf07 feat(pl): filter recharge applies by mineVehicles plates
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-27 18:25:58 +08:00
zlwuandCursor a903206dbe feat(pl): add helper for user personnel vehicle plates
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-27 18:23:31 +08:00
zlwuandCursor f80a29fb8d feat: add vehicle recharge approval pending approve reject disburse
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-26 20:56:14 +08:00
zlwuandCursor ea8c2c0362 feat: add vehicle recharge apply submit and detail approvals
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-26 20:55:43 +08:00
zlwuandCursor bdd67d44d9 feat: add recharge workflow models and schema statuses
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-26 20:55:15 +08:00
zlwu b430e75a4b 提交 2026-09-26 11:59:39 +08:00
wuzilongandCursor 81e52477de feat(pl): build archive export zip with relative hyperlinks.
Pack archive xlsx plus attachment files under 附件/, with HYPERLINK columns on each plan's first row.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 12:46:15 +08:00
wuzilongandCursor 7af4d7ac7e feat(pl): collect hazard certs for archive zip export.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 12:42:44 +08:00
wuzilongandCursor d68a0ef0bd fix(pl): fix FakePlan id for planId export field.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 12:42:05 +08:00
wuzilongandCursor e9ffa5d042 feat(pl): add archive zip naming helpers and planId on export rows.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 12:40:04 +08:00
wuzilong c270d14057 提交 2026-09-23 12:03:07 +08:00
wuzilongandCursor 98e31c88b2 feat(api): confirm web QR login from mini program phone auth.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-18 20:17:14 +08:00
wuzilongandCursor ec0045d5bf feat(api): add web wx-qr create and status endpoints.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-18 20:16:15 +08:00
wuzilongandCursor 22634330d5 feat(wechat): generate unlimited mini program codes for web QR login.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-18 20:15:15 +08:00
wuzilongandCursor 1e7c8bde3b test(auth): force in-memory backend for wx-qr session unit tests.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-18 20:14:35 +08:00
wuzilongandCursor 56a3311c45 feat(auth): add wx-qr session state machine for web login.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-18 19:55:00 +08:00
wuzilong 1ba1f38321 提交 2026-09-18 12:01:13 +08:00
wuzilongandCursor 7ccd1f553e feat(backend): resolve wechat login user by phone and bind openid.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-18 11:12:03 +08:00
wuzilongandCursor 3d003e8d37 feat(backend): add wechat mini auth helpers and user phone lookups.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-18 11:09:04 +08:00
wuzilong 86694f739f 提交 2026-09-17 09:10:10 +08:00
wuzilongandCursor 5eb7b0b193 feat(backend): exchange miniprogram webview tickets for JWT sessions.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-14 16:11:36 +08:00
wuzilongandCursor 98292cb914 fix(backend): consume webview tickets atomically and fail closed on Redis errors.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-14 16:07:45 +08:00
wuzilongandCursor 62161e2905 feat(backend): add one-time Redis tickets for miniprogram webview login.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-14 16:03:18 +08:00
wuzilongandCursor 9d06e1830e feat(bx): add advance apply withdraw API
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-14 09:59:02 +08:00
wuzilong 8c96de2c0c 提交 2026-09-13 13:08:52 +08:00
wuzilongandCursor 1303fae1e0 feat(pl): add driver-plan service for personnel-scoped history
Resolve plans by linked driver/escort personnel and reuse public
driver page/feedback helpers for login-state miniprogram APIs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 11:44:24 +08:00
wuzilongandCursor ca3062b0e2 feat(pl): optional escort selection on transport arrange
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 10:48:23 +08:00
wuzilongandCursor 26b096ae38 feat(pl): bind sys user on personnel and snapshot selectedEscortId
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 10:37:11 +08:00
wuzilongandCursor 10183dabc2 feat(backend): expose pound QR items on driver transport page
Enrich inventory links with business type/partner and attach
poundQrcodeItems for the public driver footer button.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 09:29:03 +08:00
wuzilongandCursor 87ed40512c feat(backend): add public pound-qr endpoint by inventory id
Expose a read-only payload for the shared weighbridge QR card without auth.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 09:24:09 +08:00
wuzilongandCursor 9c5a1cfb8e feat(pl): aggregate unique delivery dates from stop rows
Provide YYYY-MM-DD dedupe helper for plan list deliveryTimes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-12 21:08:54 +08:00
wuzilongandCursor efe8aed409 feat(pl): filter plans by delivery-stop date range
Add EXISTS on pl_plan_delivery.delivery_time for list column filters.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-12 21:07:23 +08:00
wuzilongandCursor 542ecc63e7 fix(pl): allow only etc recharge type in vehicle recharge schemas
Reject fuel writes so the shared module can be narrowed to ETC-only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-12 08:43:49 +08:00
wuzilong 8e87c7d576 提交 2026-09-11 21:19:52 +08:00
wuzilong 83192719b0 提交 2026-09-11 09:41:09 +08:00
wuzilongandCursor ded6aeaa85 feat(pl): require contract package spec on plan stop save
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 18:01:33 +08:00
wuzilongandCursor ff96f2ec25 feat(pl): arrange-qty and overflow checks use product+package key
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 18:00:10 +08:00
wuzilongandCursor 2fc14b1291 feat(pl): key contract plan qty by product and package spec
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 17:52:57 +08:00
wuzilong 05559def40 提交 2026-09-09 13:03:02 +08:00
wuzilongandCursor 45a6fc5cc5 feat(pl): add datetime column dual-caret sort on scoped transport lists.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 22:50:35 +08:00