11 Commits

Author SHA1 Message Date
liufumingren
e3eff20aaa feat(waybill): 批量更新运单揽收状态(waybill.getreceive)与 Y/N 标记列治理
- 新增出站回调 waybill.getreceive(注册到 callback_functions,管理端可勾选):
  请求 { request: { waybill_codes: [...] } },响应裸数组/包装体均兼容,
  1/0 与 Y/N 归一后回写 wms_order_express.is_galaxy_receive(按 warehouse_id 隔离)
- 回调签名新增 signMode=simple(MD5(appSecret+timestamp+bodyJson)),
  waybill.getreceive 使用该口径,与仓库通知协议一致;其它事件默认口径不变
- 新增 waybill.warehouse.updateReceive / updateReceiveTaskProgress:
  复用导出的异步任务ID与进度模式(前缀 waybill_receive_),单批 10 单自动切批;
  支持 waybillCodes 或与 waybill.warehouse.list 一致的 where 条件圈选(上限 5000);
  仓库未配置外部接口时直接失败,不创建任务
- 抽出 buildListQueryWhere / resolveWaybillCodesByWhere,列表与批量更新共用筛选口径
- order_express:is_back / is_intercept / is_galaxy_receive 补默认值 N
- 迁移:存量 NULL 回填为 N(Y 不动);三列分别建立单列索引(INPLACE + LOCK=NONE)
- 文档:methods/system.json(0.3.324)、变更记录、设计文档与出站回调说明同步

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-11 04:22:30 +08:00
liufumingren
25dac21b4b feat(waybill): OMS 取号与抖音打印 params 按店铺隔离
- express/express_platform: 新增 OMS 回源取号(need_oms_waybill=1)与统一失败收尾,
  失败时标记订单异常、写失败日志并清理未完成占位行;队列消费与手工分配共用同一口径
- order_print: 抖音打印按运单落库的 logistics_interface_id 精确命中取号接口配置,
  临时 key 缓存键带店铺与 token 指纹,避免多店铺串用 token;打印前按 OMS 记录换新 params
- order_express: 新增 print_history_id、cai_niao_auth_info_id 字段
- consume_waybill_allocate_queue / pendingOrder / delivery_order / order_async /
  printer_data_builder / order_delivery_table_schema: 配套调整
- migrations: 运单 wave_no 索引、OMS 打印字段

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-10 02:53:15 +08:00
liufumingren
083f2846e0 feat(db): 为 wms_order_express 补 idx_warehouse_store 索引迁移
生产库已手工创建 idx_warehouse_store (store_id, warehouse_id),
本次将其固化为幂等迁移(ALGORITHM=INPLACE, LOCK=NONE),
并在模型索引声明与运单模块设计文档中同步记录。

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-09 23:47:35 +08:00
liufumingren
3736d306bd feat(express): 快递运单创建链路改造
- order_express model 新增 logistics_code/name/delivery_order_code/source_order_codes/store_id 字段
- express.js 业务层改造:创建运单号时写入快照字段
- express_platform.js 适配新字段
- pendingOrder.js 运单分配+拆子单号改造:支持 dispatch 表查询、已取消订单校验、主单号前置检查、step 4 配送中拆单
2026-08-01 03:44:14 +08:00
liufumingren
19c3fe09a7 refactor(weight): 重量字段统一为 INTEGER(g),取代 DECIMAL(kg)
- 8 个 model 重量字段类型 DECIMAL→INTEGER,注释 kg→g

- order_express 称重校验改为正整数(g)

- delivery_order 手动单查 StockStore + warehouse 称重毛重

- openapi.json 毛重/净重描述 kg→g

- 迁移: 20260725120000-unify-weight-fields-to-int-g

- 脚本: update-stock-warehouse-weight.cjs
2026-07-27 03:46:07 +08:00
liufumingren
abf2c4d94a 1 2026-05-29 16:47:38 +08:00
liufumingren
dc4894cb6d 1 2026-05-25 17:08:56 +08:00
liufumingren
5ce689d771 1
Co-authored-by: Copilot <copilot@github.com>
2026-04-30 19:20:31 +08:00
liufumingren
0ffe290a21 chore: commit all current workspace changes 2026-04-27 16:09:26 +08:00
liufumingren
622869787a feat: sync workspace changes 2026-04-17 19:21:57 +08:00
liufumingren
920d201c0e feat: refine setting role/account/permission auth and tests 2026-04-05 09:03:50 +08:00