|  |  | 
 |  |  |  | 
 |  |  | import com.zy.asrs.entity.result.WrkTraceVo; | 
 |  |  | import com.zy.asrs.service.*; | 
 |  |  | import com.zy.asrs.utils.FileSaveExampleUtil; | 
 |  |  | import com.zy.common.model.DetlDto; | 
 |  |  | import com.zy.common.web.BaseController; | 
 |  |  | import org.springframework.beans.BeanUtils; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | import org.springframework.transaction.annotation.Transactional; | 
 |  |  | import org.springframework.web.bind.annotation.*; | 
 |  |  | import org.springframework.web.multipart.MultipartFile; | 
 |  |  |  | 
 |  |  | import java.util.*; | 
 |  |  |  | 
 |  |  | 
 |  |  |         } | 
 |  |  |         return R.ok(); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/order/priAdd/auth") | 
 |  |  |     @ManagerAuth(memo = "手动增加订单优先级") | 
 |  |  |     @Transactional | 
 |  |  |     public R priAdd(@RequestParam Long orderId){ | 
 |  |  |         Order order = orderService.selectById(orderId); | 
 |  |  |         wrkMastService.orderAddPri(order.getOrderNo()); | 
 |  |  |         return R.ok(); | 
 |  |  |     } | 
 |  |  |     @RequestMapping(value = "/order/priReduce/auth") | 
 |  |  |     @ManagerAuth(memo = "手动减少订单优先级") | 
 |  |  |     @Transactional | 
 |  |  |     public R priReduce(@RequestParam Long orderId){ | 
 |  |  |         Order order = orderService.selectById(orderId); | 
 |  |  |         wrkMastService.orderReducePri(order.getOrderNo()); | 
 |  |  |         return R.ok(); | 
 |  |  |     } | 
 |  |  |     @RequestMapping(value = "/order/delete/auth") | 
 |  |  |     @ManagerAuth(memo = "手动删除订单") | 
 |  |  |     @Transactional | 
 |  |  | 
 |  |  |         return R.ok(); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @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:/order/labelUp/file/"+id+"/"; // 指定保存文件的路径 | 
 |  |  |         try{ | 
 |  |  |             FileSaveExampleUtil.saveFile(file, savePath); | 
 |  |  |         }catch (Exception e){ | 
 |  |  |             return R.error(); | 
 |  |  |         } | 
 |  |  |         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(); | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | } |