Appearance
POST /dm-store/partMain/page
Content-Type: application/json
触发按钮:pageAjax
入参
传递对象:PartMainQueryVo
| 字段 | 类型 | 必填 | 多选 | 校验规则 | 说明 |
|---|---|---|---|---|---|
| field | String | 否 | 否 | - | - |
| order | String | 否 | 否 | - | - |
| factoryNo | String | 否 | 否 | - | - |
| ids | List<Long> | 否 | 是 | - | id集合 |
| partNoList | List<String> | 否 | 是 | - | 物料代号集合 |
| bigCategory | String | 否 | 否 | - | 大类 |
| smallCategory | String | 否 | 否 | - | 小类 |
| sonCategory | String | 否 | 否 | - | 子类 |
| partCode | String | 否 | 否 | - | 物料编码 |
| partName | String | 否 | 否 | - | 物料名称 |
| controlType | Integer | 否 | 否 | - | 控制类型 |
| spec | String | 否 | 否 | - | 物料规格 |
| useModel | String | 否 | 否 | - | 使用机型 |
| description | String | 否 | 否 | - | 物料备注 |
| preciousType | Integer | 否 | 否 | - | ABC分类 |
| isPeriod | Integer | 否 | 否 | - | 是否有效期件 |
| isLife | Integer | 否 | 否 | - | 是否寿命件 |
| partCodeOrName | String | 否 | 否 | - | - |
| validFlag | Integer | 否 | 否 | - | 是否可用 |
实际入参
json
{
"pageSize": 10,
"pageNum": 1,
"bigCategory": "2",
"smallCategory": "2",
"sonCategory": "2",
"partCode": "2",
"partName": "2",
"controlType": 1,
"spec": "2",
"useModel": "2",
"description": "2",
"isPeriod": 1,
"isLife": 1,
"preciousType": 1
}出参
传递对象:ResultData<PartMainVo>
json
{
"code": 200,
"msg": "success",
"data": {
"rows": [
{
"id": 2251,
"createTime": "2026-05-21 02:18:29",
"createUser": "zhongmg2",
"updateTime": "2026-05-21 03:36:09",
"updateUser": "zhongmg2",
"factoryNo": "000027",
"isDelete": 0,
"partNo": "002263",
"partCode": "ss",
"bigCategory": "ss",
"smallCategory": "sss",
"sonCategory": "sss",
"partName": "ss",
"spec": "sss",
"uom": "LUMENES",
"controlType": 1,
"currency": 1,
"price": 111,
"preferredSupplier": "FACILITIES CORP",
"supplierNo": "000127",
"isPeriod": 0,
"isLife": 0,
"maxLife": null,
"maxLifeUom": "",
"useModel": "ss",
"preciousType": 1,
"validFlag": 1,
"description": "2222",
"packageNumber": null,
"baseUrl": null,
"attachmentVoList": null,
"serialRule": 1
}
],
"total": 1533
}
}前端校验规则
前端校验
└── 权限校验
├── 页面权限
│ └── v-auth: 'information:partMain:search:popup'
├── 新增按钮权限
│ └── v-auth: 'information:partMain:add:popup'
├── 删除按钮权限
│ └── v-auth: 'information:partMain:delete:popup'
├── 下载模板按钮权限
│ └── v-auth: 'information:partMain:template:popup'
├── 导入按钮权限
│ └── v-auth: 'information:partMain:import:popup'
├── 导入图片按钮权限
│ └── v-auth: 'information:partMain:importImgs:popup'
├── 编辑操作权限
│ └── code: 'information:partMain:edit:popup'
└── 删除操作权限
└── code: 'information:partMain:delete:popup'后端逻辑
业务流程:按条件筛选物料 -> 分页查询主数据 -> 补充供应商与附件信息 -> 返回页面展示结果
├── 组装查询条件
│ └── 构建筛选条件:PartMainServiceImpl.findPartMainCondition :106
│ ├── 分类、物料编码、规格、适用机型、描述按大小写兼容模糊匹配
│ ├── 控制类型、有效标识、周期件、寿命件、贵重类型精确筛选
│ ├── 物料名称按大写模糊匹配
│ ├── 仅查询未删除物料
│ ├── 可按 ids、partNoList 限定范围
│ └── 默认按创建时间倒序,或按指定字段排序
├── 分页查询主数据
│ └── 分页查询:page :111
├── 补充供应商信息
│ ├── 查询供应商全集:SupplierService.findAllSupplier :113
│ └── 查询未删除供应商:SupplierServiceImpl.findAllSupplier :369-374
├── 补充附件信息
│ ├── 查询物料附件:FileClient.listFile :119
│ └── 附件查询链路
│ ├── 接收附件查询:FileController.listFile :104-105
│ └── 按业务标识和目标ID查询附件:FileServiceImpl.selectFiles :134-143
└── 整理返回结果
├── 按供应商名称回填供应商编号
├── 按控制类型清理非适用寿命或包装字段
└── 按附件记录拼接图片访问地址后端校验规则
无涉及数据库表
| 库名.表名 | mapper.statement | 描述 |
|---|---|---|
| store.part_main | PartMainMapper.selectPage | 按筛选条件分页查询partMain数据 |
| store.supplier | supplierService.findAllSupplier | supplierService |
| 附件数据 | fileClient.listFile | 批量查询附件并补充图片地址 |