xiaoyi
5 天以前 481d8165f26fc7e37f0e87f6444ac0340bb563a3
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/barcode/MesWmBarcodeController.java
@@ -66,7 +66,6 @@
    @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));
@@ -74,7 +73,6 @@
    @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));
@@ -84,7 +82,6 @@
    @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) {
@@ -97,7 +94,6 @@
    @Parameter(name = "bizType", description = "业务类型", required = true, example = "1")
    @Parameter(name = "bizCode", description = "业务编码", required = true, example = "WO202403070001")
    @Parameter(name = "bizName", description = "业务名称", required = false, example = "一号车间")
    @PreAuthorize("@ss.hasPermission('mes:wm-barcode:query')")
    public CommonResult<String> generateBarcodeContent(@RequestParam("bizType") @NotNull(message = "业务类型不能为空") Integer bizType,
                                                        @RequestParam("bizCode") @NotBlank(message = "业务编码不能为空") String bizCode,
                                                        @RequestParam(value = "bizName", required = false) String bizName) {
@@ -111,7 +107,6 @@
    @Parameter(name = "format", description = "条码格式(1 二维码 / 2 EAN13 / 3 CODE39 / 4 UPC-A / 空默认 CODE128)", required = false)
    @Parameter(name = "width", description = "图片宽度", required = false)
    @Parameter(name = "height", description = "图片高度", required = false)
    @PreAuthorize("@ss.hasPermission('mes:wm-barcode:query')")
    public CommonResult<String> renderBarcodeImage(@RequestParam("content") @NotBlank(message = "条码内容不能为空") String content,
                                                   @RequestParam(value = "format", required = false) Integer format,
                                                   @RequestParam(value = "width", required = false) Integer width,
@@ -122,7 +117,6 @@
    @PostMapping("/parse")
    @Operation(summary = "解析条码内容", description = "按条码内容精确命中或模板反解,返回业务字段")
    @Parameter(name = "content", description = "扫描到的条码内容", required = true)
    @PreAuthorize("@ss.hasPermission('mes:wm-barcode:query')")
    public CommonResult<Map<String, Object>> parseBarcodeContent(@RequestParam("content") @NotBlank(message = "条码内容不能为空") String content) {
        return success(barcodeService.parseBarcodeContent(content));
    }