3 天以前 b852254d90e7d1955db31db154193ec8ee84d8b3
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/barcode/MesWmBarcodeService.java
@@ -6,10 +6,13 @@
import cn.iocoder.yudao.module.mes.dal.dataobject.wm.barcode.MesWmBarcodeDO;
import jakarta.validation.Valid;
import java.util.Collection;
import java.util.Map;
/**
 * MES 条码清单 Service 接口
 *
 * @author 芋道源码
 * @author 超级管理员
 */
public interface MesWmBarcodeService {
@@ -34,6 +37,14 @@
     * @param id 编号
     */
    void deleteBarcode(Long id);
    /**
     * 基于业务类型和业务编号数组,删除条码
     *
     * @param bizType 业务类型
     * @param bizIds 业务编号数组
     */
    void deleteBarcodeByBizTypeAndBizIds(Integer bizType, Collection<Long> bizIds);
    /**
     * 获得条码
@@ -75,9 +86,32 @@
     *
     * @param bizType 业务类型
     * @param bizCode 业务编码
     * @param bizName 业务名称
     * @return 生成的条码内容
     */
    String generateBarcodeContent(Integer bizType, String bizCode);
    String generateBarcodeContent(Integer bizType, String bizCode, String bizName);
    /**
     * 渲染条码/二维码图片(服务端 zxing 成图,即时预览用 Base64)
     *
     * @param content 条码内容
     * @param format 条码格式 {@link cn.iocoder.yudao.module.mes.enums.wm.BarcodeFormatEnum}
     * @param width 图片宽度
     * @param height 图片高度
     * @return PNG 图片 Base64 data-URL
     */
    String renderBarcodeImage(String content, Integer format, Integer width, Integer height);
    /**
     * 解析条码内容(服务端扫码解析)
     *
     * <p>优先按条码内容精确命中已有条码记录,返回业务对象信息;
     * 否则遍历启用状态的条码配置,按 contentFormat 模板反解出各占位符字段。
     *
     * @param content 扫描到的条码内容
     * @return 解析结果(matched/bizType/bizCode 等字段)
     */
    Map<String, Object> parseBarcodeContent(String content);
    /**
     * 根据条码配置编号获取相关联的条码数量