Commit 0a82ac1c authored by wujiang's avatar wujiang

提交level修改

parent 634a9939
......@@ -276,7 +276,7 @@ public class MonitoringMapController extends BaseController {
ArrayList<String> stringArrayList = mapRegion.getProvince();
//变量获取所有的场站信息
for (int i = 0; i < stringArrayList.size(); i++) {
Region region = regionMapper.selectOne(new QueryWrapper<Region>().eq("LEVEL_", 1).like("REGION_NAME", stringArrayList.get(i)));
Region region = regionMapper.selectOne(new LambdaQueryWrapper<Region>().eq(Region::getLevel, 1).like(Region::getRegionName, stringArrayList.get(i)));
List<StationBasic> stationBasicList = stationBasicMapper.selectList(new QueryWrapper<StationBasic>().like("belong_area", region.getRegionCode()));
stationBasicListAll.addAll(stationBasicList);
}
......
package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -140,7 +141,7 @@ public class MonitorServiceImpl implements MonitorService {
*/
public List<StationCacheInfoDto> getListStationCacheInfoDto() {
List<StationCacheInfoDto> stationCacheInfoDtos = new ArrayList<>();
List<Region> regionList = regionMapper.selectList(new QueryWrapper<Region>().eq("LEVEL_", 1));
List<Region> regionList = regionMapper.selectList(new LambdaQueryWrapper<Region>().eq(Region::getLevel, 1));
List<MapRegion> mapRegionList = mapRegionMapper.selectList(new QueryWrapper<MapRegion>().isNotNull("name"));
List<StationBasic> stationBasicList = stationBasicMapper.selectList(new QueryWrapper<StationBasic>().isNotNull("belong_area").isNotNull("fan_gateway_id"));
for (int i = 0; i < stationBasicList.size(); i++) {
......
......@@ -421,7 +421,7 @@ public class MonitoringServiceImpl {
List<StationBasic> stationBasicList = stationBasicMapper
.selectList(new QueryWrapper<StationBasic>().isNotNull("belong_area"));
List<MapRegion> mapRegionList = mapRegionMapper.selectList(new QueryWrapper<MapRegion>().isNotNull("name"));
List<Region> regionList = regionMapper.selectList(new QueryWrapper<Region>().eq("LEVEL", 1));
List<Region> regionList = regionMapper.selectList(new LambdaQueryWrapper<Region>().eq(Region::getLevel, 1));
mapRegionList.forEach(mapRegion -> {
MapAreaInfoDto mapAreaInfoDto = new MapAreaInfoDto();
// 开始处理省份名称-三维与二维的名称有差异
......@@ -772,7 +772,7 @@ public class MonitoringServiceImpl {
// 变量获取所有的场站信息
for (int i = 0; i < stringArrayList.size(); i++) {
Region region = regionMapper
.selectOne(new QueryWrapper<Region>().eq("LEVEL_", 1).like("REGION_NAME", stringArrayList.get(i)));
.selectOne(new LambdaQueryWrapper<Region>().eq(Region::getLevel, 1).like(Region::getRegionName, stringArrayList.get(i)));
List<StationBasic> stationBasicList = stationBasicMapper
.selectList(new QueryWrapper<StationBasic>().like("belong_area", region.getRegionCode()));
stationBasicListAll.addAll(stationBasicList);
......@@ -1188,7 +1188,7 @@ public class MonitoringServiceImpl {
List<HashMap<String, Object>> hashMapList = new ArrayList<>();
List<StationBasic> stationBasicList = stationBasicMapper
.selectList(new QueryWrapper<StationBasic>().isNotNull("belong_area").isNotNull("fan_gateway_id"));
List<Region> regionList = this.regionMapper.selectList(new QueryWrapper<Region>().eq("level_", 1));
List<Region> regionList = this.regionMapper.selectList(new LambdaQueryWrapper<Region>().eq(Region::getLevel, 1));
regionList.forEach(region -> {
HashMap<String, Object> hashMap = new HashMap<>();
hashMap.put("label", region.getRegionName());
......
package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jxiop.api.dto.RegionDto;
......@@ -34,10 +35,10 @@ public class RegionServiceImpl extends BaseService<RegionDto,Region,RegionMapper
}
public Region getRegionByRegionCode ( String regionCode){
return this.getOne(new QueryWrapper<Region>().eq("REGION_CODE",regionCode));
return this.getOne(new LambdaQueryWrapper<Region>().eq(Region::getRegionCode,regionCode));
}
//根据regionName获取regionCode
public Region getRegionCodeByRegionName(String regionName) {
return this.getOne(new QueryWrapper<Region>().like("REGION_NAME",regionName).eq("LEVEL",1));
return this.getOne(new LambdaQueryWrapper<Region>().like(Region::getRegionName,regionName).eq(Region::getLevel,1));
}
}
\ No newline at end of file
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