自动化立体仓库 - WMS系统
pang.jiabao
2024-07-19 a29aa2ea80eaaea6acff08068a04de47b69478a8
src/main/java/com/zy/asrs/controller/OrderController.java
@@ -419,13 +419,13 @@
        return R.ok();
    }
    @RequestMapping(value = "/order/insert/file/auth")
    @ManagerAuth
    public R insertFile(@RequestParam("orderId") String orderId,@RequestParam MultipartFile file){
    @RequestMapping(value = "/order/insert/labelUp/file/auth")
//    @ManagerAuth
    public R insertLabelUpFile(@RequestParam("orderId") String orderId,@RequestParam MultipartFile file){
        String[] split = orderId.split("-");
        int id = Integer.parseInt(split[1]);
        System.out.println("---开始---");
        String savePath = "D:/crm/plan/file/"+id+"/"; // 指定保存文件的路径
        String savePath = "D:/order/labelUp/file/"+id+"/"; // 指定保存文件的路径
        try{
            FileSaveExampleUtil.saveFile(file, savePath);
        }catch (Exception e){
@@ -434,4 +434,17 @@
        return R.ok();
    }
    @RequestMapping(value = "/order/view/labelUp/file/auth")
//    @ManagerAuth
    public R viewLabelUpFile(@RequestParam("orderId") Long orderId){
//        int id = Integer.parseInt(orderId);
        String savePath = "D:/order/labelUp/file/"+orderId+"/"; // 指定保存文件的路径
        try{
            List<FileSaveExampleUtil.FileDTO> fileDTOS = FileSaveExampleUtil.viewFileList(savePath);
            return R.ok(fileDTOS);
        }catch (Exception e){
            return R.error();
        }
    }
}