流量计增加加入各类接口

This commit is contained in:
zhangyue 2026-07-29 17:54:04 +08:00
parent 3faf22b8b2
commit 8688af7e88
1 changed files with 3 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package org.jeecg.modules.appmana.utils;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.jeecg.common.constant.DeviceReadConstants; import org.jeecg.common.constant.DeviceReadConstants;
import org.jeecg.common.constant.IotConstants; import org.jeecg.common.constant.IotConstants;
@ -26,6 +27,7 @@ import java.time.LocalTime;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
@Slf4j
public class CommonUtils { public class CommonUtils {
@ -306,7 +308,7 @@ w * @param pageNo 非必传,虫情孢子类,杀虫灯传入
try { try {
for (Field field : fields) { for (Field field : fields) {
field.setAccessible(true); field.setAccessible(true);
if (field.getName().startsWith("data") && !field.getName().equals("dataDateTime") && !field.getName().equals("dataGatherType")) { if ((field.getName().startsWith("data") || field.getName().startsWith("sData")) && !field.getName().equals("dataDateTime") && !field.getName().equals("dataGatherType")) {
Object values = field.get(transdataFlowmeter); Object values = field.get(transdataFlowmeter);
if (values != null) { if (values != null) {
String val = values.toString(); String val = values.toString();