|  |  |  | 
|---|
|  |  |  | 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){ | 
|---|
|  |  |  | 
|---|
|  |  |  | 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(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|