| | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获得物料") |
| | | @Parameter(name = "id", description = "编号", required = true, example = "1") |
| | | @PreAuthorize("@ss.hasPermission('mdm:item:query')") |
| | | public CommonResult<MdmItemRespVO> getItem(@RequestParam("id") Long id) { |
| | | MdmItemDO item = itemService.getItem(id); |
| | | MdmItemRespVO resp = BeanUtils.toBean(item, MdmItemRespVO.class); |
| | |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获得物料分页") |
| | | @PreAuthorize("@ss.hasPermission('mdm:item:query')") |
| | | public CommonResult<PageResult<MdmItemRespVO>> getItemPage(@Valid MdmItemPageReqVO pageReqVO) { |
| | | PageResult<MdmItemDO> pageResult = itemService.getItemPage(pageReqVO); |
| | | // 转换并补齐关联名称 |
| | |
| | | @GetMapping("/list-by-ids") |
| | | @Operation(summary = "获得物料列表") |
| | | @Parameter(name = "ids", description = "编号列表", required = true, example = "1,2,3") |
| | | @PreAuthorize("@ss.hasPermission('mdm:item:query')") |
| | | public CommonResult<List<MdmItemRespVO>> getItemList(@RequestParam("ids") List<Long> ids) { |
| | | List<MdmItemDO> list = itemService.getItemList(ids); |
| | | return success(BeanUtils.toBean(list, MdmItemRespVO.class)); |