|
|
@ -2,6 +2,8 @@ package com.cuit.solarenergy.controller;
|
|
|
|
|
|
|
|
|
|
|
|
import com.cuit.solarenergy.base.annotation.AopLog;
|
|
|
|
import com.cuit.solarenergy.base.annotation.AopLog;
|
|
|
|
import com.cuit.solarenergy.base.annotation.AuthToken;
|
|
|
|
import com.cuit.solarenergy.base.annotation.AuthToken;
|
|
|
|
|
|
|
|
import com.cuit.solarenergy.entity.MonitorRet;
|
|
|
|
|
|
|
|
import com.cuit.solarenergy.entity.TGeoserverinfo;
|
|
|
|
import com.cuit.solarenergy.entity.vo.ret.RetResponse;
|
|
|
|
import com.cuit.solarenergy.entity.vo.ret.RetResponse;
|
|
|
|
import com.cuit.solarenergy.entity.vo.ret.RetResult;
|
|
|
|
import com.cuit.solarenergy.entity.vo.ret.RetResult;
|
|
|
|
import com.cuit.solarenergy.exception.ParamsException;
|
|
|
|
import com.cuit.solarenergy.exception.ParamsException;
|
|
|
@ -49,13 +51,145 @@ public class DataController {
|
|
|
|
@ApiResponse(code = 500, message = "服务器内部错误"),
|
|
|
|
@ApiResponse(code = 500, message = "服务器内部错误"),
|
|
|
|
@ApiResponse(code = 900, message = "失败")
|
|
|
|
@ApiResponse(code = 900, message = "失败")
|
|
|
|
})
|
|
|
|
})
|
|
|
|
public RetResult<List<String>> getRefionInfo() {
|
|
|
|
public RetResult<List<TGeoserverinfo>> getRefionInfo(String region) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
log.info("区域查询");
|
|
|
|
log.info("区域查询");
|
|
|
|
List<String> regionInfo = dataImportService.getRefionInfo();
|
|
|
|
List<TGeoserverinfo> regionInfo = dataImportService.getRefionInfo(region);
|
|
|
|
return RetResponse.makeOKRsp(regionInfo);
|
|
|
|
return RetResponse.makeOKRsp(regionInfo);
|
|
|
|
}catch (ParamsException e){
|
|
|
|
}catch (ParamsException e){
|
|
|
|
return RetResponse.makeErrRsp("查询错误!"+e.getMessage());
|
|
|
|
return RetResponse.makeErrRsp("查询错误!"+e.getMessage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@AopLog
|
|
|
|
|
|
|
|
@AuthToken
|
|
|
|
|
|
|
|
@ApiOperation("2、根据区域查询tif文件")
|
|
|
|
|
|
|
|
@PreAuthorize("hasAuthority('minio:upload')")
|
|
|
|
|
|
|
|
@RequestMapping(value = "/dataimport/getTifByRegion", method = {RequestMethod.GET})
|
|
|
|
|
|
|
|
@ApiResponses({
|
|
|
|
|
|
|
|
@ApiResponse(code = 200, message = "成功"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 401, message = "访问未经授权"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 403, message = "访问被禁止的"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 404, message = "未找到访问接口"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 500, message = "服务器内部错误"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 900, message = "失败")
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
public RetResult<List<String>> getTifByRegion(String region) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
log.info("Tif查询");
|
|
|
|
|
|
|
|
List<String> regionInfo = dataImportService.getTifByRegion(region);
|
|
|
|
|
|
|
|
return RetResponse.makeOKRsp(regionInfo);
|
|
|
|
|
|
|
|
}catch (ParamsException e){
|
|
|
|
|
|
|
|
return RetResponse.makeErrRsp("查询tif文件失败!"+e.getMessage());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@AopLog
|
|
|
|
|
|
|
|
@AuthToken
|
|
|
|
|
|
|
|
@ApiOperation("3、图层查询")
|
|
|
|
|
|
|
|
@PreAuthorize("hasAuthority('minio:upload')")
|
|
|
|
|
|
|
|
@RequestMapping(value = "/dataimport/getLayer", method = {RequestMethod.GET})
|
|
|
|
|
|
|
|
@ApiResponses({
|
|
|
|
|
|
|
|
@ApiResponse(code = 200, message = "成功"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 401, message = "访问未经授权"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 403, message = "访问被禁止的"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 404, message = "未找到访问接口"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 500, message = "服务器内部错误"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 900, message = "失败")
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
public RetResult<List<String>> getLayer() {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
log.info("图层查询");
|
|
|
|
|
|
|
|
List<String> layer = dataImportService.getLayer();
|
|
|
|
|
|
|
|
return RetResponse.makeOKRsp(layer);
|
|
|
|
|
|
|
|
}catch (ParamsException e){
|
|
|
|
|
|
|
|
return RetResponse.makeErrRsp("查询tif文件失败!"+e.getMessage());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@AopLog
|
|
|
|
|
|
|
|
@AuthToken
|
|
|
|
|
|
|
|
@ApiOperation("4、图层查询tif文件")
|
|
|
|
|
|
|
|
@PreAuthorize("hasAuthority('minio:upload')")
|
|
|
|
|
|
|
|
@RequestMapping(value = "/dataimport/getTifByLayer", method = {RequestMethod.GET})
|
|
|
|
|
|
|
|
@ApiResponses({
|
|
|
|
|
|
|
|
@ApiResponse(code = 200, message = "成功"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 401, message = "访问未经授权"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 403, message = "访问被禁止的"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 404, message = "未找到访问接口"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 500, message = "服务器内部错误"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 900, message = "失败")
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
public RetResult<List<String>> getTifByLayer(String Layer) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
log.info("图层查询Tif文件");
|
|
|
|
|
|
|
|
List<String> layerTif = dataImportService.getTifByLayer(Layer);
|
|
|
|
|
|
|
|
return RetResponse.makeOKRsp(layerTif);
|
|
|
|
|
|
|
|
}catch (ParamsException e){
|
|
|
|
|
|
|
|
return RetResponse.makeErrRsp("查询tif文件失败!"+e.getMessage());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@AopLog
|
|
|
|
|
|
|
|
@AuthToken
|
|
|
|
|
|
|
|
@ApiOperation("5、查询要素详情")
|
|
|
|
|
|
|
|
@PreAuthorize("hasAuthority('minio:upload')")
|
|
|
|
|
|
|
|
@RequestMapping(value = "/dataimport/getElementInfo", method = {RequestMethod.GET})
|
|
|
|
|
|
|
|
@ApiResponses({
|
|
|
|
|
|
|
|
@ApiResponse(code = 200, message = "成功"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 401, message = "访问未经授权"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 403, message = "访问被禁止的"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 404, message = "未找到访问接口"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 500, message = "服务器内部错误"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 900, message = "失败")
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
public RetResult<List<String>> getElementInfo() {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
log.info("查询要素详情");
|
|
|
|
|
|
|
|
List<String> element = dataImportService.getElementInfo();
|
|
|
|
|
|
|
|
return RetResponse.makeOKRsp(element);
|
|
|
|
|
|
|
|
}catch (ParamsException e){
|
|
|
|
|
|
|
|
return RetResponse.makeErrRsp("查询要素失败!"+e.getMessage());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@AopLog
|
|
|
|
|
|
|
|
@AuthToken
|
|
|
|
|
|
|
|
@ApiOperation("6、根据要素详情查询具体值")
|
|
|
|
|
|
|
|
@PreAuthorize("hasAuthority('minio:upload')")
|
|
|
|
|
|
|
|
@RequestMapping(value = "/dataimport/getValueByElement", method = {RequestMethod.GET})
|
|
|
|
|
|
|
|
@ApiResponses({
|
|
|
|
|
|
|
|
@ApiResponse(code = 200, message = "成功"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 401, message = "访问未经授权"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 403, message = "访问被禁止的"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 404, message = "未找到访问接口"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 500, message = "服务器内部错误"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 900, message = "失败")
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
public RetResult<List<String>> getValueByElement(String Element) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
log.info("根据要素详情查询具体值");
|
|
|
|
|
|
|
|
List<String> value = dataImportService.getValueByElement(Element);
|
|
|
|
|
|
|
|
return RetResponse.makeOKRsp(value);
|
|
|
|
|
|
|
|
}catch (ParamsException e){
|
|
|
|
|
|
|
|
return RetResponse.makeErrRsp("查询数据失败!"+e.getMessage());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@AopLog
|
|
|
|
|
|
|
|
@AuthToken
|
|
|
|
|
|
|
|
@ApiOperation("7、监测排序")
|
|
|
|
|
|
|
|
@PreAuthorize("hasAuthority('minio:upload')")
|
|
|
|
|
|
|
|
@RequestMapping(value = "/dataimport/getMonitorInfo", method = {RequestMethod.GET})
|
|
|
|
|
|
|
|
@ApiResponses({
|
|
|
|
|
|
|
|
@ApiResponse(code = 200, message = "成功"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 401, message = "访问未经授权"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 403, message = "访问被禁止的"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 404, message = "未找到访问接口"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 500, message = "服务器内部错误"),
|
|
|
|
|
|
|
|
@ApiResponse(code = 900, message = "失败")
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
public RetResult<List<MonitorRet>> getMonitorInfo() {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
log.info("根据要素详情查询具体值");
|
|
|
|
|
|
|
|
List<MonitorRet> monitor = dataImportService.getMonitorInfo();
|
|
|
|
|
|
|
|
return RetResponse.makeOKRsp(monitor);
|
|
|
|
|
|
|
|
}catch (ParamsException e){
|
|
|
|
|
|
|
|
return RetResponse.makeErrRsp("查询监测点详情失败!"+e.getMessage());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|