| | |
| | | @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)); |
| | |
| | | .specification("").unitMeasureName("个").unitMeasureName2("").unitMeasureRate1(null) |
| | | .unitMeasureName3("").unitMeasureRate2(null).brandName("").barCode("") |
| | | .purchasePrice(null).salesPrice(null).costPrice(null).safetyStock(null) |
| | | .minStock(null).maxStock(null).expiryDay(null).status(0).remark("").build() |
| | | .minStock(null).maxStock(null).expiryDay(null).status(0).sort(0).remark("").build() |
| | | ); |
| | | // 输出 |
| | | ExcelUtils.write(response, "物料导入模板.xls", "物料列表", MdmItemImportExcelVO.class, list); |
| | |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |