Files
huachuang/docs/superpowers/specs/2026-08-05-box-info-query-design.md

36 lines
1.5 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 木箱信息只读查询设计
## 目标
在WMS模块的“基础模块”下新增“木箱信息”菜单读取 `wmw_boxinfo` 表并提供分页查询。该功能只用于查看木箱基础信息,不提供新增、修改、删除、批量操作或导出能力。
## 后端设计
- 接口地址:`GET /wms/box-info/page`
- 权限标识:`wms:box-info:query`
- 查询条件:木箱号、物料编码、物料名称、是否包装、载具类型。
- 默认按 `box_id` 倒序。
- `wmw_boxinfo` 没有通用审计和逻辑删除字段Mapper直接返回只读响应对象不继承通用数据对象也不暴露通用写方法。
- 查询SQL写入 `BoxInfoMapper.xml`Controller、Service 和 Mapper 均不提供写方法。
## 前端设计
- 页面路径:`views/wms/boxinfo/index.vue`
- 页面仅包含查询表单、刷新按钮、分页表格。
- 不显示复选框、操作列及新增、修改、删除、导出按钮。
- 表格展示木箱号、物料、数量、尺寸、重量、插入时间、捆扎数量、载具类型和包装状态。
## 菜单设计
- 菜单名称:木箱信息。
- 上级菜单WMS模块 / 基础模块。
- 组件:`wms/boxinfo/index`
- 菜单权限:`wms:box-info:query`
- SQL采用 `NOT EXISTS` 幂等写法,同时创建页面菜单和查询按钮权限。
## 验证
- 编译 `nl-module-base`确认Java和MyBatis XML可加载。
- 对前端相关文件执行类型检查或项目既有检查命令。
- 执行菜单SQL后核对菜单、权限和接口分页响应。