Commit 6ef88f2d authored by zhangsen's avatar zhangsen

预警监测页面bug修改

parent cfd6a7a8
package com.yeejoin.amos.boot.module.jxiop.biz.controller; package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.text.CharSequenceUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils; import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanHealthIndex; import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanHealthIndex;
...@@ -206,7 +209,9 @@ public class AnalyseController extends BaseController { ...@@ -206,7 +209,9 @@ public class AnalyseController extends BaseController {
@PostMapping(value = "/getInfluxdbDataByConditon") @PostMapping(value = "/getInfluxdbDataByConditon")
public ResponseModel<Map<String, Object>> getDataByConditon(@RequestParam String stationType, @RequestParam(required = false) String pointId, @RequestParam(required = false) String startTime, @RequestParam(required = false) String endTime, @RequestBody Map<String, Object> map) { public ResponseModel<Map<String, Object>> getDataByConditon(@RequestParam String stationType, @RequestParam(required = false) String pointId, @RequestParam(required = false) String startTime, @RequestParam(required = false) String endTime, @RequestBody Map<String, Object> map) {
if ("FD".equals(stationType)) { if ("FD".equals(stationType)) {
if (ObjectUtils.isEmpty(map.get("EQUIPINDEX")) || CharSequenceUtil.isEmpty(map.get("EQUIPINDEX").toString())) {
return ResponseHelper.buildResponse(new HashMap<>());
}
LambdaQueryWrapper<IdxBizFanHealthIndex> indexLambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<IdxBizFanHealthIndex> indexLambdaQueryWrapper = new LambdaQueryWrapper<>();
indexLambdaQueryWrapper.eq(IdxBizFanHealthIndex::getStation, map.get("STATION")); indexLambdaQueryWrapper.eq(IdxBizFanHealthIndex::getStation, map.get("STATION"));
indexLambdaQueryWrapper.eq(IdxBizFanHealthIndex::getEquipmentName, map.get("EQUIPNAME")); indexLambdaQueryWrapper.eq(IdxBizFanHealthIndex::getEquipmentName, map.get("EQUIPNAME"));
......
...@@ -53,6 +53,7 @@ import tech.tablesaw.api.StringColumn; ...@@ -53,6 +53,7 @@ import tech.tablesaw.api.StringColumn;
import tech.tablesaw.api.Table; import tech.tablesaw.api.Table;
import java.io.File; import java.io.File;
import java.text.DecimalFormat;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
...@@ -160,6 +161,8 @@ public class CommonServiceImpl { ...@@ -160,6 +161,8 @@ public class CommonServiceImpl {
@Autowired @Autowired
private TdengineTimeServiceImpl tdengineTimeService; private TdengineTimeServiceImpl tdengineTimeService;
public final DecimalFormat df = new DecimalFormat("#.0");
/** /**
* @return * @return
* @deprecated 获取工况变量列表风机 * @deprecated 获取工况变量列表风机
...@@ -994,10 +997,10 @@ public class CommonServiceImpl { ...@@ -994,10 +997,10 @@ public class CommonServiceImpl {
List<String> seriesData_valuse = new ArrayList<>(); List<String> seriesData_valuse = new ArrayList<>();
List<String> axisData_valuse = new ArrayList<>(); List<String> axisData_valuse = new ArrayList<>();
result.forEach(item -> { result.forEach(item -> {
seriesData_valuse.add(item.getValue()); seriesData_valuse.add(df.format(item.getValueF()));
String date = item.getCreatedTime().toString(); String date = item.getCreatedTime().toString();
try { try {
date = DateUtils.dateFormat(item.getCreatedTime(), DatePattern.NORM_DATETIME_PATTERN); date = DateUtils.dateFormat(item.getCreatedTime(), DatePattern.NORM_DATETIME_MINUTE_PATTERN);
} catch (ParseException e) { } catch (ParseException e) {
e.printStackTrace(); e.printStackTrace();
} }
......
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