|  |  | 
 |  |  |     @CloudRequiredPermission("business:ywpatroltask:exportExcel") | 
 |  |  |     public void exportExcel (@RequestBody PageWrap<YwPatrolTask> pageWrap, HttpServletResponse response,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
 |  |  |         pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token)); | 
 |  |  |         List<YwPatrolTask> ywPatrolTaskList = ywPatrolTaskService.findPage(pageWrap).getRecords(); | 
 |  |  |         for (YwPatrolTask ywPatrolTask:ywPatrolTaskList) { | 
 |  |  |             if((Constants.equalsInteger(ywPatrolTask.getStatus(),Constants.ZERO) || Constants.equalsInteger(ywPatrolTask.getStatus(),Constants.ONE)) | 
 |  |  |             && ywPatrolTask.getEndDate().getTime() < System.currentTimeMillis() | 
 |  |  |             ){ | 
 |  |  |                 ywPatrolTask.setStatus(Constants.TWO); | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         ExcelExporter.build(YwPatrolTask.class).export(ywPatrolTaskService.findPage(pageWrap).getRecords(), "运维巡检任务信息表", response); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | 
 |  |  |     public ApiResponse findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
 |  |  |         return ApiResponse.success(ywPatrolTaskService.findById(id)); | 
 |  |  |     } | 
 |  |  |     @ApiOperation("任务取消") | 
 |  |  |     @GetMapping("/taskCancel") | 
 |  |  |     @CloudRequiredPermission("business:ywpatroltask:query") | 
 |  |  |     public ApiResponse taskCancel(@RequestParam Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
 |  |  |         ywPatrolTaskService.taskCancel(id,this.getLoginUser(token)); | 
 |  |  |         return ApiResponse.success("操作成功"); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  | } |