图像安全资源管理整合,车辆抓拍数据完整和准确计算公式修改
| | |
| | | private BigDecimal videoAvailable; |
| | | |
| | | /** |
| | | * 标注正确率 |
| | | * 部级点位在线率 |
| | | */ |
| | | @Excel(name = "标注正确率") |
| | | @TableField("annotation_accuracy") |
| | | private BigDecimal annotationAccuracy; |
| | | @Excel(name = "部级点位在线率") |
| | | @TableField("ministry_site_online") |
| | | private BigDecimal ministrySiteOnline; |
| | | |
| | | /** |
| | | * 校时准确率 |
| | | * 部级巡检录像可用率 |
| | | */ |
| | | @Excel(name = "校时准确率") |
| | | @TableField("timing_accuracy") |
| | | private BigDecimal timingAccuracy; |
| | | @Excel(name = "部级巡检录像可用率") |
| | | @TableField("ministry_video_available") |
| | | private BigDecimal ministryVideoAvailable; |
| | | |
| | | /** |
| | | * 重点点位在线率 |
| | |
| | | package com.ycl.calculate; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.ycl.platform.base.CheckIndex; |
| | | import com.ycl.platform.domain.entity.CheckIndexCar; |
| | | import com.ycl.platform.domain.entity.TMonitor; |
| | | import com.ycl.platform.domain.result.HK.CrossDetailResult; |
| | | import com.ycl.platform.domain.result.HK.DataIntegrityMonitoringResult; |
| | | import com.ycl.platform.domain.vo.TMonitorVO; |
| | | import com.ycl.platform.mapper.CheckIndexCarMapper; |
| | | import com.ycl.platform.mapper.TMonitorMapper; |
| | | import com.ycl.platform.service.ICheckIndexCarService; |
| | | import com.ycl.platform.service.ITMonitorService; |
| | | import com.ycl.system.mapper.SysConfigMapper; |
| | | import constant.ApiConstants; |
| | | import constant.CheckConstants; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | import utils.DateUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.function.Function; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 计算车辆属性识别准确率、url可用性、大图可用性 |
| | | * 计算车辆抓拍数据准确性、url可用性、大图可用性 |
| | | * 车辆数据抽检接口 |
| | | * 获取分省厅、区域的map<k,v> k为deptId或者Province_deptId |
| | | * 更新或新增 |
| | |
| | | BigDecimal importantTotalSites = new BigDecimal((Integer) param.get("importantTotalSites")); |
| | | BigDecimal integritySites = new BigDecimal((Integer) param.get("integritySites")); |
| | | BigDecimal importantIntegritySites = new BigDecimal((Integer) param.get("importantIntegritySites")); |
| | | BigDecimal result = integritySites.divide(totalSites, 10, RoundingMode.HALF_UP) |
| | | .multiply(importantIntegritySites.divide(importantTotalSites, 10, RoundingMode.HALF_UP)); |
| | | return result.setScale(4, RoundingMode.HALF_UP); |
| | | BigDecimal total = BigDecimal.ZERO.compareTo(totalSites) == 0 ? BigDecimal.ZERO : integritySites.divide(totalSites, 10, RoundingMode.HALF_UP); |
| | | BigDecimal important = BigDecimal.ZERO.compareTo(importantTotalSites) == 0 ? BigDecimal.ZERO : importantIntegritySites.divide(importantTotalSites, 10, RoundingMode.HALF_UP); |
| | | return total.multiply(important).setScale(4, RoundingMode.HALF_UP); |
| | | } |
| | | |
| | | //车辆数据完整性 |
| | |
| | | BigDecimal importantTotalSites = new BigDecimal((Integer) param.get("importantTotalSites")); |
| | | BigDecimal accuracySites = new BigDecimal((Integer) param.get("accuracySites")); |
| | | BigDecimal importantAccuracySites = new BigDecimal((Integer) param.get("importantAccuracySites")); |
| | | BigDecimal result = accuracySites.divide(totalSites, 10, RoundingMode.HALF_UP) |
| | | .add(importantAccuracySites.divide(importantTotalSites, 10, RoundingMode.HALF_UP)); |
| | | return result.setScale(4, RoundingMode.HALF_UP); |
| | | BigDecimal total = BigDecimal.ZERO.compareTo(totalSites) == 0 ? BigDecimal.ZERO : accuracySites.divide(totalSites, 10, RoundingMode.HALF_UP); |
| | | BigDecimal important = BigDecimal.ZERO.compareTo(importantTotalSites) == 0 ? BigDecimal.ZERO : importantAccuracySites.divide(importantTotalSites, 10, RoundingMode.HALF_UP); |
| | | return total.multiply(important).setScale(4, RoundingMode.HALF_UP); |
| | | } |
| | | |
| | | //时钟准确性 |
| | |
| | | |
| | | //返回monitor |
| | | public List<String> getMonitorFromMongo() { |
| | | Query query = new Query(Criteria.where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | Date yesterday = DateUtils.addDays(new Date(), -1); |
| | | Query query = new Query(Criteria.where("mongoCreateTime").gte(DateUtils.getDayStart(yesterday)).lt(DateUtils.getDayEnd(yesterday))); |
| | | List<MonitorQualifyResult> oneMachineFileResults = mongoTemplate.find(query, MonitorQualifyResult.class); |
| | | |
| | | return CollectionUtils.isEmpty(oneMachineFileResults) ? new ArrayList<>() : oneMachineFileResults.stream().map(result -> result.getSerialNumber().getValue()).collect(Collectors.toList()); |
| | |
| | | int newSites = 0; |
| | | //全年留存数 |
| | | int allFiles = 0; |
| | | //当日档案数 |
| | | //当日档案数(凌晨计算的,实际取得是昨日的一机一档数量) |
| | | int todayFiles = 0; |
| | | } |
| | | |
| | |
| | | /** |
| | | * 累计总点位数、在线点位数、重点点位数、重点点位在线数、指挥图像数、指挥图像在线数 |
| | | */ |
| | | private void updateAreaStats(Map<String, AreaStats> areaStatsMap, String key, TMonitorVO result, Map<String, TMonitor> newMonitors, List<String> todayMonitor) { |
| | | private void updateAreaStats(Map<String, AreaStats> areaStatsMap, String key, TMonitorVO result, Map<String, TMonitor> newMonitors, List<String> yesterdayMonitor) { |
| | | //返回对象的引用,如果不存在会放入新的key,value |
| | | AreaStats stats = areaStatsMap.computeIfAbsent(key, k -> new AreaStats()); |
| | | stats.totalSites++; |
| | |
| | | if (newMonitors.containsKey(result.getSerialNumber())) { |
| | | stats.newSites++; |
| | | } |
| | | if (todayMonitor.contains(result.getSerialNumber())) { |
| | | if (yesterdayMonitor.contains(result.getSerialNumber())) { |
| | | stats.todayFiles++; |
| | | } |
| | | } |
| | |
| | | private ICheckIndexVideoService checkIndexVideoService; |
| | | |
| | | @Override |
| | | //TODO:分区域 |
| | | public void calculate(List<PlatformOnlineVO> list) { |
| | | if (!CollectionUtils.isEmpty(list)) { |
| | | //总离线时长 |
| | |
| | | //区域视频在线率的内部类 |
| | | private static class AreaStats { |
| | | int totalSites = 0; |
| | | int osdAccuracySites = 0; |
| | | int timeAccuracySites = 0; |
| | | |
| | | int importantTotalSites = 0; |
| | | int importantOsdAccuracySites = 0; |
| | |
| | | //返回对象的引用,如果不存在会放入新的key,value |
| | | AreaStats stats = areaStatsMap.computeIfAbsent(key, k -> new AreaStats()); |
| | | stats.totalSites++; |
| | | //校验osd |
| | | if (checkOsd(result)) { |
| | | stats.osdAccuracySites++; |
| | | } |
| | | //校验时间偏差 |
| | | if (checkTime(result)) { |
| | | stats.timeAccuracySites++; |
| | | } |
| | | |
| | | //重点点位 |
| | | if (important.contains(result.getDeviceNo())) { |
| | | stats.importantTotalSites++; |
| | |
| | | if (checkIndexVideo == null) { |
| | | return null; |
| | | } |
| | | //调用osd标注计算方法 |
| | | Map<String, Object> param = new HashMap<>(); |
| | | param.put("totalSites", stats.totalSites); |
| | | param.put("osdAccuracySites", stats.osdAccuracySites); |
| | | BigDecimal osdAccuracy = osdAccuracy(param); |
| | | checkIndexVideo.setAnnotationAccuracy(osdAccuracy); |
| | | |
| | | //调用osd标注计算方法 计算重点osd标注 |
| | | Map<String, Object> importantParam = new HashMap<>(); |
| | | importantParam.put("totalSites", stats.importantTotalSites); |
| | |
| | | BigDecimal imOsdAccuracy = osdAccuracy(importantParam); |
| | | checkIndexVideo.setKeyAnnotationAccuracy(imOsdAccuracy); |
| | | |
| | | //调用osd时间准确率 |
| | | Map<String, Object> timeParam = new HashMap<>(); |
| | | timeParam.put("totalSites", stats.totalSites); |
| | | timeParam.put("timeAccuracySites", stats.timeAccuracySites); |
| | | BigDecimal osdTimeAccuracy = osdTimeAccuracy(timeParam); |
| | | checkIndexVideo.setTimingAccuracy(osdTimeAccuracy); |
| | | //调用osd时间准确率,计算重点 |
| | | Map<String, Object> importantTimeParam = new HashMap<>(); |
| | | importantTimeParam.put("totalSites", stats.importantTotalSites); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 视频:点位在线率 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @GetMapping("/videoPointOnlineRate") |
| | | public Result videoPointOnlineRate(DataCenterQuery query) { |
| | | return dataCenterService.videoPointOnlineRate(query); |
| | | } |
| | | |
| | | /** |
| | | * 视频:一机一档注册率 |
| | | * |
| | | * @param query |
| | |
| | | } |
| | | |
| | | /** |
| | | * 视频:录像可用率 |
| | | * 视频:点位在线率 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @GetMapping("/videoAvailabilityRate") |
| | | public Result videoAvailabilityRate(DataCenterQuery query) { |
| | | @GetMapping("/videoPointOnlineRate") |
| | | public Result videoPointOnlineRate(DataCenterQuery query) { |
| | | return dataCenterService.videoPointOnlineRate(query); |
| | | } |
| | | |
| | | /** |
| | | * 视频:部级点位在线率 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @GetMapping("/videoMinistrySiteOnline") |
| | | public Result videoMinistrySiteOnline(DataCenterQuery query) { |
| | | return dataCenterService.videoAvailabilityRate(query); |
| | | } |
| | | |
| | | /** |
| | | * 视频:部级巡检录像可用率 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @GetMapping("/videoMinistryVideoAvailable") |
| | | public Result videoMinistryVideoAvailable(DataCenterQuery query) { |
| | | return dataCenterService.videoLabelingAccuracy(query); |
| | | } |
| | | |
| | | /** |
| | |
| | | @GetMapping("/videoImportantPointAvailabilityRate") |
| | | public Result videoImportantPointAvailabilityRate(DataCenterQuery query) { |
| | | return dataCenterService.videoImportantPointAvailabilityRate(query); |
| | | } |
| | | |
| | | /** |
| | | * 视频:标注正确率 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @GetMapping("/videoLabelingAccuracy") |
| | | public Result videoLabelingAccuracy(DataCenterQuery query) { |
| | | return dataCenterService.videoLabelingAccuracy(query); |
| | | } |
| | | |
| | | /** |
| | |
| | | package com.ycl.task; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.mongodb.client.result.DeleteResult; |
| | | import com.ycl.api.DH.module.LoginModule; |
| | | import com.ycl.api.DH.utils.DHApi; |
| | | import com.ycl.api.HK.HKApi; |
| | | import com.ycl.api.YS.YSApi; |
| | | import com.ycl.api.YS.YSInit; |
| | | import com.ycl.platform.domain.entity.TMonitor; |
| | | import com.ycl.platform.domain.result.OSDResult; |
| | | import com.ycl.platform.domain.result.UY.MonitorQualifyResult; |
| | |
| | | public void getOSD() { |
| | | log.info("开始获取OSD"); |
| | | // YSApi.getOsd("51.95.66.42",YSUserName,YSPassword); |
| | | |
| | | // DHApi.getOsd("51.95.67.189",DHUserName,DHPassword); |
| | | //批量修改海康品牌集合 |
| | | List<String> hkList = new ArrayList<>(); |
| | | //批量修改大华品牌集合 |
| | |
| | | log.info("结束执行录像可用数据同步"); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.ycl.calculate.CalculationStrategy; |
| | | import com.ycl.factory.IndexCalculationFactory; |
| | | import com.ycl.platform.domain.entity.CheckIndexVideo; |
| | | import com.ycl.platform.domain.entity.ImageResourceSecurity; |
| | | import com.ycl.platform.domain.entity.ImageResourceSecurityDetail; |
| | | import com.ycl.platform.domain.result.UY.*; |
| | | import com.ycl.platform.domain.vo.PlatformOnlineVO; |
| | | import com.ycl.platform.domain.vo.TMonitorVO; |
| | | import com.ycl.platform.mapper.CheckIndexVideoMapper; |
| | | import com.ycl.platform.mapper.ImageResourceSecurityDetailMapper; |
| | | import com.ycl.platform.mapper.PlatformOnlineMapper; |
| | | import com.ycl.platform.mapper.TMonitorMapper; |
| | | import com.ycl.platform.service.IImageResourceSecurityService; |
| | | import com.ycl.utils.DateUtils; |
| | | import com.ycl.utils.DictUtils; |
| | | import constant.CalculationStrategyConstants; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.mongodb.core.MongoTemplate; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 视频计算考核指标任务 |
| | |
| | | */ |
| | | @Slf4j |
| | | @Component("videoTask") |
| | | @RequiredArgsConstructor |
| | | public class VideoTask { |
| | | @Autowired |
| | | private MongoTemplate mongoTemplate; |
| | |
| | | private PlatformOnlineMapper platformOnlineMapper; |
| | | @Autowired |
| | | private TMonitorMapper monitorMapper; |
| | | |
| | | private final IImageResourceSecurityService imageResourceSecurityService; |
| | | private final CheckIndexVideoMapper checkIndexVideoMapper; |
| | | private final ImageResourceSecurityDetailMapper imageResourceSecurityDetailMapper; |
| | | private static final BigDecimal NUM = new BigDecimal("0.15"); |
| | | |
| | | public void siteOnlineTask() { |
| | | Date yesterday = DateUtils.addDays(new Date(), -1); |
| | |
| | | public void oneMonitorQualifyTask(){ |
| | | //计算一机一档合格率 |
| | | Date yesterday = DateUtils.addDays(new Date(), -1); |
| | | |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria |
| | | .where("mongoCreateTime").gte(DateUtils.getDayStart(yesterday)).lt(DateUtils.getDayEnd(yesterday))); |
| | |
| | | calculator.calculate(results); |
| | | } |
| | | |
| | | /** |
| | | * 视频图像资源安全,需要排在平台在线率后面。 |
| | | */ |
| | | @Transactional |
| | | public void videoSecurity() { |
| | | ArrayList<ImageResourceSecurity> imageResourceSecurities = new ArrayList<>(); |
| | | List<CheckIndexVideo> list = checkIndexVideoMapper.selectAndDeptName(); |
| | | List<ImageResourceSecurityDetail> detail = imageResourceSecurityDetailMapper.getList(); |
| | | |
| | | // 每个部门循环一次计算数据 |
| | | for (CheckIndexVideo checkIndexVideo : list) { |
| | | ImageResourceSecurity imageResourceSecurity = new ImageResourceSecurity(); |
| | | imageResourceSecurity.setDeptId(checkIndexVideo.getDeptId()); |
| | | // 直接取指标 |
| | | imageResourceSecurity.setPlatformOnline(checkIndexVideo.getPlatformOnline()); |
| | | imageResourceSecurity.setPropertyAccuracy(checkIndexVideo.getMonitorQualification()); |
| | | // 获取当前部门的detail进行计算 |
| | | List<ImageResourceSecurityDetail> detailList = detail.stream().filter(imageResourceSecurityDetail -> Objects.equals(imageResourceSecurityDetail.getDeptId(), checkIndexVideo.getDeptId())).toList(); |
| | | int score = 100; |
| | | int count = 0; |
| | | // 循环detail计算 |
| | | for (ImageResourceSecurityDetail imageResourceSecurityDetail : detailList) { |
| | | // 扣除分数 |
| | | score -= imageResourceSecurityDetail.getAlarmCategory().getScore(); |
| | | // 统计数量 |
| | | if (Integer.parseInt(imageResourceSecurityDetail.getAlarmLevel().getValue()) > 1) { |
| | | count++; |
| | | } |
| | | } |
| | | imageResourceSecurity.setWeakPassword(BigDecimal.valueOf(score)); |
| | | // 获取字典值-总数 |
| | | int onlineAssetsTotal = Integer.parseInt(DictUtils.getDictValue("online_assets_total", checkIndexVideo.getDeptName())); |
| | | imageResourceSecurity.setRiskProperty(BigDecimal.valueOf(count / onlineAssetsTotal)); |
| | | imageResourceSecurity.setCreateTime(DateUtils.getNowDate()); |
| | | imageResourceSecurities.add(imageResourceSecurity); |
| | | // 更新指标数据 |
| | | checkIndexVideo.setImageResourceSecurity(imageResourceSecurity.getPlatformOnline().add(imageResourceSecurity.getPropertyAccuracy().add(imageResourceSecurity.getWeakPassword().add(imageResourceSecurity.getRiskProperty()))).multiply(NUM)); |
| | | checkIndexVideoMapper.updateById(checkIndexVideo); |
| | | } |
| | | imageResourceSecurityService.saveBatch(imageResourceSecurities); |
| | | |
| | | } |
| | | } |
| | |
| | | spring: |
| | | # 数据源配置 |
| | | datasource: |
| | | url: jdbc:mysql://127.0.0.1/zgyw?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&allowMultiQueries=true&allowPublicKeyRetrieval=true |
| | | url: jdbc:mysql://101.35.247.188/zgyw?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&allowMultiQueries=true&allowPublicKeyRetrieval=true |
| | | username: root |
| | | password: 123456 |
| | | password: ycl@202466 |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | |
| | |
| | | spring.data: |
| | | redis: |
| | | # 地址 |
| | | # host: 42.193.1.25 |
| | | host: 127.0.0.1 |
| | | host: 42.193.1.25 |
| | | # host: 127.0.0.1 |
| | | # 端口,默认为6379 |
| | | port: 6379 |
| | | # password: ycl2018 |
| | | password: ycl2018 |
| | | # password: |
| | | # 数据库索引 |
| | | database: 0 |
| | |
| | | <result property="archivesRate" column="archives_rate" /> |
| | | <result property="siteOnline" column="site_online" /> |
| | | <result property="videoAvailable" column="video_available" /> |
| | | <result property="annotationAccuracy" column="annotation_accuracy" /> |
| | | <result property="timingAccuracy" column="timing_accuracy" /> |
| | | <result property="ministrySiteOnline" column="ministry_site_online" /> |
| | | <result property="ministryVideoAvailable" column="ministry_video_available" /> |
| | | <result property="keySiteOnline" column="key_site_online" /> |
| | | <result property="keyVideoAvailable" column="key_video_available" /> |
| | | <result property="keyAnnotationAccuracy" column="key_annotation_accuracy" /> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectCheckIndexVideoVo"> |
| | | select id, dept_id, create_time, examine_tag, platform_online, monitor_qualification, monitor_registration, archives_rate, site_online, video_available, annotation_accuracy, timing_accuracy, key_site_online, key_video_available, key_annotation_accuracy, key_timing_accuracy, key_command_image_online,image_resource_security from t_check_index_video |
| | | select id, dept_id, create_time, examine_tag, platform_online, monitor_qualification, monitor_registration, archives_rate, site_online, video_available, ministry_site_online, ministry_video_available, key_site_online, key_video_available, key_annotation_accuracy, key_timing_accuracy, key_command_image_online,image_resource_security from t_check_index_video |
| | | </sql> |
| | | |
| | | <select id="selectCheckIndexVideoList" parameterType="CheckIndexVideo" resultMap="CheckIndexVideoResult"> |
| | |
| | | <if test="archivesRate != null "> and archives_rate = #{archivesRate}</if> |
| | | <if test="siteOnline != null "> and site_online = #{siteOnline}</if> |
| | | <if test="videoAvailable != null "> and video_available = #{videoAvailable}</if> |
| | | <if test="annotationAccuracy != null "> and annotation_accuracy = #{annotationAccuracy}</if> |
| | | <if test="timingAccuracy != null "> and timing_accuracy = #{timingAccuracy}</if> |
| | | <if test="ministrySiteOnline != null "> and ministry_site_online = #{ministrySiteOnline}</if> |
| | | <if test="ministryVideoAvailable != null "> and ministry_video_available = #{ministryVideoAvailable}</if> |
| | | <if test="keySiteOnline != null "> and key_site_online = #{keySiteOnline}</if> |
| | | <if test="keyVideoAvailable != null "> and key_video_available = #{keyVideoAvailable}</if> |
| | | <if test="keyAnnotationAccuracy != null "> and key_annotation_accuracy = #{keyAnnotationAccuracy}</if> |
| | |
| | | <if test="archivesRate != null">archives_rate,</if> |
| | | <if test="siteOnline != null">site_online,</if> |
| | | <if test="videoAvailable != null">video_available,</if> |
| | | <if test="annotationAccuracy != null">annotation_accuracy,</if> |
| | | <if test="timingAccuracy != null">timing_accuracy,</if> |
| | | <if test="ministrySiteOnline != null">ministry_site_online,</if> |
| | | <if test="ministryVideoAvailable != null">ministry_video_available,</if> |
| | | <if test="keySiteOnline != null">key_site_online,</if> |
| | | <if test="keyVideoAvailable != null">key_video_available,</if> |
| | | <if test="keyAnnotationAccuracy != null">key_annotation_accuracy,</if> |
| | |
| | | <if test="archivesRate != null">#{archivesRate},</if> |
| | | <if test="siteOnline != null">#{siteOnline},</if> |
| | | <if test="videoAvailable != null">#{videoAvailable},</if> |
| | | <if test="annotationAccuracy != null">#{annotationAccuracy},</if> |
| | | <if test="timingAccuracy != null">#{timingAccuracy},</if> |
| | | <if test="ministrySiteOnline != null">#{ministrySiteOnline},</if> |
| | | <if test="ministryVideoAvailable != null">#{ministryVideoAvailable},</if> |
| | | <if test="keySiteOnline != null">#{keySiteOnline},</if> |
| | | <if test="keyVideoAvailable != null">#{keyVideoAvailable},</if> |
| | | <if test="keyAnnotationAccuracy != null">#{keyAnnotationAccuracy},</if> |
| | |
| | | <if test="archivesRate != null">archives_rate = #{archivesRate},</if> |
| | | <if test="siteOnline != null">site_online = #{siteOnline},</if> |
| | | <if test="videoAvailable != null">video_available = #{videoAvailable},</if> |
| | | <if test="annotationAccuracy != null">annotation_accuracy = #{annotationAccuracy},</if> |
| | | <if test="timingAccuracy != null">timing_accuracy = #{timingAccuracy},</if> |
| | | <if test="ministrySiteOnline != null">ministry_site_online = #{ministrySiteOnline},</if> |
| | | <if test="ministryVideoAvailable != null">ministry_video_available = #{ministryVideoAvailable},</if> |
| | | <if test="keySiteOnline != null">key_site_online = #{keySiteOnline},</if> |
| | | <if test="keyVideoAvailable != null">key_video_available = #{keyVideoAvailable},</if> |
| | | <if test="keyAnnotationAccuracy != null">key_annotation_accuracy = #{keyAnnotationAccuracy},</if> |
| | |
| | | IFNULL(ROUND(AVG(archives_rate * 100), 0), 0) AS archives_rate, |
| | | IFNULL(ROUND(AVG(site_online * 100), 0), 0) AS site_online, |
| | | IFNULL(ROUND(AVG(video_available * 100), 0), 0) AS video_available, |
| | | IFNULL(ROUND(AVG(annotation_accuracy * 100), 0), 0) AS annotation_accuracy, |
| | | IFNULL(ROUND(AVG(timing_accuracy * 100), 0), 0) AS timing_accuracy, |
| | | IFNULL(ROUND(AVG(ministry_site_online * 100), 0), 0) AS ministry_site_online, |
| | | IFNULL(ROUND(AVG(ministry_video_available * 100), 0), 0) AS ministry_video_available, |
| | | IFNULL(ROUND(AVG(key_site_online * 100), 0), 0) AS key_site_online, |
| | | IFNULL(ROUND(AVG(key_video_available * 100), 0), 0) AS key_video_available, |
| | | IFNULL(ROUND(AVG(key_annotation_accuracy * 100), 0), 0) AS key_annotation_accuracy, |