| | |
| | | package com.ycl.platform.domain.result.HK; |
| | | |
| | | import com.ycl.platform.domain.result.BaseResult; |
| | | import com.ycl.platform.domain.vo.DataCenter.BigPicUsefulVO; |
| | | import lombok.Data; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.data.mongodb.core.index.TextIndexed; |
| | | import org.springframework.data.mongodb.core.mapping.Document; |
| | | |
| | |
| | | */ |
| | | private Integer osdExpCount; |
| | | |
| | | public static BigDecimal calUrl(BigUsefulness bigUseful) { |
| | | BigDecimal url = BigDecimal.ZERO; |
| | | if (bigUseful.getSampleCount() != 0) { |
| | | //图片访问正常量 = 抽检量-异常量 |
| | | BigDecimal picNormalCount = new BigDecimal(bigUseful.getSampleCount() - bigUseful.getBigPicExpCount()); |
| | | //图片抽检量 |
| | | BigDecimal sampleCount = new BigDecimal(bigUseful.getSampleCount()); |
| | | url = picNormalCount.divide(sampleCount, 4, RoundingMode.HALF_UP); |
| | | } |
| | | return url; |
| | | } |
| | | } |
| | | |
| | | @Data |
| | |
| | | */ |
| | | private Integer unfaceEligCount; |
| | | } |
| | | |
| | | public static BigPicUsefulVO getPicVO(FaceDeviceSamplingResult result){ |
| | | BigPicUsefulVO vo = new BigPicUsefulVO(); |
| | | BeanUtils.copyProperties(result,vo); |
| | | vo.setBigPicExpCount(result.getBigUseful().getBigPicExpCount()); |
| | | vo.setBigUsefulPercent(result.getBigUseful().getBigUsefulPercent()); |
| | | vo.setSampleCount(result.getBigUseful().getSampleCount()); |
| | | vo.setOsdExpCount(result.getBigUseful().getOsdExpCount()); |
| | | vo.setImgDiffCount(result.getBigUseful().getImgDiffCount()); |
| | | return vo; |
| | | } |
| | | public static BigPicUsefulVO getEligeVO(FaceDeviceSamplingResult result){ |
| | | BigPicUsefulVO vo = new BigPicUsefulVO(); |
| | | BeanUtils.copyProperties(result,vo); |
| | | vo.setSampleCount(result.getFaceEligibility().getSampleCount()); |
| | | vo.setUnfaceEligCount(result.getFaceEligibility().getUnfaceEligCount()); |
| | | vo.setFaceEligPercent(result.getFaceEligibility().getFaceEligPercent()); |
| | | return vo; |
| | | } |
| | | } |