From 9075785a9e14f6220783d052d231f915c6930b87 Mon Sep 17 00:00:00 2001
From: xiaoyi <908147524@qq.com>
Date: 星期三, 04 十一月 2026 10:21:45 +0800
Subject: [PATCH] revert(collect): 撤销 collect 数采模块(新高设备管理已有自己的采集方式)
---
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/barcode/MesWmBarcodeController.java | 31 +++++++++++++++++++++++++------
1 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/barcode/MesWmBarcodeController.java b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/barcode/MesWmBarcodeController.java
index 56a5f09..62431b8 100644
--- a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/barcode/MesWmBarcodeController.java
+++ b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/barcode/MesWmBarcodeController.java
@@ -25,6 +25,7 @@
import java.io.IOException;
import java.util.List;
+import java.util.Map;
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@@ -65,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));
@@ -73,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));
@@ -83,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) {
@@ -95,13 +93,34 @@
@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')")
+ @Parameter(name = "bizName", description = "涓氬姟鍚嶇О", required = false, example = "涓�鍙疯溅闂�")
public CommonResult<String> generateBarcodeContent(@RequestParam("bizType") @NotNull(message = "涓氬姟绫诲瀷涓嶈兘涓虹┖") Integer bizType,
- @RequestParam("bizCode") @NotBlank(message = "涓氬姟缂栫爜涓嶈兘涓虹┖") String bizCode) {
- String content = barcodeService.generateBarcodeContent(bizType, bizCode);
+ @RequestParam("bizCode") @NotBlank(message = "涓氬姟缂栫爜涓嶈兘涓虹┖") String bizCode,
+ @RequestParam(value = "bizName", required = false) String bizName) {
+ String content = barcodeService.generateBarcodeContent(bizType, bizCode, bizName);
return success(content);
}
+ @PostMapping("/render")
+ @Operation(summary = "鐢熸垚鏉$爜/浜岀淮鐮佸浘鐗�", description = "鏈嶅姟绔� zxing 鎴愬浘锛岃繑鍥� PNG Base64 渚涘嵆鏃堕瑙堬紱涓嶈惤搴�")
+ @Parameter(name = "content", description = "鏉$爜鍐呭", required = true)
+ @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)
+ public CommonResult<String> renderBarcodeImage(@RequestParam("content") @NotBlank(message = "鏉$爜鍐呭涓嶈兘涓虹┖") String content,
+ @RequestParam(value = "format", required = false) Integer format,
+ @RequestParam(value = "width", required = false) Integer width,
+ @RequestParam(value = "height", required = false) Integer height) {
+ return success(barcodeService.renderBarcodeImage(content, format, width, height));
+ }
+
+ @PostMapping("/parse")
+ @Operation(summary = "瑙f瀽鏉$爜鍐呭", description = "鎸夋潯鐮佸唴瀹圭簿纭懡涓垨妯℃澘鍙嶈В锛岃繑鍥炰笟鍔″瓧娈�")
+ @Parameter(name = "content", description = "鎵弿鍒扮殑鏉$爜鍐呭", required = true)
+ public CommonResult<Map<String, Object>> parseBarcodeContent(@RequestParam("content") @NotBlank(message = "鏉$爜鍐呭涓嶈兘涓虹┖") String content) {
+ return success(barcodeService.parseBarcodeContent(content));
+ }
+
@GetMapping("/export-excel")
@Operation(summary = "瀵煎嚭鏉$爜娓呭崟 Excel")
@PreAuthorize("@ss.hasPermission('mes:wm-barcode:export')")
--
Gitblit v1.9.3