| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.entity.WorkOrder; |
| | | import com.ycl.platform.domain.entity.YwThreshold; |
| | | import com.ycl.platform.domain.excel.PointExport; |
| | | import com.ycl.platform.domain.result.HK.FaceDeviceInspectionResult; |
| | | import com.ycl.platform.domain.result.HK.VehicleDeviceInspectionResult; |
| | | import com.ycl.platform.domain.vo.DynamicColumnVO; |
| | | import com.ycl.platform.mapper.YwThresholdMapper; |
| | | import com.ycl.platform.service.IYwThresholdService; |
| | | import com.ycl.platform.service.WorkOrderService; |
| | | import com.ycl.system.Result; |
| | | import com.ycl.utils.ip.PingUtil; |
| | | import com.ycl.utils.poi.EasyExcelImportUtils; |
| | | import com.ycl.utils.uuid.IdUtils; |
| | | import constant.PointHeaderConstant; |
| | | import constant.YwThreadConstants; |
| | | import enumeration.CompareType; |
| | | import enumeration.ErrorType; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import utils.DateUtils; |
| | | |
| | | import java.util.*; |
| | |
| | | // 亮度异常故障检测 |
| | | } |
| | | |
| | | @Override |
| | | public Result importData(MultipartFile file) { |
| | | List<Map<String, String>> list = EasyExcelImportUtils.makeData(file); |
| | | List<PointExport> dataList = new ArrayList<>(); |
| | | for (Map<String, String> map : list) { |
| | | PointExport pointExport = new PointExport(); |
| | | pointExport.setPointName(map.get(PointHeaderConstant.Point_Name)); |
| | | pointExport.setSerialNumber(map.get(PointHeaderConstant.Serial_Number)); |
| | | dataList.add(pointExport); |
| | | } |
| | | workOrderService.batchImportWhite(dataList); |
| | | return Result.ok("导入成功"); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 判断人脸阈值是否满足下发条件 |
| | | * |
| | |
| | | check(YwThreadConstants.Face_NouniqueCount, nouniqueCount, result.getExternalIndexCode(), thresholdMap, workOrder, CompareType.MORE_THAN_EQ, ErrorType.NOT_UNIQUE_DATA_VOLUME.getValue()); |
| | | //检查人脸低评分率 |
| | | Float lowScorePercent = result.getSnapValidity().getLowScorePercent(); |
| | | check(YwThreadConstants.Face_LowScorePercent, lowScorePercent, result.getExternalIndexCode(), thresholdMap, workOrder, CompareType.LESS_THAN_EQ, ErrorType.FACE_LOW.getValue()); |
| | | check(YwThreadConstants.Face_LowScorePercent, lowScorePercent, result.getExternalIndexCode(), thresholdMap, workOrder, CompareType.MORE_THAN_EQ, ErrorType.FACE_LOW.getValue()); |
| | | //检查建模失败率 |
| | | Float failPercent = result.getSnapValidity().getFailPercent(); |
| | | check(YwThreadConstants.Face_FailPercent, failPercent, result.getExternalIndexCode(), thresholdMap, workOrder, CompareType.LESS_THAN_EQ, ErrorType.MODELING_FAIL.getValue()); |
| | | check(YwThreadConstants.Face_FailPercent, failPercent, result.getExternalIndexCode(), thresholdMap, workOrder, CompareType.MORE_THAN_EQ, ErrorType.MODELING_FAIL.getValue()); |
| | | // 点位在线率 |
| | | if (2 == result.getSnapResult()) { |
| | | workOrder.setSerialNumber(result.getExternalIndexCode()); |
| | |
| | | //检查白天未识别量 |
| | | Integer dayNoNumberCountResult = result.getSnapPlate().getDayNoNumberCount(); |
| | | check(YwThreadConstants.Car_DayNoNumberCount, dayNoNumberCountResult, result.getExternalIndexCode(), thresholdMap, workOrder, CompareType.MORE_THAN_EQ, ErrorType.UNRECOGNIZED_DAY_VOLUME.getValue()); |
| | | //车辆六项属性不完整量 |
| | | Integer noIntegrityCountResult = result.getIntegrity().getNoIntegrityCount(); |
| | | //车辆主要属性不完整率 |
| | | Integer noIntegrityCountResult = result.getIntegrity().getMainNoIntegrityCount(); |
| | | check(YwThreadConstants.Car_NoIntegrityCount, noIntegrityCountResult, result.getExternalIndexCode(), thresholdMap, workOrder, CompareType.MORE_THAN_EQ, ErrorType.CAR_SIX.getValue()); |
| | | // 点位在线率 |
| | | if (2 == result.getSnapResult()) { |