From 74ac7af1acc588fee71d3d982c633dd841ead6e3 Mon Sep 17 00:00:00 2001
From: liuhaonan <31457034@qq.com>
Date: 星期五, 12 八月 2022 16:08:30 +0800
Subject: [PATCH] changes
---
ximon-admin/src/main/java/com/sandu/ximon/admin/service/LightReportErrorService.java | 33 +++++++++++++++++++++++++++++----
1 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/ximon-admin/src/main/java/com/sandu/ximon/admin/service/LightReportErrorService.java b/ximon-admin/src/main/java/com/sandu/ximon/admin/service/LightReportErrorService.java
index b38cff0..5e5556a 100644
--- a/ximon-admin/src/main/java/com/sandu/ximon/admin/service/LightReportErrorService.java
+++ b/ximon-admin/src/main/java/com/sandu/ximon/admin/service/LightReportErrorService.java
@@ -1,6 +1,7 @@
package com.sandu.ximon.admin.service;
import com.github.pagehelper.PageHelper;
+import com.sandu.common.object.BaseConditionVO;
import com.sandu.common.service.impl.BaseServiceImpl;
import com.sandu.ximon.admin.manager.iot.frame.inner.report.A5LightErrorCodeReportInnerFrame;
import com.sandu.ximon.admin.manager.iot.rrpc.enums.LightErrorEnum;
@@ -26,14 +27,14 @@
save(lightReportError);
}
- public List<LightReportErrorBo> listReportError(int pageNo, int pageSize, String keyword) {
+ public List<LightReportErrorBo> listReportError(int pageNo, int pageSize, String keyword, Integer error_code) {
PageHelper.startPage(pageNo, pageSize);
List<LightReportErrorBo> lightReportErrorBos;
//涓簄ull鐨勮瘽鏄秴绠�
if (SecurityUtils.getClientId() == null) {
- lightReportErrorBos = baseMapper.listReportError(keyword, null);
- }else{
- lightReportErrorBos = baseMapper.listReportError(keyword, SecurityUtils.getUserId());
+ lightReportErrorBos = baseMapper.listReportError(keyword, error_code, null);
+ } else {
+ lightReportErrorBos = baseMapper.listReportError(keyword, error_code, SecurityUtils.getUserId());
}
for (LightReportErrorBo lightReportErrorBo : lightReportErrorBos) {
@@ -49,4 +50,28 @@
}
return lightReportErrorBos;
}
+
+ /**
+ * 鏌ヨ鏁呭父鏁版嵁
+ *
+ * @return
+ */
+ public List<LightReportErrorBo> queryErrorCode(BaseConditionVO baseConditionVO) {
+
+ PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize());
+ List<LightReportErrorBo> lightReportErrorBos = baseMapper.listError(SecurityUtils.getClientId());
+ for (LightReportErrorBo lightReportErrorBo : lightReportErrorBos) {
+ Integer errorCode = lightReportErrorBo.getErrorCode();
+ StringBuilder sb = new StringBuilder();
+ LightErrorEnum[] values = LightErrorEnum.values();
+ for (LightErrorEnum value : values) {
+ if ((value.getCode() & errorCode) > 0) {
+ sb.append(value.getMessage());
+ }
+ }
+ lightReportErrorBo.setErrorMsg(sb.toString());
+ }
+ return lightReportErrorBos;
+ }
+
}
--
Gitblit v1.9.3