From 27e6bc3df3e39e0d0b147b155a89ad6837ea972b Mon Sep 17 00:00:00 2001 From: cjl <909710561@qq.com> Date: Mon, 06 Jan 2025 09:19:24 +0800 Subject: [PATCH] Merge branch 'cjl' into dev --- screen-api/src/main/java/com/moral/api/service/impl/GovMonitorPointServiceImpl.java | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/screen-api/src/main/java/com/moral/api/service/impl/GovMonitorPointServiceImpl.java b/screen-api/src/main/java/com/moral/api/service/impl/GovMonitorPointServiceImpl.java index 2386fb9..66bab44 100644 --- a/screen-api/src/main/java/com/moral/api/service/impl/GovMonitorPointServiceImpl.java +++ b/screen-api/src/main/java/com/moral/api/service/impl/GovMonitorPointServiceImpl.java @@ -1,6 +1,7 @@ package com.moral.api.service.impl; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.moral.api.entity.Device; @@ -19,6 +20,7 @@ import com.moral.pojo.AQI; import com.moral.util.AQIUtils; import com.moral.util.RegionCodeUtils; +import com.moral.util.TokenUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTemplate; @@ -710,4 +712,27 @@ .in("city_code", cityCodes); return govMonitorPointMapper.selectMaps(govMonitorPointQueryWrapper); } + + /** + * ��������������������� + * + * @return + */ + @Override + public List<GovMonitorPoint> selectPoint() { + Map<String, Object> userInfo = (Map<String, Object>) TokenUtils.getUserInfo(); + Map<String, Object> orgInfo = (Map<String, Object>) userInfo.get("organization"); + Integer orId =(Integer) orgInfo.get("id"); + Integer code = null; + LambdaQueryWrapper<GovMonitorPoint> wrapper = new LambdaQueryWrapper<>(); + wrapper.select(GovMonitorPoint::getGuid,GovMonitorPoint::getLatitude,GovMonitorPoint::getLongitude,GovMonitorPoint::getName); + if (orId!=24){ + code = (Integer) orgInfo.get("locationLevelCode"); + wrapper.eq(GovMonitorPoint::getAreaCode,code); + } + wrapper.eq(GovMonitorPoint::getIsDelete,Constants.NOT_DELETE); + + List<GovMonitorPoint> govMonitorPoints = govMonitorPointMapper.selectList(wrapper); + return govMonitorPoints; + } } -- Gitblit v1.8.0