Skip to content

POST /dm-store/partMain/page

Content-Type: application/json

触发按钮:pageAjax

入参

传递对象:PartMainQueryVo

字段类型必填多选校验规则说明
fieldString--
orderString--
factoryNoString--
idsList<Long>-id集合
partNoListList<String>-物料代号集合
bigCategoryString-大类
smallCategoryString-小类
sonCategoryString-子类
partCodeString-物料编码
partNameString-物料名称
controlTypeInteger-控制类型
specString-物料规格
useModelString-使用机型
descriptionString-物料备注
preciousTypeInteger-ABC分类
isPeriodInteger-是否有效期件
isLifeInteger-是否寿命件
partCodeOrNameString--
validFlagInteger-是否可用

实际入参

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_mainPartMainMapper.selectPage按筛选条件分页查询partMain数据
store.suppliersupplierService.findAllSuppliersupplierService
附件数据fileClient.listFile批量查询附件并补充图片地址