| | |
| | | import com.ycl.calculate.CalculationStrategy; |
| | | import com.ycl.factory.IndexCalculationFactory; |
| | | import com.ycl.platform.domain.result.HK.*; |
| | | import com.ycl.platform.domain.vo.TMonitorVO; |
| | | import com.ycl.platform.mapper.TMonitorMapper; |
| | | import com.ycl.utils.DateUtils; |
| | | import constant.ApiConstants; |
| | | import constant.CalculationStrategyConstants; |
| | | import constant.CheckConstants; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.mongodb.core.MongoTemplate; |
| | |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 人脸计算考核指标任务 |
| | |
| | | public class FaceTask { |
| | | @Autowired |
| | | private MongoTemplate mongoTemplate; |
| | | @Autowired |
| | | private TMonitorMapper monitorMapper; |
| | | |
| | | public void siteOnlineTask() { |
| | | Date yesterday = DateUtils.addDays(new Date(), -1); |
| | |
| | | calculator.calculate(results); |
| | | } |
| | | |
| | | public void test() { |
| | | Date yesterday = DateUtils.addDays(new Date(), -1); |
| | | //TODO:一机一档 联网卡口设备目录一致率 |
| | | public void directConsistentTask() { |
| | | //人脸目录一致率 |
| | | List<TMonitorVO> tMonitorVOS = monitorMapper.selectMonitorVOList(); |
| | | List<TMonitorVO> list = tMonitorVOS.stream().filter(tMonitorVO -> tMonitorVO.getCameraFunType().contains(CheckConstants.Rule_Category_Face + "")).collect(Collectors.toList()); |
| | | CalculationStrategy calculator = IndexCalculationFactory.getCalculator(CalculationStrategyConstants.Face_DirectConsistent); |
| | | calculator.calculate(list); |
| | | } |
| | | } |