From d8391959627eeba172c57763d1fb22f68256bbff Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期三, 13 十一月 2024 18:53:52 +0800 Subject: [PATCH] OSD通过国标码判断通道、数据中心车辆人脸在线率离线时间点 --- ycl-server/src/main/java/com/ycl/platform/service/impl/YwThresholdServiceImpl.java | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ycl-server/src/main/java/com/ycl/platform/service/impl/YwThresholdServiceImpl.java b/ycl-server/src/main/java/com/ycl/platform/service/impl/YwThresholdServiceImpl.java index 2aafe2f..8728731 100644 --- a/ycl-server/src/main/java/com/ycl/platform/service/impl/YwThresholdServiceImpl.java +++ b/ycl-server/src/main/java/com/ycl/platform/service/impl/YwThresholdServiceImpl.java @@ -261,9 +261,11 @@ //妫�鏌ョ櫧澶╂湭璇嗗埆閲� 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().getMainNoIntegrityCount(); - check(YwThreadConstants.Car_NoIntegrityCount, noIntegrityCountResult, result.getExternalIndexCode(), thresholdMap, workOrder, CompareType.MORE_THAN_EQ, ErrorType.CAR_SIX.getValue()); + Integer dataCount = result.getDataCount(); + Double integrityRate = ((double)dataCount-noIntegrityCountResult)/dataCount; + check(YwThreadConstants.Car_NoIntegrityCount, integrityRate, result.getExternalIndexCode(), thresholdMap, workOrder, CompareType.LESS_THAN_EQ, ErrorType.CAR_SIX.getValue()); // 鐐逛綅鍦ㄧ嚎鐜� if (2 == result.getSnapResult()) { workOrder.setSerialNumber(result.getExternalIndexCode()); @@ -322,6 +324,14 @@ T thresholdAutoValue = parseThreshold(ywThreshold.getValueAuto(), value.getClass()); //鐩存帴涓嬪彂宸ュ崟闃堝�� T thresholdValue = parseThreshold(ywThreshold.getValue(), value.getClass()); + if("percent".equals(ywThreshold.getCountType())){ + if (thresholdAutoValue instanceof Float) { + thresholdAutoValue = (T) Float.valueOf(((Float) thresholdAutoValue) / 100f); + } + if (thresholdValue instanceof Float) { + thresholdValue = (T) Float.valueOf(((Float) thresholdValue) / 100f); + } + } //姣旇緝澶у皬锛屽姞鍏ュ埌瀵瑰簲寰呭鐞嗛泦鍚� if (compareType.compare(v, thresholdValue)) { //杩涘叆宸ュ崟鐩存帴涓嬪彂 -- Gitblit v1.8.0