refactor(mpont): 优化测点查询及前端图表渲染逻辑
- 优化数据库查询测点逻辑,优先通过unitId和测点编码查询,失败后通过测点编码模糊查询 - 统一调整AJAX请求格式,规范URL拼接及回调函数编写 - 修正前端JS代码中数据解析方式,使用严格的空字符串判断 - 规范DOM选择器对应代码格式,采用双引号替换单引号 - 重构echart饼图组件配置,提升代码可读性和维护性 - 移除注释的旧版echart图表函数,精简前端代码 - 优化echart折线图、柱状图渲染,统一异步请求与数据展示流程 - 新增多点柱状图(工业生活污水流量7天日趋势)异步数据加载和渐变色样式配置 - 修复部分变量声明和函数命名规范,提升代码一致性
This commit is contained in:
@ -4137,8 +4137,15 @@ public class MPointController {
|
||||
for (int i = 0; i < ids.length; i++) {
|
||||
com.alibaba.fastjson.JSONObject jsonObject2 = new com.alibaba.fastjson.JSONObject();
|
||||
|
||||
//通过es查询bizid
|
||||
MPoint mPoint_es = mPointService.selectById(ids[i]);
|
||||
//通过数据库查询测点(优先通过unitId和测点编码查询)
|
||||
MPoint mPoint_es = mPointService.selectById(unitId, ids[i]);
|
||||
if (mPoint_es == null) {
|
||||
// 尝试通过测点编码查询
|
||||
List<MPoint> mPointList = mPointService.selectListByWhere(unitId, "where mpointcode='" + ids[i] + "'");
|
||||
if (mPointList != null && mPointList.size() > 0) {
|
||||
mPoint_es = mPointList.get(0);
|
||||
}
|
||||
}
|
||||
if (mPoint_es != null) {
|
||||
unitId = mPoint_es.getBizid();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user