提交
This commit is contained in:
1 parent
2de86b0500
commit
7f4c9720e9
37 files changed
+33121
-28528
No files matched your search
@@ -0,0 +1,59 @@
|
||||
# 生产产品类型表解耦设计
|
||||
|
||||
**日期:** 2026-07-24
|
||||
**状态:** 已批准
|
||||
|
||||
## 目标
|
||||
|
||||
将生产侧「产品类型」与中试侧 `biz_cell_product_type` 解耦:中试继续使用旧表;生产改用结构相同的新表 `biz_production_product_type`。
|
||||
|
||||
## 数据边界
|
||||
|
||||
| 侧 | 表 | 行为 |
|
||||
|----|-----|------|
|
||||
| 中试 | `biz_cell_product_type` | 主数据维护 + 价格体系(`biz_cell_product_price` / `biz_cell_product_project_system_item`),不变 |
|
||||
| 生产 | `biz_production_product_type` | 新表,字段与旧表一致 |
|
||||
|
||||
新表字段:`id`, `product_type_code`, `product_type_name`, `tenant_no`, `order_num`, `remark`,以及公共字段(`create_by` … `del_flag`)。
|
||||
|
||||
初始化:从 `biz_cell_product_type` **按相同 `id`** 拷贝未删除行到新表(幂等),保证 `biz_cell_product.product_type_id` / `biz_process_route.product_type_id` 无需改库即可继续解析名称。之后两边数据各自维护,不再同步。
|
||||
|
||||
## API
|
||||
|
||||
前缀:`/web/admin/production-product-types`
|
||||
|
||||
| 方法 | 路径 | 说明 |
|
||||
|------|------|------|
|
||||
| GET | `/` | 分页列表(keyword 搜编码/名称) |
|
||||
| POST | `/` | 新增 |
|
||||
| PUT | `/{id}` | 更新 |
|
||||
| DELETE | `/{id}` | 软删 |
|
||||
|
||||
鉴权与现有生产/中试主数据接口一致(`require_admin_or_super_admin`)。本期不做管理端菜单页。
|
||||
|
||||
## 改动范围
|
||||
|
||||
**后端**
|
||||
|
||||
- 新模型 `BizProductionProductType`
|
||||
- 新 CRUD + 挂到 `production` 路由
|
||||
- `cell_product` / `process_route` 解析类型名称时改为关联新表
|
||||
- `docs/sql/` 建表 + 同 ID 拷贝迁移脚本
|
||||
|
||||
**前端**(只换数据源)
|
||||
|
||||
- `TaskOutputProductDialog.vue`
|
||||
- `production/cell-product/index.vue`
|
||||
- `ProcessRouteTab.vue`
|
||||
|
||||
**明确不动**
|
||||
|
||||
- 中试 `cell-product-types` API、维护页、价格体系
|
||||
- 生产侧类型维护 UI、两表持续双向同步
|
||||
|
||||
## 验收
|
||||
|
||||
- 生产三处「产品类型」下拉数据来自新接口/新表
|
||||
- 中试类型 CRUD、价格体系仍用旧表
|
||||
- 已有细胞产品、工艺路线的类型名称显示正常
|
||||
- 无新菜单页;可用 SQL/接口维护新表
|
||||
Reference in new issue
Block a user