| | |
| | | import com.ycl.platform.domain.vo.WorkOrderVO; |
| | | import com.ycl.platform.mapper.*; |
| | | import com.ycl.platform.service.IContractScoreService; |
| | | import com.ycl.system.mapper.SysConfigMapper; |
| | | import com.ycl.utils.DateUtils; |
| | | import com.ycl.utils.StringUtils; |
| | | import constant.ApiConstants; |
| | | import enumeration.ContractRule; |
| | | import enumeration.ErrorType; |
| | |
| | | private IContractScoreService contractScoreService; |
| | | @Autowired |
| | | private WorkOrderMapper workOrderMapper; |
| | | |
| | | @Autowired |
| | | private SysConfigMapper sysConfigMapper; |
| | | private static final Integer Online = 1; |
| | | private static final Integer Offline = -1; |
| | | private static final String AuditStatus_Pass = "1"; |
| | |
| | | */ |
| | | public void randomDeductPic() { |
| | | Random random = new Random(); |
| | | Integer num = randomSize; |
| | | //给定随机范围 |
| | | int number = random.nextInt(randomSize); |
| | | String count = sysConfigMapper.checkConfigKeyUnique("check.contract.sample").getConfigValue(); |
| | | if (!StringUtils.isEmpty(count)) { |
| | | Integer temp = Integer.valueOf(count); |
| | | if (temp > 0) { |
| | | num = temp; |
| | | } |
| | | } |
| | | int number = random.nextInt(num); |
| | | if (number == 0) { |
| | | log.info("开始抽查图片完整状态"); |
| | | //准备批量打分的集合 |
| | |
| | | queryWrapper.in("serial_number", serialNumbers); |
| | | //获取公司所运维的设备集合,key为unitId value为设备国标码集合 |
| | | Map<Long, List<String>> unitMonitorMap = ywPointMapper.selectList(queryWrapper).stream() |
| | | .collect(Collectors.groupingBy(YwPoint::getUnitId, |
| | | .filter(ywPoint -> ywPoint.getUnitId()!=null).collect(Collectors.groupingBy(YwPoint::getUnitId, |
| | | Collectors.mapping( |
| | | YwPoint::getSerialNumber, |
| | | Collectors.toList()))); |
| | |
| | | public void randomDeductVideo() { |
| | | Random random = new Random(); |
| | | //给定随机范围 |
| | | int number = random.nextInt(randomSize); |
| | | Integer num = randomSize; |
| | | //给定随机范围 |
| | | String count = sysConfigMapper.checkConfigKeyUnique("check.contract.sample").getConfigValue(); |
| | | if (!StringUtils.isEmpty(count)) { |
| | | Integer temp = Integer.valueOf(count); |
| | | if (temp > 0) { |
| | | num = temp; |
| | | } |
| | | } |
| | | int number = random.nextInt(num); |
| | | if (number == 0) { |
| | | log.info("开始抽查录像完整状态"); |
| | | //准备批量打分的集合 |
| | |
| | | queryWrapper.in("serial_number", serialNumbers); |
| | | //获取公司所运维的设备集合,key为unitId value为设备国标码集合 |
| | | Map<Long, List<String>> unitMonitorMap = ywPointMapper.selectList(queryWrapper).stream() |
| | | .collect(Collectors.groupingBy(YwPoint::getUnitId, |
| | | .filter(ywPoint -> ywPoint.getUnitId()!=null).collect(Collectors.groupingBy(YwPoint::getUnitId, |
| | | Collectors.mapping( |
| | | YwPoint::getSerialNumber, |
| | | Collectors.toList()))); |