自动化立体仓库 - WMS系统
王佳豪
2021-06-03 1b643b838311137a4bb7cb5cced2d7f95bcb9921
src/main/java/com/zy/asrs/controller/MatCodeController.java
@@ -123,7 +123,7 @@
    // 导出
    @RequestMapping(value = "/matCode/export/auth")
    @ManagerAuth(value = ManagerAuth.Auth.NONE, memo = "物料编码数据导出")
    @ManagerAuth(value = ManagerAuth.Auth.NONE, memo = "商品编号数据导出")
    public void export(@RequestParam(required = false) String fileName,
                       @RequestParam(required = false) Integer rowCount,
                       HttpServletResponse response) throws Exception {
@@ -138,7 +138,7 @@
        }
        response.setContentType("application/vnd.ms-excel");
        response.setCharacterEncoding("utf-8");
        fileName = URLEncoder.encode(Cools.isEmpty(fileName)?"物料编码":fileName, "UTF-8");
        fileName = URLEncoder.encode(Cools.isEmpty(fileName)?"商品编号":fileName, "UTF-8");
        response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
        EasyExcel.write(response.getOutputStream(), MatCodeExcel.class)
                .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy())
@@ -148,7 +148,7 @@
    // 导入
    @RequestMapping(value = "/matCode/import/auth")
    @ManagerAuth(memo = "物料编码数据导入")
    @ManagerAuth(memo = "商品编号数据导入")
    @Transactional
    public R matCodeImport(MultipartFile file) throws IOException, InterruptedException {
        MatCodeExcelListener listener = new MatCodeExcelListener(getUserId());
@@ -158,7 +158,7 @@
    // 打印
    @RequestMapping(value = "/matCode/print/auth")
    @ManagerAuth(memo = "物料编码打印")
    @ManagerAuth(memo = "商品编号打印")
    public R matCodePrint(@RequestParam(value = "param[]") String[] param) {
        if(Cools.isEmpty(param)) {
            return R.parse(CodeRes.EMPTY);
@@ -179,7 +179,7 @@
    }
    @RequestMapping(value = "/macCode/code/auth")
//    @ManagerAuth(memo = "物料编码条形码获取(type:1(条形码);2(二维码)")
//    @ManagerAuth(memo = "商品编号条形码获取(type:1(条形码);2(二维码)")
    public R matCodeBarcode(@RequestParam(defaultValue = "1") Integer type
                        , @RequestParam String param
                        , HttpServletResponse response) throws Exception {