| | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获得条码") |
| | | @Parameter(name = "id", description = "编号", required = true, example = "1024") |
| | | @PreAuthorize("@ss.hasPermission('mes:wm-barcode:query')") |
| | | public CommonResult<MesWmBarcodeRespVO> getBarcode(@RequestParam("id") Long id) { |
| | | MesWmBarcodeDO barcode = barcodeService.getBarcode(id); |
| | | return success(BeanUtils.toBean(barcode, MesWmBarcodeRespVO.class)); |
| | |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获得条码分页") |
| | | @PreAuthorize("@ss.hasPermission('mes:wm-barcode:query')") |
| | | public CommonResult<PageResult<MesWmBarcodeRespVO>> getBarcodePage(@Valid MesWmBarcodePageReqVO pageReqVO) { |
| | | PageResult<MesWmBarcodeDO> pageResult = barcodeService.getBarcodePage(pageReqVO); |
| | | return success(BeanUtils.toBean(pageResult, MesWmBarcodeRespVO.class)); |
| | |
| | | @Operation(summary = "根据业务对象获取条码信息", description = "前端用于生成条码图片") |
| | | @Parameter(name = "bizType", description = "业务类型", required = true, example = "102") |
| | | @Parameter(name = "bizId", description = "业务编号", required = true, example = "1024") |
| | | @PreAuthorize("@ss.hasPermission('mes:wm-barcode:query')") |
| | | public CommonResult<MesWmBarcodeRespVO> getBarcodeByBusiness( |
| | | @RequestParam("bizType") Integer bizType, |
| | | @RequestParam("bizId") Long bizId) { |
| | |
| | | @Operation(summary = "生成条码内容") |
| | | @Parameter(name = "bizType", description = "业务类型", required = true, example = "1") |
| | | @Parameter(name = "bizCode", description = "业务编码", required = true, example = "WO202403070001") |
| | | @PreAuthorize("@ss.hasPermission('mes:wm-barcode:query')") |
| | | public CommonResult<String> generateBarcodeContent(@RequestParam("bizType") @NotNull(message = "业务类型不能为空") Integer bizType, |
| | | @RequestParam("bizCode") @NotBlank(message = "业务编码不能为空") String bizCode) { |
| | | String content = barcodeService.generateBarcodeContent(bizType, bizCode); |