自动化立体仓库 - WMS系统
#
luxiaotao1123
2020-06-08 fe38595bb98367195417508aa704f2ddc7c7a322
src/main/java/com/zy/asrs/controller/MatCodeController.java
@@ -166,10 +166,12 @@
        return R.ok().add(res);
    }
    // todo resource
    @RequestMapping(value = "/macCode/barcode/auth")
    @ManagerAuth(memo = "物料编码条形码获取")
//    @ManagerAuth(memo = "物料编码条形码获取")
    public R matCodeBarcode(@RequestParam String param, HttpServletResponse response) throws IOException {
        if (Cools.isEmpty(param)){
            return R.parse(BaseRes.EMPTY);
        }
        BufferedImage img = BarcodeUtils.encode(param);
        if (!ImageIO.write(img, "jpg", response.getOutputStream())) {
            throw new IOException("Could not write an image of format jpg");