|  |  | 
 |  |  |             String wmsPath = configService.getVal("WMS_PATH", String.class); | 
 |  |  |             List<TaskReport> list = taskReportService.list(new LambdaQueryWrapper<TaskReport>().eq(TaskReport::getCompleted, 0).le(TaskReport::getReportTimes, 3)); | 
 |  |  |             for (TaskReport taskReport : list) { | 
 |  |  |                 log.info("开始上报:{}", taskReport); | 
 |  |  |                 if (report(new TaskEvent(taskReport.getSeqNum(), taskReport.getEventType()), wmsUrl, wmsPath)) { | 
 |  |  |                 TaskEvent taskEvent = new TaskEvent(taskReport.getSeqNum(), taskReport.getEventType(), taskReport.getAgvId() + ""); | 
 |  |  |                 log.info("开始上报:{}", taskEvent); | 
 |  |  |                 if (report(taskEvent, wmsUrl, wmsPath)) { | 
 |  |  |                     taskReport.setReportTimes((Cools.isEmpty(taskReport.getReportTimes()) ? 0 : taskReport.getReportTimes()) + 1); | 
 |  |  |                     taskReport.setUpdateTime(new Date()); | 
 |  |  |                     taskReport.setCompleted(1); | 
 |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 删除超过一天的上报历史记录 | 
 |  |  |      * 删除超过一定天数的上报历史记录 | 
 |  |  |      */ | 
 |  |  |     @Scheduled(fixedDelay = 3000) | 
 |  |  |     public void execute2() { | 
 |  |  |         Boolean report = configService.getVal("REPORT", Boolean.class, false); | 
 |  |  |         if (report) { | 
 |  |  |             Calendar instance = Calendar.getInstance(); | 
 |  |  |             instance.add(Calendar.DATE, 1); | 
 |  |  |             List<TaskReport> list = taskReportService.list(new LambdaQueryWrapper<TaskReport>().eq(TaskReport::getCompleted, 1).ge(TaskReport::getUpdateTime, instance.getTime())); | 
 |  |  |             instance.add(Calendar.DATE, 7); | 
 |  |  |             List<TaskReport> list = taskReportService.list(new LambdaQueryWrapper<TaskReport>().ge(TaskReport::getUpdateTime, instance.getTime())); | 
 |  |  |             Integer times = configService.getVal("REPORT_TIMES", Integer.class, 3); | 
 |  |  |             for (TaskReport taskReport : list) { | 
 |  |  |                 if ((Cools.isEmpty(taskReport.getReportTimes()) ? 0 : taskReport.getReportTimes()) > times) { | 
 |  |  | 
 |  |  |             response = new HttpHandler.Builder() | 
 |  |  |                     .setUri(wmsUrl) | 
 |  |  |                     .setPath(wmsPath) | 
 |  |  |  | 
 |  |  |                     .setJson(JSON.toJSONString(taskReport)) | 
 |  |  |                     .build() | 
 |  |  |                     .doPost(); | 
 |  |  |             log.info("返回参数:{}", response); | 
 |  |  |             JSONObject jsonObject = JSON.parseObject(response); | 
 |  |  |             if (jsonObject.getInteger("code").equals(200)) { | 
 |  |  |             if (jsonObject != null && jsonObject.getInteger("code").equals(200)) { | 
 |  |  |                 return true; | 
 |  |  |             } | 
 |  |  |         } catch (IOException e) { |