| | |
| | | /** |
| | | * 视频计算考核指标任务 |
| | | * 凌晨执行计算昨天数据 |
| | | * */ |
| | | */ |
| | | @Slf4j |
| | | @Component("videoTask") |
| | | public class VideoTask { |
| | |
| | | CalculationStrategy calculator = IndexCalculationFactory.getCalculator(CalculationStrategyConstants.Video_SiteOnline); |
| | | calculator.calculate(results); |
| | | } |
| | | |
| | | public void videoUsabilityTask(){ |
| | | Date yesterday = DateUtils.addDays(new Date(), -1); |
| | | //计算录像可用率和重点录像可用率 |
| | |
| | | CalculationStrategy calculator = IndexCalculationFactory.getCalculator(CalculationStrategyConstants.Video_Usability); |
| | | calculator.calculate(results); |
| | | } |
| | | |
| | | public void oneMonitorFileTask(){ |
| | | //计算一机一档注册率、一机一档合格率、档案考核比 |
| | | } |
| | | |
| | | public void platformOnlineTask(){ |
| | | //计算平台在线率 |
| | | //拿到今日离线时长数据 |
| | | Integer time = platformOnlineMapper.sumOffTime(DateUtils.getMouthStart(new Date()),DateUtils.getMouthEnd(new Date())); |
| | | int num = (time / 60) % 30; |
| | | double score = Math.max(1 - num * 0.1,0); |
| | | |
| | | } |
| | | } |