修改控制器及新增城市功能

This commit is contained in:
songjinsheng
2022-06-24 10:28:33 +08:00
parent 11b8a3db44
commit f52a876226
14 changed files with 289 additions and 8 deletions

View File

@ -159,14 +159,22 @@ public class AorestCoverageController {
return upload;
}
@RequestMapping(value = "/Dictionary")
@RequestMapping(value = "/Dictionary",method = {RequestMethod.POST})
@ApiOperation(value = "字典查询",httpMethod = "POST")
public AjaxResult Dictionary(@RequestBody Dictionary dic)
{
List<Dictionary> diclist=service.selectDic(dic.getCodingType(),dic.getCodingType1(), dic.getCodingType2());
return AjaxResult.success(diclist);
}
@RequestMapping(value = "/selectNow",method = {RequestMethod.GET})
@ApiOperation(value = "字典查询",httpMethod = "GET")
public AjaxResult selectNow(String type)
{
List<Dictionary> diclist=service.selectNow(type);
return AjaxResult.success(diclist);
}
}

View File

@ -0,0 +1,33 @@
package com.ruoyi.web.controller.yada;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain_yada.CityVo;
import com.ruoyi.system.service_yada.ICityService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
* 城市
*/
@RestController
@RequestMapping(value = "/business-service/api/City")
@Api(tags = "城市")
public class CityController
{
@Resource
private ICityService cityService;
@RequestMapping(value = "/getImpervious",method = {RequestMethod.GET})
@ApiOperation(value = "不透水面面积",httpMethod = "GET")
public AjaxResult getImpervious(String city,String country)
{
List<CityVo> cityVos=cityService.selectCity(city,country);
return AjaxResult.success(cityVos);
}
}

View File

@ -76,11 +76,6 @@ public class SpecialController {
map.put("output","json");
String value= WeatherUtils.httpRequest(url,map);
WeatherUtilsVO vo = JSON.parseObject(value,WeatherUtilsVO.class);
// String value2=vo.getForecasts().substring(1,vo.getForecasts().length()-1);
// System.out.println(value2);
// vo.setForecast(JSON.parseObject(value2,ForecastVo.class));
// JSONObject userJson=JSONObject.parseObject(value);
// WeatherUtilsVO utilsValue= JSON.toJavaObject(userJson,WeatherUtilsVO.class);
return AjaxResult.success(vo);
} /**

View File

@ -0,0 +1,38 @@
package com.ruoyi.web.controller.yada;
import com.ruoyi.common.core.domain.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
* 专题报告
*/
@RestController
@RequestMapping(value = "/business-service/api/Special", produces = "application/json;charset=UTF-8")
@Api(tags = "专题报告")
public class SpecialReportController
{
@RequestMapping(value = "/getWord",method = {RequestMethod.GET})
@ApiOperation(value = "返回专题报告路径",httpMethod = "GET")
public AjaxResult getWord(@RequestParam("path") String path,@RequestParam("name") String name)
{
String route="";
switch (path)
{
case "ch":
route="avatar/word/全球生态环境遥感监测2021年度报告-中文版-20220309.docx";
break;
case "en":
route="avatar/word/全球生态环境遥感监测2021年度报告-英文简本-20211102.docx";
break;
default:
return AjaxResult.error("未找到对应路径");
}
return AjaxResult.success(route);
}
}