| | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.dao.TaskDetailMapper; |
| | | import com.stylefeng.guns.modular.system.model.PatrolTask; |
| | | import com.stylefeng.guns.modular.system.model.TaskDetail; |
| | | import com.stylefeng.guns.modular.system.model.TaskDetailVehicles; |
| | | import com.stylefeng.guns.modular.system.model.TaskDetailVehiclesChannel; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.model.enums.VideoChannelEnum; |
| | | import com.stylefeng.guns.modular.system.model.vo.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | |
| | | @Autowired |
| | | private IUserService userService; |
| | | |
| | | @Autowired |
| | | private IIconService iconService; |
| | | |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public void delTaskDetail(List<String> ids) { |
| | | this.baseMapper.deleteBatchIds(ids); |
| | | List<TaskDetail> taskDetails = this.selectBatchIds(ids); |
| | | for (TaskDetail taskDetail : taskDetails) { |
| | | JobKey jobKey = new JobKey(taskDetail.getId().toString()); |
| | | quartzUtil.deleteQuartzTask(jobKey); |
| | | taskDetail.setDelFlag(1); |
| | | this.updateById(taskDetail); |
| | | } |
| | | } |
| | | |
| | |
| | | collect.add(-1); |
| | | } |
| | | List<PictureDetails> pictureDetails = taskDetailVehiclesChannelService.getPictureDetails(pageInfo, collect, vo.getSysStatus(), vo.getArtificialStatus()); |
| | | List<Icon> icons = iconService.selectList(null); |
| | | for (PictureDetails pictureDetail : pictureDetails) { |
| | | String videoChannel = pictureDetail.getVideoChannel(); |
| | | String name = VideoChannelEnum.getName(Integer.valueOf(videoChannel)); |
| | | pictureDetail.setVideoChannel(name); |
| | | //异常 |
| | | if(pictureDetail.getStatus() == 5){ |
| | | pictureDetail.setImageUrl(icons.stream().filter(s->s.getType() == 2).findFirst().get().getUrl()); |
| | | }else if(ToolUtil.isEmpty(pictureDetail.getImageUrl())){ |
| | | //没有图片返回 |
| | | pictureDetail.setImageUrl(icons.stream().filter(s->s.getType() == 3).findFirst().get().getUrl()); |
| | | } |
| | | //离线 |
| | | if(pictureDetail.getStatus() == 4){ |
| | | pictureDetail.setImageUrl(icons.stream().filter(s->s.getType() == 1).findFirst().get().getUrl()); |
| | | } |
| | | } |
| | | return pictureDetails; |
| | | } |
| | |
| | | hssfCell.setCellStyle(style); |
| | | hssfCell.setCellValue(titles.get(l)); |
| | | } |
| | | |
| | | List<Icon> icons = iconService.selectList(null); |
| | | HSSFPatriarch patriarch = hssfSheet.createDrawingPatriarch(); |
| | | for (int i = 0; i < mapList.size(); i++) { |
| | | hssfRow = hssfSheet.createRow(i + 2); |
| | |
| | | Integer status1 = Integer.valueOf(map.get("status").toString()); |
| | | //执行状态(1=待执行,2=进行中,3=成功,4=失败) |
| | | hssfCell4.setCellValue(1 == status1 ? "待执行" : 2 == status1 ? "进行中" : 3 == status1 ? "成功" : "失败"); |
| | | //异常 |
| | | if(status1 == 5){ |
| | | map.put("imageUrl", icons.stream().filter(s->s.getType() == 2).findFirst().get().getUrl()); |
| | | }else if(ToolUtil.isEmpty(map.get("imageUrl"))){ |
| | | //没有图片返回 |
| | | map.put("imageUrl", icons.stream().filter(s->s.getType() == 3).findFirst().get().getUrl()); |
| | | } |
| | | //离线 |
| | | if(status1 == 4){ |
| | | map.put("imageUrl", icons.stream().filter(s->s.getType() == 1).findFirst().get().getUrl()); |
| | | } |
| | | } |
| | | //车牌号 |
| | | HSSFCell hssfCell5 = hssfRow.createCell(5); |