YYC
2023-07-04 585e878b169bdeb2bc8cc452b9d2e640d00caa6d
igds-inout/src/main/java/com/ld/igds/common/bar/BarCodeUtils.java
@@ -33,19 +33,19 @@
public class BarCodeUtils {
    /**
     * 默认图片宽度
     * 默认图片宽度模 70MM
     */
    private static final int DEFAULT_PICTURE_WIDTH = 300;
    private static final int DEFAULT_PICTURE_WIDTH = 260;
    /**
     * 默认图片高度
     * 默认图片高度  50MM
     */
    private static final int DEFAULT_PICTURE_HEIGHT = 200;
    private static final int DEFAULT_PICTURE_HEIGHT = 185;
    /**
     * 默认条形码宽度
     */
    private static final int DEFAULT_BAR_CODE_WIDTH = 295;
    private static final int DEFAULT_BAR_CODE_WIDTH = 250;
    /**
     * 默认条形码高度
@@ -264,6 +264,12 @@
    public static String getBarCodeImageBase64(String codeValue, String bottomStr1, String bottomStr2, String bottomStr3) {
        BufferedImage image = getBarCodeWithWords(codeValue, bottomStr1, bottomStr2, bottomStr3);
        try{
           ImageIO.write(image, "jpg", new File("D:/IGDS/TEMP/BR_CODE_T.jpg"));
        }catch(Exception e){
        }
        return GetBase64FromImage(image);
    }
@@ -285,7 +291,7 @@
    public static void main(String[] args) throws IOException {
        BufferedImage image = BarCodeUtils.getBarCodeWithWords("C_202306290005", "202306290005", "中心粮库", "2023-06-29 12:25");
        BufferedImage image = BarCodeUtils.getBarCodeWithWords("R_202306290005", "202306290005", "样品质检码", "2023-06-29 12:25");
        ImageIO.write(image, "jpg", new File("D:/IGDS/TEMP/BR_CODE_T.jpg"));
    }
}