Commit fae16da5 authored by caotao's avatar caotao

兼容数据报错

parent ee66c680
......@@ -21,6 +21,7 @@ public class IndexDto {
private String value;
private int count;
private String equipmentsIdx;
private String equipmentsIdx_1;
private String equipmentIndexName; // 指标名称【风机状态名称】
private String longitude; // 经度
private String latitude; // 纬度
......
......@@ -17,7 +17,7 @@ import java.util.Date;
*/
@Data
@Accessors(chain = true)
@TableName(value = "monitor_fan_indicator_copy3" ,autoResultMap = true)
@TableName(value = "monitor_fan_indicator" ,autoResultMap = true)
public class MonitorFanIndicator extends BaseEntity {
......
......@@ -5,15 +5,12 @@ import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.jxiop.api.dto.IndexDto;
import com.yeejoin.amos.boot.module.jxiop.api.entity.MonitorFanIndicator;
import com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.MonitorFanIndicatorMapper;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.IndicatorsDto;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.Test;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.MonitorFanIndicatorImpl;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.SjglZsjZsbtzServiceImpl;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.StationBasicServiceImpl;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.TestServiceImpl;
import com.yeejoin.amos.boot.module.jxiop.biz.utils.InfluxDButils;
......@@ -24,7 +21,6 @@ import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
......@@ -34,7 +30,6 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.*;
@RestController
......@@ -58,6 +53,7 @@ public class DemoController extends BaseController {
@Autowired
InfluxDButils influxDButils;
@Autowired
EmqKeeper emqKeeper;
......@@ -95,7 +91,8 @@ public class DemoController extends BaseController {
@GetMapping("/test4")
public void demoTest3() {
//数据说明 夏造风电、泰和光伏、夏造升压站、泰和升压站
String [] strings = {"1668801435891929089","1669524885619085313"};
// String [] strings = {"1668801435891929089","1669524885619085313"};
String [] strings = {"1669524885619085313"};
// Object o=this.monitorFanIndicatorImpl.getIndicatoralueAvage("1668801435891929089","60秒平均风速");
// System.out.println(o.toString());
for (int i = 0; i < strings.length; i++) {
......@@ -104,6 +101,7 @@ public class DemoController extends BaseController {
// QueryWrapper.eq("gateway", "1668801435891929089");
// 泰和光伏
QueryWrapper.eq("gateway", strings[i]);
QueryWrapper.eq("front_module", "箱变");
long DATE = new Date().getTime();
System.out.println(DATE);
List<MonitorFanIndicator> list = monitorFanIndicatorregionMapper.selectList(QueryWrapper);
......@@ -119,8 +117,8 @@ public class DemoController extends BaseController {
maps2.put("gatewayId", monitorFanIndicator.getGateway());
maps2.put("isAlarm", monitorFanIndicator.getIsAlarm());
maps2.put("createdTime", "2023-07-05 18:30:26");
maps2.put("unit", monitorFanIndicator.getUnit());
maps2.put("value", "");
// maps2.put("unit", monitorFanIndicator.getUnit());
// maps2.put("value", "");
maps2.put("valueLabel","" );
maps2.put("traceId", "");
maps2.put("equipmentIndexName", monitorFanIndicator.getIndicator());
......@@ -157,7 +155,8 @@ public class DemoController extends BaseController {
@GetMapping("/test6")
public void demoTest5() {
//数据说明 夏造风电、泰和光伏、夏造升压站、泰和升压站
String [] strings = {"1668801570352926721","1669525017559306241"};
// String [] strings = {"1668801570352926721","1669525017559306241"};
String [] strings = {"1669525017559306241"};
// Object o=this.monitorFanIndicatorImpl.getIndicatoralueAvage("1668801435891929089","60秒平均风速");
// System.out.println(o.toString());
for (int i = 0; i < strings.length; i++) {
......@@ -166,6 +165,7 @@ public class DemoController extends BaseController {
// QueryWrapper.eq("gateway", "1668801435891929089");
// 泰和光伏
QueryWrapper.eq("gateway", strings[i]);
QueryWrapper.like("system_type","模拟量");
long DATE = new Date().getTime();
System.out.println(DATE);
List<MonitorFanIndicator> list = monitorFanIndicatorregionMapper.selectList(QueryWrapper);
......@@ -182,9 +182,9 @@ public class DemoController extends BaseController {
maps2.put("isAlarm", monitorFanIndicator.getIsAlarm());
maps2.put("createdTime", "2023-07-05 18:30:26");
maps2.put("unit", monitorFanIndicator.getUnit());
maps2.put("value", "");
maps2.put("valueLabel","" );
maps2.put("traceId", "");
// maps2.put("value", "");
// maps2.put("valueLabel","" );
// maps2.put("traceId", "");
maps2.put("equipmentIndexName", monitorFanIndicator.getIndicator());
maps2.put("equipmentNumber", monitorFanIndicator.getEquipmentNumber());
maps2.put("frontModule", monitorFanIndicator.getFrontModule());
......
......@@ -15,6 +15,7 @@ public class IndicatorsDto {
private String equipmentNumber;
private String equipmentSpecificName;
private String equipmentsIdx;
private String equipmentsIdx_1;
private String frontModule;
private String gatewayId;
private String isAlarm;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment