From 7cfa09050726578c2cc5114e5bc8a419e6e2e466 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期二, 15 十月 2024 11:03:45 +0800
Subject: [PATCH] 人脸上传数据延迟修复
---
ycl-server/src/main/java/com/ycl/platform/service/impl/UYErrorTypeCheckServiceImpl.java | 27 ++++++++++++++-------------
1 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/ycl-server/src/main/java/com/ycl/platform/service/impl/UYErrorTypeCheckServiceImpl.java b/ycl-server/src/main/java/com/ycl/platform/service/impl/UYErrorTypeCheckServiceImpl.java
index 871b5db..6b09c17 100644
--- a/ycl-server/src/main/java/com/ycl/platform/service/impl/UYErrorTypeCheckServiceImpl.java
+++ b/ycl-server/src/main/java/com/ycl/platform/service/impl/UYErrorTypeCheckServiceImpl.java
@@ -5,14 +5,17 @@
import com.ycl.platform.service.UYErrorTypeCheckService;
import com.ycl.platform.service.WorkOrderService;
import com.ycl.utils.uuid.IdUtils;
+import constant.ApiConstants;
import enumeration.ErrorType;
import enumeration.general.WorkOrderStatusEnum;
+import lombok.Data;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import java.util.ArrayList;
+import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
@@ -103,11 +106,12 @@
public void videoOnlineCheck(List<VideoOnlineResult> dataList) {
List<WorkOrder> workOrderList = dataList.stream().map(item -> {
WorkOrder workOrder = new WorkOrder();
- if (-1 == item.getStatus()) {
+ if (ApiConstants.UY_OnlineSite_Offline.equals(item.getStatus()) ) {
this.genWorkOrder(workOrder, ErrorType.DEVICE_OFFLINE, item.getDeviceId());
- } else if (0 == item.getStatus()) {
- this.genWorkOrder(workOrder, ErrorType.UNKNOWN, item.getDeviceId());
}
+// else if (0 == item.getStatus()) {
+// this.genWorkOrder(workOrder, ErrorType.UNKNOWN, item.getDeviceId());
+// }
return workOrder;
}).collect(Collectors.toList());
workOrderService.innerAddWorkOrder(workOrderList);
@@ -129,19 +133,19 @@
@Override
- public void osdCheck(List<PyOsdResult> dataList) {
+ public void osdCheck(List<OsdCheckResult> dataList) {
+ Date now = new Date();
List<WorkOrder> workOrderList = dataList.stream().map(item -> {
WorkOrder workOrder = new WorkOrder();
// osd鏃堕棿
- if (!item.getCheckTime().equals(item.getSetTime())) {
+ if (!ApiConstants.OSD_Correct.equals(item.getOsdTimeCorrect())) {
this.genWorkOrder(workOrder, ErrorType.CLOCK_SKEW, item.getDeviceNo());
}
// osd淇℃伅
- if (!"璁剧疆姝g‘".equals(item.getOsd1Province())
- || (!"璁剧疆姝g‘".equals(item.getOsd1City()))
- || (!"璁剧疆姝g‘".equals(item.getOsd1Part()))
- || (!"璁剧疆姝g‘".equals(item.getOsd1TimeFormat()))
- || (!"璁剧疆姝g‘".equals(item.getOsd1OSD()))
+ if (!ApiConstants.OSD_Correct.equals(item.getOsdProvinceCorrect())
+ || (!ApiConstants.OSD_Correct.equals(item.getOsdCityCorrect()))
+ || (!ApiConstants.OSD_Correct.equals(item.getOsdPartCorrect()))
+ || (!ApiConstants.OSD_Correct.equals(item.getOsdNameCorrect()))
) {
this.genWorkOrder(workOrder, ErrorType.OSD_ERROR, item.getDeviceNo());
}
@@ -158,9 +162,6 @@
* @param serialNumber 鍥芥爣鐮�
*/
private void genWorkOrder(WorkOrder workOrder, ErrorType errorType, String serialNumber) {
- if (! StringUtils.hasText(workOrder.getWorkOrderNo())) {
- workOrder.setWorkOrderNo(IdUtils.randomNO());
- }
if (CollectionUtils.isEmpty(workOrder.getErrorTypeList())) {
workOrder.setErrorTypeList(new ArrayList<>());
workOrder.getErrorTypeList().add(errorType.getValue());
--
Gitblit v1.8.0