25 Commits

Author SHA1 Message Date
liufumingren
f8915a5733 fix(openapi/storage): 修复服务命名冲突、完善导入入库收货单占用与入库单详情字段
- openapi.js 重命名为 openapiEntry.js,消除与 openapi/ 目录同名冲突,恢复 ctx.service.openapi.callback 可用,修复 quickInbound API 回传报 Cannot read properties of undefined (reading 'sendWithRetry')
- 导入/PDA 入库 commit 新增非绑定模式收货单占用:带 receiving_detail_id 的记录优先按明细扣减,剩余导入量按 stock_id 匹配绑定收货单明细占用并回写收货单入库状态
- storage.entry.get 响应新增 total_order_lines / total_quantity / received_quantity 字段
- 同步 AI_METHOD_ROUTING.md 与 methods/changes 变更记录
2026-08-27 17:58:52 +08:00
liufumingren
3e7c9a7a10 fix: 修复 docs 页面 JS 失效 + 入库 locked_quantity 流水补全 + stock_store 查询条件补全 is_valid
1. docs.js: 修复模板字面量中 '\n' 被服务端解释为换行符导致客户端 JS SyntaxError,所有交互功能失效(搜索/发送按钮)
2. inbound_direct_log.js: batch_no 修正为 effectiveBatchNo;storage 表更新时补全 before_locked_quantity/after_locked_quantity;新增 stock_id 归属校验
3. stock_store.js: 多处查询/更新补全 is_valid='Y' 过滤条件,避免软删除/失效数据泄露或误操作
4. storage/entry.js: 入库完成时补全 storage 表 before_locked_quantity/after_locked_quantity 流水字段
2026-08-09 00:23:42 +08:00
liufumingren
948f600689 feat(inbox): 回调推送、出站文档、搜索增强、日志与推送状态完善
出站回调:
- 新增 warehouse_notify.json 文档(notify.ping/notify.reply),与 warehouse.json 互跳
- 回调体统一 { method, code, data },method 放 query,body 为业务数据
- MD5 签名: sign=MD5(appSecret+timestamp+bodyJson)
- 回调响应: {code:200} 成功,非200/非code:200 视为失败
- docs 页面支持模拟推送调试

搜索增强(searchStock/searchWarehouseStock):
- 直接查 stock_warehouse,不再依赖 stock_store
- 新增字段: gross_weight/box_spec/packing_requirements/prohibited_type
- 管理标识: is_sn_mgmt/is_shelf_life_mgmt/is_batch_mgmt
- 条码关联: wms_stock_barcodes
- 图片: wms_file_reference(business_type=stock)+wms_file,返回数组
- id 修正为 stock_warehouse.id

推送状态完善:
- handleApiMessage 增加 push_status 更新(2成功/3失败)
- 未配回调地址 → push_status=3 + error 原因
- 回调异常 catch 也更新 push_status=3 + 写日志
- 出站日志写入 wms_warehouse_log 表(WN-前缀)

消息列表:
- keyword 兼容 content/keyword,支持数组
- keyword 搜索 content/group_name/user_name 三列
- 支持 where+operator 结构化查询(parseWhereConditions)
- storeId=-1 查询无货主消息; storeId=0→IS NULL
- 日期范围: startDate/endDate

其他:
- silent 动作: AI 识别无需回复时跳过回执
- ai_enabled 灰度开关(群级)
- bindCode 文档修正
- store_name 改用 StoreWarehouse.store_remask
2026-08-08 00:17:38 +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
4374ad01e3 feat(inbox): 站内信模块完整实现 — 统一消息收件箱 2026-08-03 01:36:16 +08:00
liufumingren
b5b631f20d fix(docs): warehouse 文档作为外部 API 隔离,不暴露内部文档导航;修正签名算法描述为 MD5 2026-08-03 01:08:36 +08:00
liufumingren
05b71b2f31 feat: 抖音面单自定义区模板出口域名改为可配置路由
- config.default.js: 新增 customAreaBaseUrl 出口域名配置
- router.js: 新增 GET /mb/douyin1.xml 路由
- controller/template.js: 新增 douyinCustomArea() 方法输出静态 XML
- printer_data_builder.js: applyDouyinExpressFieldMapping 支持 customAreaBaseUrl 参数
- order_print.js: 将 app.config.customAreaBaseUrl 传入 buildPlatformRequestSkeleton
- douyin.json: 移除硬编码 templateURL,由运行时代码动态拼装
2026-08-02 00:35:08 +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
c2b5ffc319 1 2026-06-07 20:42:24 +08:00
liufumingren
99367e5043 1 2026-06-06 05:15:46 +08:00
liufumingren
dc4894cb6d 1 2026-05-25 17:08:56 +08:00
liufumingren
150e2977d4 修改快递接口配置,拼多多取号,未完成 2026-05-22 08:39:07 +08:00
liufumingren
9b2cc5fc73 fix(receiving): 修复获取收货单时重复定义属性的问题 2026-05-06 01:32:55 +08:00
liufumingren
5ce689d771 1
Co-authored-by: Copilot <copilot@github.com>
2026-04-30 19:20:31 +08:00
liufumingren
b7f980188f 1
Co-authored-by: Copilot <copilot@github.com>
2026-04-29 17:43:54 +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
e73a311076 ok 2026-04-11 17:09: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
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
279b292bae chore: 更新接口文档路由与methods工作流 2026-03-22 16:21:09 +08:00
63b4536766 chore: initialize wms project 2026-03-16 14:01:22 +08:00