From 0cbbe2c1cbfbf73e02e1796d921c2911c96d370b Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期一, 23 十二月 2024 11:46:31 +0800 Subject: [PATCH] Merge branch 'master' of http://dlindusit.com:53929/r/iailab-plat --- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/point/DataPointApiImpl.java | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/point/DataPointApiImpl.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/point/DataPointApiImpl.java index 64cc9a6..d57f185 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/point/DataPointApiImpl.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/point/DataPointApiImpl.java @@ -38,7 +38,16 @@ @Override public ApiPointDTO getInfoById(String pointId) { - return ConvertUtils.sourceToTarget(daPointService.getSimpleInfoById(pointId), ApiPointDTO.class); + return daPointService.getSimpleInfoById(pointId); + } + + @Override + public List<ApiPointDTO> getInfoByIds(List<String> pointIds) { + List<ApiPointDTO> result = new ArrayList<>(pointIds.size()); + for (String pointId : pointIds) { + result.add(daPointService.getSimpleInfoById(pointId)); + } + return result; } @Override @@ -88,8 +97,8 @@ List<ApiPointValueDTO> pointValueList = new ArrayList<>(); for (int i = 0; list.size() - i >= 1; i++) { ApiPointValueDTO pointValue = new ApiPointValueDTO(); - pointValue.setDataValue(Double.parseDouble(list.get(i).get(InfluxDBServiceImpl.VALUE).toString())); - pointValue.setDataTime(DateUtils.parse(list.get(i).get(InfluxDBServiceImpl.TIME).toString(), DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)); + pointValue.setV(Double.parseDouble(list.get(i).get(InfluxDBServiceImpl.VALUE).toString())); + pointValue.setT(DateUtils.parse(list.get(i).get(InfluxDBServiceImpl.TIME).toString(), DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)); pointValueList.add(pointValue); } return pointValueList; -- Gitblit v1.9.3