35 Commits

Author SHA1 Message Date
liufumingren
73d12cdf1a feat(order): 订单新增 oaid_order_source_code 字段落库,取号链路 plattradeno 优先取该字段 2026-08-26 15:33:11 +08:00
liufumingren
3352fbaff6 test(storage): directPutaway 与 quickPutaway 链路对比测试脚本
- tmp-test-putaway-full-compare.cjs:全链路真实接口对比(A 两步 quickPutaway→addItem→commit / B 一步 directPutaway),支持 A|B 参数单独跑
- tmp-test-putaway-batch-compare.cjs:批次维度对比(不同批次建行 / 同批次累加)
- tmp-verify-all-tables.cjs:15 张表逐表核对输出
- tmp-check-*:条码、请求日志、通知失败表、权限、库存行/流水等定点核对
- tmp-clear-user-cache.cjs:清 Redis 用户缓存(权限变更后刷新)
- 测试数据保留不清理(收货单 1521-1535、入库单 381-392 等)
2026-08-24 03:23:23 +08:00
liufumingren
3817948b35 feat(order): 锁定订单作业门禁与订单列表 lock_status 转 Y/N
- lock_guard: 新增 isLockedOrderStatus,lock_status 非 none 一律视为已锁定
- 储位分配(allocatePicking)跳过锁定订单,skipped_reason=locked
- 快递分配(createWaybillCodePipeline、wave.batchAllocateExpress)跳过锁定订单并返回 skipped_locked_order_ids
- 抓取波次 singleFetchByIds 排除锁定订单并返回 excluded_locked_order_ids
- 自动加团(delivery_order)锁定订单跳过自动分配快递/储位/自动加团
- 订单列表 normalizeOrderListItem 统一 lock_status 输出 Y/N(none→N,其余→Y)
- 同步 methods/system.json、methods/changes/system.json 文档
2026-08-18 16:25:12 +08:00
liufumingren
591a69d35e fix(notice): 收货通知群路由细化与奇门取消拦截转快递群
- receiving_completed/rejected 只通知仓库收货群,不再通知货主(货主端链接不再生成)
- receiving_reviewed 货主侧三级回退:货主收货群→货主售后群→仓库异常群(sendToWarehouseChannel 支持 fallbackTargets 回退链)
- 新增 receiving_store_bound:收货单创建/首次绑定货主时提醒货主填写车牌号/快递单号,路由同三级回退
- qimen order.cancel 两个拦截分支仅限有运单时创建拦截工单并通知对应快递群,与正常货主发起拦截一致
- 新增 script/backfill-inbox-permissions.cjs:客服/仓库组主管员工回填 inbox 页面与 API 权限(已执行 dev 与线上)
2026-08-17 22:10:47 +08:00
liufumingren
7ad08e488d feat(notice): 统一通知仓库接口通道与订单同步通知去抖
- warehouseNotify: 按固定群订阅经 wms_api_app 回调推送(MD5 验签),消息表登记+失败重试
- notice: 货主群缺失时降级发仓库异常群(前缀标记失败),合约停用/已解除货主不发货主群也不降级
- order_async: 订单同步通知 3 分钟去抖合并,Redis 队列+定时冲刷+失败重试
- receiving: 收货完成/驳回/审核通知走仓库通道,仓库/货主侧文案分离
- storage/inventory: 移除移库完成群通知(事件码保留,库存余量提醒仍复用)
- 新增 debug:warehouse:push-receiver 调试接收服务与文档/变更记录
2026-08-17 02:03:34 +08:00
liufumingren
37104079e5 feat(order): 订单/明细 id 防回退——序列表唯一发号 + 分表免重建 + 水位自愈 + 迁移任务执行历史 2026-08-15 20:12:23 +08:00
liufumingren
a5945cd678 fix: inbox 群登记按 group_id 去重,群改名只更新名称;唯一索引改为 (warehouse_id, group_id) 2026-08-15 18:22:30 +08:00
liufumingren
f3cf941721 feat: inbox 新增打包视频查询/查重/分配快递号函数,快递反馈回信优化 2026-08-14 23:06:05 +08:00
liufumingren
bcf6a5b384 feat: 查退回明细(queryReturn)+ 退回拆包录明细条码与订单信息快照
- 站内信新增 queryReturn(查退回+运单号):跨退回相关表查询(拆包/退回收到/退回查询登记),未退回自动预登记,未收到时回填退回登记表货主
- 模板消息直发机制 direct_reply:函数返回模板原样回复,不经 AI 改写
- 退回拆包 addDetail 支持 barcode(仅作记录)、未指定 stock_id 标注未知商品、跨货主 stock_id 403
- wms_return_unpack 新增 source_order_codes/shop_name 快照(迁移 20260813170000),原单退回时回填
- ai.js 加固:DeepSeek 推理模型 max_tokens 提升、截断/空 JSON 重试、查询类请求强制调函数规则
- 新增调试脚本 script/debug-inbox-push.cjs;同步 methods 文档与变更记录
2026-08-13 23:13:07 +08:00
liufumingren
e61efbb66a feat(inbox): 站内信模块完整实现 - AI智能助手、群管理、消息列表增强、灰度开关
新增功能:
- AI智能助手: DeepSeek多轮推理、函数调用(searchStock/createOrder等)
- silent动作: AI识别无需回复的消息(好的/谢谢/再见)自动跳过回执
- ai_enabled灰度开关: 群级别控制AI启停,支持逐群放量
- 消息列表增强: storeId/groupId/groupName/userName/content/sourceType多条件筛选,时间格式化

代码优化:
- processWithAI: 多轮推理循环(MAX_ROUNDS=5)、对话历史不含[#N]前缀防AI污染
- 回执记录补齐group_id/user_id/group_name/user_name上下文
- 移除未使用的target_channel字段及迁移
- bindCode文档修正: store_warehouse → store

接口文档:
- system.json v0.3.18→0.3.19: 新增aiEnabled参数、消息列表响应扩充
- changes/system.json: 新增bindCode变更记录

杂项:
- store_warehouse.js JSDoc补全
- wave.js waveBatchSource修复
2026-08-06 17:40:36 +08:00
liufumingren
5759c1fb19 feat(deploy): 部署脚本增加端口强制清理 + 健康检查超时延长至 20s
- 新增步骤 5.5:启动前通过 ss + fuser -k 强制释放目标端口残留进程
- 健康检查重试次数从 5 次增加到 10 次,最长等待从 10s 延长至 20s
- 健康检查失败日志增加启动日志路径提示
2026-08-01 15:31:00 +08:00
liufumingren
da56253d4a feat(shops): 店铺视频号授权支持 + 部署优化
- shops.js: 视频号授权需传 appId/toUserName,新增授权请求/响应调试缓存
- index.js: SPH 运单查询添加调试缓存
- deploy-remote.cjs: 健康检查优化(30次→5次/10s),失败自动回滚 current.md
- config.default.js: 数据库连接池 20→225
2026-08-01 03:45:26 +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
7854057244 chore: ESLint auto-fix formatting (JSDoc, spacing, quotes, line endings) 2026-07-04 23:30:32 +08:00
liufumingren
7f05b26db2 1 2026-07-04 21:40:31 +08:00
liufumingren
34273c166b 1 2026-07-02 22:08:47 +08:00
liufumingren
77435aeb79 1 2026-06-23 18:48:33 +08:00
liufumingren
21949b9a14 fix(deploy): add printer_data_template/** to deploy include paths 2026-06-08 13:44:19 +08:00
liufumingren
4beefcd22c feat(print,docs,migrations): add notifyLock, order export, express fields and related docs
notifyLock method + logs

print.send logs

order export methods + docs

express model fields SPH/XHS/DW/JD + migration

platform_shop_id migration

notifyLock docs

order export docs
2026-05-30 17:30:17 +08:00
liufumingren
dc4894cb6d 1 2026-05-25 17:08:56 +08:00
liufumingren
9c2b254206 1
Co-authored-by: Copilot <copilot@github.com>
2026-05-11 08:44:27 +08:00
liufumingren
d711ba9c21 0506更新
Co-authored-by: Copilot <copilot@github.com>
2026-05-06 17:53:54 +08:00
liufumingren
622869787a feat: sync workspace changes 2026-04-17 19:21:57 +08:00
liufumingren
aba81d497a ok 2026-04-11 17:30:06 +08:00
liufumingren
3d824a3a1d chore: sync lint and service fixes 2026-04-09 01:36:49 +08:00
liufumingren
e590808062 feat: update receiving notification and report flow 2026-04-05 21:45:18 +08:00
liufumingren
de9c5c0ab6 Merge branch 'ming' of ssh://192.168.9.101:22/liufumingren/WMS_MAIN into ming 2026-04-05 09:08:09 +08:00
liufumingren
920d201c0e feat: refine setting role/account/permission auth and tests 2026-04-05 09:03:50 +08:00
liufumingren
26af1a7039 feat: refine setting role/account/permission auth and tests 2026-03-31 00:35:53 +08:00
liufumingren
67c6856d75 chore: commit current workspace changes 2026-03-25 13:17:51 +08:00
liufumingren
ab26e1e8e7 chore: 全量提交,包含脚本、文档与配置等最新更改 2026-03-24 23:59:59 +08:00
liufumingren
2a1c8b4fa8 fix(deploy): 健康检查支持本地兜底与超时,切服后可自动回退本地端口 2026-03-24 23:57:20 +08:00
liufumingren
bbc5891d16 chore: sync workspace changes 2026-03-23 17:10:07 +08:00
liufumingren
9ab060d223 docs: 更新日报并初始化 qimen 接口文档 2026-03-22 17:12:47 +08:00
liufumingren
279b292bae chore: 更新接口文档路由与methods工作流 2026-03-22 16:21:09 +08:00