Quellcode durchsuchen

'河湖坐标分区'

master
daixiantong vor 4 Jahren
Ursprung
Commit
7c4b34ab63
5 geänderte Dateien mit 19 neuen und 22 gelöschten Zeilen
  1. +2
    -1
      src/main/java/com/taauav/admin/service/ITauvDriverService.java
  2. +3
    -14
      src/main/java/com/taauav/admin/service/impl/TauvDriverServiceImpl.java
  3. +6
    -4
      src/main/java/com/taauav/front/controller/IndexWaterController.java
  4. +5
    -1
      src/main/java/com/taauav/front/service/IUserWaterSpectrumService.java
  5. +3
    -2
      src/main/java/com/taauav/front/service/impl/UserWaterSpectrumServiceImpl.java

+ 2
- 1
src/main/java/com/taauav/admin/service/ITauvDriverService.java Datei anzeigen

@@ -103,9 +103,10 @@ public interface ITauvDriverService extends IBaseService<TauvDriver> {
/**
* 获取南京区级河湖缓存数据
*
* @param cityId
* @return
*/
List<TauvDriverVo> getDriverCacheList();
List<TauvDriverVo> getDriverCacheList(BigInteger cityId);

/**
* 导入河道Json数据

+ 3
- 14
src/main/java/com/taauav/admin/service/impl/TauvDriverServiceImpl.java Datei anzeigen

@@ -372,12 +372,12 @@ public class TauvDriverServiceImpl extends BaseServiceImpl<TauvDriverMapper, Tau
/**
* 获取南京区级河湖缓存数据
*
* @param cityId
* @return
*/
@Override
public List<TauvDriverVo> getDriverCacheList() {
public List<TauvDriverVo> getDriverCacheList(BigInteger cityId) {
// 获取所有区级id
BigInteger cityId = new BigInteger("3201");
String key = "driver_all_" + cityId;
Object allDriver = redisUtils.get(key);
List<TauvDriverVo> driverVoList = new ArrayList<>();
@@ -385,23 +385,12 @@ public class TauvDriverServiceImpl extends BaseServiceImpl<TauvDriverMapper, Tau
driverVoList = FunctionUtils.castList(allDriver, TauvDriverVo.class);
}
if (driverVoList.isEmpty()) {
QueryWrapper wrapper = new QueryWrapper();
wrapper.eq("mark", 1);
wrapper.eq("pid", cityId);
wrapper.eq("level", 3);
List<SysCity> cityList = cityService.list(wrapper);
List<BigInteger> areaList = new ArrayList<>();
if (cityList != null && cityList.size() > 0) {
for (SysCity city : cityList) {
areaList.add(city.getId());
}
}
// 获取所有区级河湖
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("mark", 1);
queryWrapper.eq("level", 3);
queryWrapper.eq("status", 1);
queryWrapper.in("driver_area", areaList);
queryWrapper.eq("driver_area", cityId);
List<TauvDriver> driverList = list(queryWrapper);
for (TauvDriver driver : driverList) {
TauvDriverVo driverVo = new TauvDriverVo();

+ 6
- 4
src/main/java/com/taauav/front/controller/IndexWaterController.java Datei anzeigen

@@ -17,9 +17,11 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;

@@ -88,8 +90,8 @@ public class IndexWaterController {
* @return
*/
@GetMapping("/driver")
public Response getAllDriverPoints() {
List<TauvDriverVo> driverVoList = driverService.getDriverCacheList();
public Response getAllDriverPoints(@RequestParam("cityId") BigInteger cityId) {
List<TauvDriverVo> driverVoList = driverService.getDriverCacheList(cityId);
List<IndexDriverVo> list = new ArrayList<>();
if (driverVoList.size() > 0) {
for (TauvDriverVo driver : driverVoList) {
@@ -108,7 +110,7 @@ public class IndexWaterController {
* @return
*/
@GetMapping("/spectrum")
public Response getAllSpectrum() {
return waterSpectrumService.getAllSpectrum();
public Response getAllSpectrum(@RequestParam("cityId") BigInteger cityId) {
return waterSpectrumService.getAllSpectrum(cityId);
}
}

+ 5
- 1
src/main/java/com/taauav/front/service/IUserWaterSpectrumService.java Datei anzeigen

@@ -5,6 +5,8 @@ import com.taauav.common.bean.Response;
import com.taauav.common.service.IBaseService;
import com.taauav.front.query.UserWaterSpectrumQuery;

import java.math.BigInteger;

/**
* <p>
* 多光谱图表 服务类
@@ -25,7 +27,9 @@ public interface IUserWaterSpectrumService extends IBaseService<TauvWaterSpectru

/**
* 获取指挥大屏 所有多光谱图
*
* @param cityId
* @return
*/
Response getAllSpectrum();
Response getAllSpectrum(BigInteger cityId);
}

+ 3
- 2
src/main/java/com/taauav/front/service/impl/UserWaterSpectrumServiceImpl.java Datei anzeigen

@@ -163,11 +163,12 @@ public class UserWaterSpectrumServiceImpl extends BaseServiceImpl<UserWaterSpect
/**
* 获取指挥大屏 所有河湖最新多光谱图
*
* @param cityId
* @return
*/
@Override
public Response getAllSpectrum() {
List<TauvDriverVo> driverVoList = driverService.getDriverCacheList();
public Response getAllSpectrum(BigInteger cityId) {
List<TauvDriverVo> driverVoList = driverService.getDriverCacheList(cityId);
List<IndexDriverVo> list = new ArrayList<>();
if (driverVoList.size() > 0) {
for (TauvDriverVo driverVo : driverVoList) {

Laden…
Abbrechen
Speichern