Merge remote-tracking branch 'origin/dev_sjs'

# Conflicts:
#	ruoyi-admin/src/main/resources/application-druid.yml
#	ruoyi-admin/src/main/resources/application.yml
This commit is contained in:
18536819133
2023-10-20 16:46:38 +08:00
494 changed files with 204365 additions and 478 deletions

View File

@ -1,9 +1,16 @@
package com.ruoyi;
import com.sun.jna.platform.unix.solaris.LibKstat;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.util.ObjectUtils;
import javax.print.attribute.standard.MediaSize;
import java.time.Year;
/**
* 启动程序
@ -16,20 +23,12 @@ public class RuoYiApplication
{
public static void main(String[] args)
{
// System.setProperty("spring.devtools.restart.enabled", "false");
SpringApplication.run(RuoYiApplication.class, args);
System.out.println();
System.out.println(" --->>>启动成功!<<<---");
// System.out.println("(♥◠‿◠)ノ゙ ლ(´ڡ`ლ)゙ \n" +
// " .-------. ____ __ \n" +
// " | _ _ \\ \\ \\ / / \n" +
// " | ( ' ) | \\ _. / ' \n" +
// " |(_ o _) / _( )_ .' \n" +
// " | (_,_).' __ ___(_ o _)' \n" +
// " | |\\ \\ | || |(_,_)' \n" +
// " | | \\ `' /| `-' / \n" +
// " | | \\ / \\ / \n" +
// " ''-' `'-' `-..-' ");
}
}

View File

@ -28,7 +28,7 @@ import java.time.LocalDateTime;
import java.util.List;
/**
* 森林覆盖率
* 森林覆盖率
*/
@RestController
@RequestMapping(value = "/business-service/api/Aorest", produces = "application/json;charset=UTF-8")
@ -43,110 +43,103 @@ public class AorestCoverageController {
/**
* 查询方法
* 需要查询的字段参数
*
* @return 参数类
*/
@RequestMapping(value = "/selectAorestCoverage",method = {RequestMethod.GET})
@ApiOperation(value = "查询方法",httpMethod = "GET")
public AjaxResult selectAorestCoverage()
{
List<AorestCoverageVO> eastVOSList= service.selectAorestCoverage();
@RequestMapping(value = "/selectAorestCoverage", method = {RequestMethod.GET})
@ApiOperation(value = "查询方法", httpMethod = "GET")
public AjaxResult selectAorestCoverage() {
List<AorestCoverageVO> eastVOSList = service.selectAorestCoverage();
return AjaxResult.success(eastVOSList);
}
/**
* 删除方法
*
* @param ID id
* @return 状态码
*/
@RequestMapping(value = "/DelAorestCoverage",method = {RequestMethod.DELETE})
@RequestMapping(value = "/DelAorestCoverage", method = {RequestMethod.DELETE})
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
public AjaxResult DelAorestCoverage(@Param("ID") String ID)
{
@ApiOperation(value = "删除方法", httpMethod = "DELETE")
public AjaxResult DelAorestCoverage(@Param("ID") String ID) {
int NUM = service.DelAorestCoverage(ID);
if (NUM>0)
{
if (NUM > 0) {
return AjaxResult.success();
}
return AjaxResult.error();
return AjaxResult.error();
}
/**
* 新增方法
*
* @param eastVOS 新增实体类
* @return 状态码
*/
@RequestMapping(value = "/IntoAorestCoverage",method = {RequestMethod.POST})
@ApiOperation(value = "新增方法",httpMethod = "POST")
public AjaxResult IntoAorestCoverage(@RequestBody AorestCoverageVO eastVOS)
{
@RequestMapping(value = "/IntoAorestCoverage", method = {RequestMethod.POST})
@ApiOperation(value = "新增方法", httpMethod = "POST")
public AjaxResult IntoAorestCoverage(@RequestBody AorestCoverageVO eastVOS) {
try {
eastVOS.setCreateTime(LocalDateTime.now());
int NUM = service.IntoAorestCoverage(eastVOS);
if (NUM>0)
{
int NUM = service.IntoAorestCoverage(eastVOS);
if (NUM > 0) {
return AjaxResult.success();
}
return AjaxResult.error();
}
catch (Exception E){
E.getMessage();
return AjaxResult.error();
return AjaxResult.error();
} catch (Exception E) {
E.getMessage();
return AjaxResult.error();
}
}
/**
* 上传文件
*
* @return 状态码
*/
@RequestMapping(value = "/IntoUpLoad",method = {RequestMethod.POST})
@ApiOperation(value = "上传文件",httpMethod = "POST")
public AjaxResult IntoUpload(@RequestBody MultipartFile file)
{
UploadFile upload=new UploadFile();
@RequestMapping(value = "/IntoUpLoad", method = {RequestMethod.POST})
@ApiOperation(value = "上传文件", httpMethod = "POST")
public AjaxResult IntoUpload(@RequestBody MultipartFile file) {
UploadFile upload = new UploadFile();
ThematicMapDomain domain=new ThematicMapDomain();
ThematicMapDomain domain = new ThematicMapDomain();
UploadFile value= null;
UploadFile value = null;
try {
value = uploadFile(file,upload);
value = uploadFile(file, upload);
} catch (Exception e) {
e.printStackTrace();
}
int NUM = service.IntoUpload(value);
int NUM = service.IntoUpload(value);
domain.setPictureCode(value.getFileId());
if (NUM>0)
{
if (NUM > 0) {
return AjaxResult.success();
}
return AjaxResult.error();
return AjaxResult.error();
}
/**
* 文件查询
*
* @param response 头
* @param request 客户端请求
* @param request 客户端请求
* @return
*/
@RequestMapping(value = "/selectUpload",method = {RequestMethod.GET})
@ApiOperation(value = "文件查询",httpMethod = "GET")
public AjaxResult selectUpload(HttpServletResponse response, HttpServletRequest request,@RequestBody UploadFile upload)
{
List<UploadFile> eastVOSList= service.selectUpload(upload.getFileId(),upload.getFileName());
@RequestMapping(value = "/selectUpload", method = {RequestMethod.GET})
@ApiOperation(value = "文件查询", httpMethod = "GET")
public AjaxResult selectUpload(HttpServletResponse response, HttpServletRequest request, @RequestBody UploadFile upload) {
List<UploadFile> eastVOSList = service.selectUpload(upload.getFileId(), upload.getFileName());
return AjaxResult.success(eastVOSList);
}
public UploadFile uploadFile(MultipartFile file,UploadFile upload) throws Exception
{
public UploadFile uploadFile(MultipartFile file, UploadFile upload) throws Exception {
// 上传文件路径
String filePath = RuoYiConfig.getUploadPath();
// 上传并返回新文件名称
@ -156,17 +149,23 @@ public class AorestCoverageController {
upload.setFilePath(fileName);
upload.setFileSize(String.valueOf(file.getSize()));
upload.setCreateTime(LocalDateTime.now());
return upload;
return upload;
}
@RequestMapping(value = "/Dictionary")
@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 = "/dictionary", method = {RequestMethod.GET})
// @ApiOperation(value = "字典查询",httpMethod = "GET")
public AjaxResult Dictionary(String type, String type1, String type2) {
List<Dictionary> diclist = service.selectDic(type);
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

@ -20,62 +20,59 @@ import java.time.LocalDateTime;
import java.util.List;
/**
* 澳大利亚中东部地区
* 澳大利亚中东部地区
*/
@RestController
@RequestMapping(value = "/business-service/api/Australia", produces = "application/json;charset=UTF-8")
@Api(tags = "澳大利亚中东部地区")
public class AustraliaMiddleEastController
{
public class AustraliaMiddleEastController {
@Resource
private IAustraliaMiddleEastService australiaMiddleEastService;
/**
* 查询方法
* @return 实体类
*
* @return 实体类
*/
@ApiOperation(value = "查询方法",httpMethod = "GET")
@RequestMapping(value = "/SelectAustralia",method = {RequestMethod.GET})
public AjaxResult SelectAustralia(@RequestBody AustraliaMiddleEastVO eastVO )
{
List<AustraliaMiddleEastVO> eastVOSList= australiaMiddleEastService.selectAustralia(eastVO.getYearMonth(),eastVO.getMonth());
return AjaxResult.success(eastVOSList);
@ApiOperation(value = "查询方法", httpMethod = "GET")
@RequestMapping(value = "/SelectAustralia", method = {RequestMethod.GET})
public AjaxResult SelectAustralia(@RequestBody AustraliaMiddleEastVO eastVO) {
List<AustraliaMiddleEastVO> eastVOSList = australiaMiddleEastService.selectAustralia(eastVO.getYearMonth(), eastVO.getMonth());
return AjaxResult.success(eastVOSList);
}
/**
* 删除方法
*
* @param ID id
* @return 状态码
*/
@RequestMapping(value = "/DelAustralia",method = {RequestMethod.DELETE})
@RequestMapping(value = "/DelAustralia", method = {RequestMethod.DELETE})
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
public AjaxResult DelAustralia(@Param("ID") String ID)
{
@ApiOperation(value = "删除方法", httpMethod = "DELETE")
public AjaxResult DelAustralia(@Param("ID") String ID) {
int NUM = australiaMiddleEastService.DelAustralia(ID);
if (NUM>0)
{
if (NUM > 0) {
return AjaxResult.success();
}
return AjaxResult.error();
return AjaxResult.error();
}
/**
* 新增方法
*
* @param eastVOS 新增实体类
* @return 状态码
*/
@RequestMapping(value = "/IntoAustralia",method = {RequestMethod.POST})
@ApiOperation(value = "新增方法",httpMethod = "POST")
public AjaxResult IntoAustralia(@RequestBody AustraliaMiddleEastVO eastVOS)
{
@RequestMapping(value = "/IntoAustralia", method = {RequestMethod.POST})
@ApiOperation(value = "新增方法", httpMethod = "POST")
public AjaxResult IntoAustralia(@RequestBody AustraliaMiddleEastVO eastVOS) {
eastVOS.setCreateTime(LocalDateTime.now());
int NUM = australiaMiddleEastService.IntoAustralia(eastVOS);
if (NUM>0)
{
int NUM = australiaMiddleEastService.IntoAustralia(eastVOS);
if (NUM > 0) {
return AjaxResult.success();
}
return AjaxResult.error();
return AjaxResult.error();
}
}

View File

@ -0,0 +1,42 @@
package com.ruoyi.web.controller.yada;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain_yada.CityVo;
import com.ruoyi.system.domain_yada.OrientationVO;
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", produces = "application/json;charset=UTF-8")
@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);
}
@RequestMapping(value = "/getOrientation", method = {RequestMethod.GET})
@ApiOperation(value = "不透水面扩张方向", httpMethod = "GET")
public AjaxResult getOrientation(String city, String country) {
List<OrientationVO> cityVos = cityService.selectOrientation(city, country);
return AjaxResult.success(cityVos);
}
}

View File

@ -0,0 +1,84 @@
package com.ruoyi.web.controller.yada;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.framework.web.domain.Server;
import com.ruoyi.system.domain_yada.CityFocusVO;
import com.ruoyi.system.domain_yada.CityInformation;
import com.ruoyi.system.domain_yada.OrientationVO;
import com.ruoyi.system.domain_yada.entity.UrbanProvinceSufaceEntity;
import com.ruoyi.system.service_yada.ICityExpandService;
import org.apache.ibatis.annotations.Param;
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;
/**
* 城市扩张
*
* @Author: JinSheng Song
* @Date: 2022/7/1 10:09
*/
@RestController
@RequestMapping(value = "/CityExpand", produces = "application/json;charset=UTF-8")
public class CityExpandControllerr {
@Resource
private ICityExpandService service;
/**
* 获取城市扩张方位
*
* @param city
* @param year
* @return
*/
@RequestMapping(value = "/selectCityExpand", method = {RequestMethod.GET})
public AjaxResult selectCityExpand(@RequestParam(value = "city", required = false) String city,
@RequestParam(value = "country", required = false) String country,
@RequestParam(value = "year", required = false)String year) {
List<CityFocusVO> value = service.selectExpand(city, country, year);
return AjaxResult.success(value);
}
/**
* 获取不透水面扩张方位
*
* @param city
* @param superior
* @return
*/
@RequestMapping(value = "/selectOrientation", method = {RequestMethod.GET})
public AjaxResult selectOrientation(String city, String superior, String country) {
List<OrientationVO> value = service.selectOrientation(city, superior, country);
return AjaxResult.success(value);
}
/**
* 获取城市不透水面各种信息
*
* @param city
* @param country
* @return
*/
@RequestMapping(value = "/selectInformation", method = {RequestMethod.GET})
public AjaxResult selectInformation(String city, String country, String year, String basin) {
// if (city.equals("")&&country.equals(""))
// {
// List<CityInformation> value= service.selectMain(year);
// return AjaxResult.success(value);
// }
List<CityInformation> value = service.selectInfrom(city, country, year, basin);
return AjaxResult.success(value);
}
@RequestMapping(value = "/urbanProvince", method = {RequestMethod.GET})
public AjaxResult urbanProvince(String province, String country,String level) {
List<UrbanProvinceSufaceEntity> list = service.urbanProvicneSuface(province, country,level);
return AjaxResult.success(list);
}
}

View File

@ -0,0 +1,112 @@
package com.ruoyi.web.controller.yada;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain_yada.entity.*;
import com.ruoyi.system.domain_yada.vo.ENSOEventAnalysisVo;
import com.ruoyi.system.domain_yada.vo.ESNOImpactSubzoneVo;
import com.ruoyi.system.domain_yada.vo.PmKeyValueEnVo;
import com.ruoyi.system.domain_yada.vo.PmKeyValueVo;
import com.ruoyi.system.service_yada.ENSOImpactService;
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;
/**
* ENSO事件影响监测
*
* @author Mr.C
*/
@RestController
@RequestMapping("/business-service/api/enso")
@Api(tags = "ENSO事件影响监测")
public class ENSOImpactController {
@Resource
private ENSOImpactService ensoImpactService;
@RequestMapping(value = "/subzonePie", method = {RequestMethod.GET})
@ApiOperation(value = "各地理亚区植被异常分布", httpMethod = "GET")
public AjaxResult subzonePie(@RequestParam(value = "type") String type,
@RequestParam(value = "year") String year,
@RequestParam(value = "region") String region) {
ESNOImpactSubzoneVo esnoImpactSubzoneVo = ensoImpactService.subzonePie(type, year, region);
return AjaxResult.success(esnoImpactSubzoneVo);
}
@RequestMapping(value = "/subzoneVai", method = {RequestMethod.GET})
@ApiOperation(value = "各地理亚区VAI", httpMethod = "GET")
public AjaxResult subzoneVai(@RequestParam(value = "type") String type,
@RequestParam(value = "year") String year) {
PmKeyValueEnVo pmKeyValueEnVo = ensoImpactService.subzoneVai(type, year);
return AjaxResult.success(pmKeyValueEnVo);
}
@RequestMapping(value = "/countryVai", method = {RequestMethod.GET})
@ApiOperation(value = "各国AVI", httpMethod = "GET")
public AjaxResult countryVai(@RequestParam(value = "type") String type,
@RequestParam(value = "year") String year,
@RequestParam(value = "region") String region) {
PmKeyValueEnVo pmKeyValueEnVo = ensoImpactService.countryVai(type, year, region);
return AjaxResult.success(pmKeyValueEnVo);
}
@RequestMapping(value = "/subzoneVaiLine", method = {RequestMethod.GET})
@ApiOperation(value = "各地理亚区时间VAI", httpMethod = "GET")
public AjaxResult subzoneVaiLine(@RequestParam(value = "type") String type,
@RequestParam(value = "region") String region,
@RequestParam(value = "start") String start,
@RequestParam(value = "end") String end) {
PmKeyValueVo pmKeyValueVo = ensoImpactService.subzoneVaiLine(type, region, start, end);
return AjaxResult.success(pmKeyValueVo);
}
@RequestMapping(value = "/ensoYearEventCorresponding", method = {RequestMethod.GET})
@ApiOperation(value = "年份与ENSO事件对应关系", httpMethod = "GET")
public AjaxResult ensoYearEventCorresponding(@RequestParam(value = "year") String year) {
ENSOYearEventCorrespondingEntity ensoYearEventCorrespondingEntity = ensoImpactService.ensoYearEventCorresponding(year);
return AjaxResult.success(ensoYearEventCorrespondingEntity);
}
@RequestMapping(value = "/ensoEventRate", method = {RequestMethod.GET})
@ApiOperation(value = "四类ENSO事件空间分布统计", httpMethod = "GET")
public AjaxResult ensoEventRate(@RequestParam(value = "type") String type,
@RequestParam(value = "zone") String zone,
@RequestParam(value = "year") String year) {
ENSOEventRateEntity ensoEventRateEntity = ensoImpactService.ensoEventRate(type, zone, year);
return AjaxResult.success(ensoEventRateEntity);
}
@RequestMapping(value = "/ensoYearUnusualRate", method = {RequestMethod.GET})
@ApiOperation(value = "特定年份异常占比", httpMethod = "GET")
public AjaxResult ensoYearUnusualRate(@RequestParam(value = "year") String year,
@RequestParam(value = "zone") String zone,
@RequestParam(value = "type") String type) {
ENSOYearUnusualRateEntity ensoYearUnusualRateEntity = ensoImpactService.ensoYearUnusualRate(year, zone, type);
return AjaxResult.success(ensoYearUnusualRateEntity);
}
@RequestMapping(value = "/ensoMonthEvent", method = {RequestMethod.GET})
@ApiOperation(value = "逐月时间事件序列", httpMethod = "GET")
public AjaxResult ensoMonthEvent(@RequestParam(value = "zone") String zone,
@RequestParam(value = "type") String type) {
PmKeyValueVo pmKeyValueVo = ensoImpactService.ensoMonthEvent(type, zone);
return AjaxResult.success(pmKeyValueVo);
}
@RequestMapping(value = "/ensoEventAnalysis", method = {RequestMethod.GET})
@ApiOperation(value = "事件历史分析", httpMethod = "GET")
public AjaxResult ensoEventAnalysis(@RequestParam(value = "zone") String zone,
@RequestParam(value = "type") String type) {
ENSOEventAnalysisVo ensoEventAnalysisVo = ensoImpactService.ensoEventAnalysis(type, zone);
return AjaxResult.success(ensoEventAnalysisVo);
}
}

View File

@ -0,0 +1,70 @@
package com.ruoyi.web.controller.yada;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain_yada.*;
import com.ruoyi.system.domain_yada.vo.ForestProvinceChangeVo;
import com.ruoyi.system.domain_yada.vo.ForestProvinceCoverageVo;
import com.ruoyi.system.domain_yada.vo.PmKeyValueEnVo;
import com.ruoyi.system.service_yada.IForestDetectionService;
import com.ruoyi.system.service_yada.impl.ForestDetectionServiceImpl;
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;
/**
* @Author: JinSheng Song
* @Date: 2022/9/9 13:50
*/
@RestController
@RequestMapping(value = "/business-service/api/forest", produces = "application/json;charset=UTF-8")
@Api(tags = "森林检测")
public class ForestDetectionControer {
@Resource
private IForestDetectionService service;
@RequestMapping(value = "/select", method = {RequestMethod.GET})
public AjaxResult select(@RequestParam(value = "year1",required = false) String year1) {
ForestDetectionVO forest = new ForestDetectionVO();
List<ChangeTable> changes = service.selectChange();
List<CloumnarTable> cloumnars = service.selectCloumnar();
List<TypeTable> types = service.selectType(year1);
List<TypeConversion> conversions = service.selectConversion();
forest.setChanges(changes);
forest.setCloumnars(cloumnars);
forest.setTypes(types);
forest.setConversions(conversions);
return AjaxResult.success("成功", forest);
}
@RequestMapping(value = "/forestProvinceCoverage", method = {RequestMethod.GET})
@ApiOperation(value = "各省森林覆盖率", httpMethod = "GET")
public AjaxResult forestProvinceCoverage(@RequestParam(value = "country") String country) {
ForestProvinceCoverageVo forestProvinceCoverageVo = service.forestProvinceCoverage(country);
return AjaxResult.success(forestProvinceCoverageVo);
}
@RequestMapping(value = "/forestProvinceChange", method = {RequestMethod.GET})
@ApiOperation(value = "各省森林变化率", httpMethod = "GET")
public AjaxResult forestProvinceChange(@RequestParam(value = "country") String country) {
ForestProvinceChangeVo forestProvinceChangeVo = service.forestProvinceChange(country);
return AjaxResult.success(forestProvinceChangeVo);
}
}

View File

@ -22,7 +22,7 @@ import java.time.LocalDateTime;
import java.util.List;
/**
*全球各类型占比
* 全球各类型占比
*/
@RestController
@RequestMapping("/monitor/clobal")
@ -33,53 +33,49 @@ public class GlobalTypeController {
/**
* 查询方法
* @param response 响应头
* @param request 客户端请求
*
* @return 参数类
*/
@RequestMapping(value = "/selectGlobalType",method = {RequestMethod.POST})
@ApiOperation(value = "查询方法",httpMethod = "POST")
public AjaxResult selectGlobalType(HttpServletResponse response, HttpServletRequest request,@RequestBody GlobalTypeVO TypeVO)
{
List<GlobalTypeVO> eastVOSList= typeService.selectGlobalType(TypeVO.getTypeName(),TypeVO.getParticularYear());
@RequestMapping(value = "/selectGlobalType", method = {RequestMethod.POST})
@ApiOperation(value = "查询方法", httpMethod = "POST")
public AjaxResult selectGlobalType() {
List<GlobalTypeVO> eastVOSList = typeService.selectGlobalType();
return AjaxResult.success(eastVOSList);
}
/**
* 删除方法
*
* @param ID id
* @return 状态码
*/
@RequestMapping(value = "/DelGlobalType",method = {RequestMethod.DELETE})
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
@RequestMapping(value = "/DelGlobalType", method = {RequestMethod.DELETE})
@ApiOperation(value = "删除方法", httpMethod = "DELETE")
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
public AjaxResult DelGlobalType(@Param("ID") String ID)
{
public AjaxResult DelGlobalType(@Param("ID") String ID) {
int NUM = typeService.DelGlobalType(ID);
if (NUM>0)
{
if (NUM > 0) {
return AjaxResult.success();
}
return AjaxResult.error();
return AjaxResult.error();
}
/**
* 新增方法
*
* @param eastVOS 新增实体类
* @return 状态码
*/
@ApiOperation(value = "新增方法",httpMethod = "POST")
@RequestMapping(value = "/IntoGlobalType",method = {RequestMethod.POST})
public AjaxResult IntoGlobalType(@RequestBody GlobalTypeVO eastVOS)
{
@ApiOperation(value = "新增方法", httpMethod = "POST")
@RequestMapping(value = "/IntoGlobalType", method = {RequestMethod.POST})
public AjaxResult IntoGlobalType(@RequestBody GlobalTypeVO eastVOS) {
eastVOS.setCreateTime(LocalDateTime.now());
int NUM = typeService.IntoGlobalType(eastVOS);
if (NUM>0)
{
int NUM = typeService.IntoGlobalType(eastVOS);
if (NUM > 0) {
return AjaxResult.success();
}
return AjaxResult.error();
return AjaxResult.error();
}
}

View File

@ -0,0 +1,182 @@
package com.ruoyi.web.controller.yada;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain_yada.entity.*;
import com.ruoyi.system.domain_yada.vo.PmKeyValueEnVo;
import com.ruoyi.system.domain_yada.vo.PmKeyValueVo;
import com.ruoyi.system.domain_yada.vo.PmYearConcentrationRatioVo;
import com.ruoyi.system.service_yada.MonitorService;
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;
/**
* 亚大综合检测
*
* @author Mr.C
*/
@RestController
@RequestMapping("/business-service/api/monitor")
@Api(tags = "亚大综合检测")
public class MonitorController {
@Resource
private MonitorService monitorService;
@RequestMapping(value = "/corresponding", method = {RequestMethod.GET})
@ApiOperation(value = "亚大区域地理亚区与国家对应关系", httpMethod = "GET")
public AjaxResult countryCorresponding(@RequestParam(value = "region") String region) {
List<MonitorCountryCorrespondingEntity> list = monitorService.countryCorresponding(region);
if (list.isEmpty()) {
return AjaxResult.error("未查找到信息");
}
return AjaxResult.success(list);
}
@RequestMapping(value = "/provinceCorresponding", method = {RequestMethod.GET})
@ApiOperation(value = "国家与省份对应关系", httpMethod = "GET")
public AjaxResult provinceCorresponding(@RequestParam(value = "country") String country) {
List<ProvinceCorrespondingEntity> list = monitorService.provinceCorresponding(country);
if (list.isEmpty()) {
return AjaxResult.error("未查找到信息");
}
return AjaxResult.success(list);
}
@RequestMapping(value = "/eqiGrading", method = {RequestMethod.GET})
@ApiOperation(value = "亚大区域地理亚区EQI分级", httpMethod = "GET")
public AjaxResult eqiGrading(@RequestParam(value = "year") String year,
@RequestParam(value = "type") String type,
@RequestParam(value = "region") String region) {
MonitorEQIGradingEntity monitorEQIGradingEntity = monitorService.eqiGrading(year, type, region);
return AjaxResult.success(monitorEQIGradingEntity);
}
@RequestMapping(value = "/eqiAsia", method = {RequestMethod.GET})
@ApiOperation(value = "地理亚区平均EQI分布", httpMethod = "GET")
public AjaxResult eqiAsia(@RequestParam(value = "year") String year,
@RequestParam(value = "type") String type) {
PmKeyValueEnVo pmKeyValueEnVo = monitorService.eqiAsia(year, type);
return AjaxResult.success(pmKeyValueEnVo);
}
@RequestMapping(value = "/eqiCountry", method = {RequestMethod.GET})
@ApiOperation(value = "各国家平均EQI分布", httpMethod = "GET")
public AjaxResult eqiCountry(@RequestParam(value = "year") String year,
@RequestParam(value = "region") String region,
@RequestParam(value = "type") String type) {
PmKeyValueEnVo pmKeyValueEnVo = monitorService.eqiCountry(year, region, type);
return AjaxResult.success(pmKeyValueEnVo);
}
@RequestMapping(value = "/keqi", method = {RequestMethod.GET})
@ApiOperation(value = "各地理亚区平均KEQI分布", httpMethod = "GET")
public AjaxResult keqi(@RequestParam(value = "region") String region,
@RequestParam(value = "type") String type) {
MonitorKEQIEntity keqi = monitorService.keqi(type, region);
return AjaxResult.success(keqi);
}
@RequestMapping(value = "/keqiAsiaRate", method = {RequestMethod.GET})
@ApiOperation(value = "各地理亚区平均KEQI变化率", httpMethod = "GET")
public AjaxResult keqiAsiaRate(@RequestParam(value = "type") String type) {
PmKeyValueEnVo pmKeyValueEnVo = monitorService.keqiAsiaRate(type);
return AjaxResult.success(pmKeyValueEnVo);
}
@RequestMapping(value = "/keqiCountryRate", method = {RequestMethod.GET})
@ApiOperation(value = "各国平均KEQI变化率", httpMethod = "GET")
public AjaxResult keqiCountryRate(@RequestParam(value = "region") String region,
@RequestParam(value = "type") String type) {
PmKeyValueEnVo pmKeyValueEnVo = monitorService.keqiCountryRate(region, type);
return AjaxResult.success(pmKeyValueEnVo);
}
@RequestMapping(value = "/eqiAsiaLine", method = {RequestMethod.GET})
@ApiOperation(value = "各地理亚区平均EQI分布折线图", httpMethod = "GET")
public AjaxResult eqiAsiaLine(@RequestParam(value = "region") String region,
@RequestParam(value = "type") String type,
@RequestParam(value = "start") String start,
@RequestParam(value = "end") String end) {
PmKeyValueVo pmKeyValueVo = monitorService.eqiAsiaLine(region, type, start, end);
return AjaxResult.success(pmKeyValueVo);
}
@RequestMapping(value = "/eqiCountryGrading", method = {RequestMethod.GET})
@ApiOperation(value = "各国EQI分级", httpMethod = "GET")
public AjaxResult eqiCountryGrading(@RequestParam(value = "year") String year,
@RequestParam(value = "country") String country,
@RequestParam(value = "type") String type) {
MonitorEQICountryGradingEntity monitorEQICountryGradingEntity = monitorService.eqiCountryGrading(year, country, type);
return AjaxResult.success(monitorEQICountryGradingEntity);
}
@RequestMapping(value = "/keqiCountry", method = {RequestMethod.GET})
@ApiOperation(value = "各国平均KEQI分布", httpMethod = "GET")
public AjaxResult keqiCountry(@RequestParam(value = "country") String country,
@RequestParam(value = "type") String type) {
MonitorKEQICountryEntity monitorKEQICountryEntity = monitorService.keqiCountry(type, country);
return AjaxResult.success(monitorKEQICountryEntity);
}
@RequestMapping(value = "/keqiCambodia", method = {RequestMethod.GET})
@ApiOperation(value = "柬埔寨平均KEQI分布", httpMethod = "GET")
public AjaxResult keqiCambodia(@RequestParam(value = "type") String type,
@RequestParam(value = "province") String province) {
MonitorKEQICambodiaEntity monitorKEQICambodiaEntity = monitorService.keqiCambodia(type, province);
return AjaxResult.success(monitorKEQICambodiaEntity);
}
@RequestMapping(value = "/eqiCambodiaGrading", method = {RequestMethod.GET})
@ApiOperation(value = "各国EQI分级", httpMethod = "GET")
public AjaxResult eqiCambodiaGrading(@RequestParam(value = "year") String year,
@RequestParam(value = "province") String province,
@RequestParam(value = "type") String type) {
MonitorEQICambodiaGradingEntity monitorEQICambodiaGradingEntity = monitorService.eqiCambodiaGrading(year, type, province);
return AjaxResult.success(monitorEQICambodiaGradingEntity);
}
@RequestMapping(value = "/keqiProvinceRate", method = {RequestMethod.GET})
@ApiOperation(value = "各省平均KEQI变化率", httpMethod = "GET")
public AjaxResult keqiProvinceRate(@RequestParam(value = "country") String country,
@RequestParam(value = "type") String type) {
PmKeyValueEnVo pmKeyValueEnVo = monitorService.keqiProvinceRate(country, type);
return AjaxResult.success(pmKeyValueEnVo);
}
@RequestMapping(value = "/eqiProvince", method = {RequestMethod.GET})
@ApiOperation(value = "各省平均EQI分布", httpMethod = "GET")
public AjaxResult eqiProvince(@RequestParam(value = "country") String country,
@RequestParam(value = "year") String year,
@RequestParam(value = "type") String type) {
PmKeyValueEnVo pmKeyValueEnVo = monitorService.eqiProvince(country, year, type);
return AjaxResult.success(pmKeyValueEnVo);
}
@RequestMapping(value = "/eqiCountryLine", method = {RequestMethod.GET})
@ApiOperation(value = "各地理亚区平均EQI分布折线图", httpMethod = "GET")
public AjaxResult eqiCountryLine(@RequestParam(value = "country") String country,
@RequestParam(value = "type") String type) {
PmKeyValueVo pmKeyValueVo = monitorService.eqiCountryLine(country, type);
return AjaxResult.success(pmKeyValueVo);
}
@RequestMapping(value = "/eqiProvinceLine", method = {RequestMethod.GET})
@ApiOperation(value = "各省平均EQI分布折线图", httpMethod = "GET")
public AjaxResult eqiProvinceLine(@RequestParam(value = "province") String province,
@RequestParam(value = "type") String type) {
PmKeyValueVo pmKeyValueVo = monitorService.eqiProvinceLine(province, type);
return AjaxResult.success(pmKeyValueVo);
}
}

View File

@ -33,51 +33,49 @@ public class OceanTemperatureController {
/**
* 查询方法
*
* @return 参数类
*/
@RequestMapping(value = "/selectOcean",method = {RequestMethod.GET})
@ApiOperation(value = "查询方法",httpMethod = "GET")
public AjaxResult selectOcean(@RequestBody OceanTemperatureVO temperatureVO)
{
List<OceanTemperatureVO> eastVOSList= temperatureService.selectOcean(temperatureVO.getStartDate());
@RequestMapping(value = "/selectOcean", method = {RequestMethod.GET})
@ApiOperation(value = "查询方法", httpMethod = "GET")
public AjaxResult selectOcean(@RequestBody OceanTemperatureVO temperatureVO) {
List<OceanTemperatureVO> eastVOSList = temperatureService.selectOcean(temperatureVO.getStartDate());
return AjaxResult.success(eastVOSList);
}
/**
* 删除方法
*
* @param ID id
* @return 状态码
*/
@RequestMapping(value = "/DelOcean",method = {RequestMethod.DELETE})
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
@RequestMapping(value = "/DelOcean", method = {RequestMethod.DELETE})
@ApiOperation(value = "删除方法", httpMethod = "DELETE")
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
public AjaxResult DelOcean(@Param("ID") String ID)
{
public AjaxResult DelOcean(@Param("ID") String ID) {
int NUM = temperatureService.DelOcean(ID);
if (NUM>0)
{
if (NUM > 0) {
return AjaxResult.success();
}
return AjaxResult.error();
return AjaxResult.error();
}
/**
* 新增方法
*
* @param eastVOS 新增实体类
* @return 状态码
*/
@ApiOperation(value = "新增方法",httpMethod = "POST")
@RequestMapping(value = "/IntoAustralia",method = {RequestMethod.POST})
public AjaxResult IntoOcean(@RequestBody OceanTemperatureVO eastVOS)
{
@ApiOperation(value = "新增方法", httpMethod = "POST")
@RequestMapping(value = "/IntoAustralia", method = {RequestMethod.POST})
public AjaxResult IntoOcean(@RequestBody OceanTemperatureVO eastVOS) {
eastVOS.setCreateTime(LocalDateTime.now());
int NUM = temperatureService.IntoOcean(eastVOS);
if (NUM>0)
{
int NUM = temperatureService.IntoOcean(eastVOS);
if (NUM > 0) {
return AjaxResult.success();
}
return AjaxResult.error();
return AjaxResult.error();
}
}

View File

@ -0,0 +1,88 @@
package com.ruoyi.web.controller.yada;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain_yada.OceanTemperatureVO;
import com.ruoyi.system.domain_yada.vo.PmKeyValueEnVo;
import com.ruoyi.system.domain_yada.vo.PmKeyValueVo;
import com.ruoyi.system.domain_yada.vo.PmYearConcentrationRatioVo;
import com.ruoyi.system.service_yada.PmDataService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* @author Mr.C
*/
@Api(tags = "pm2.5数据变化")
@RestController
@RequestMapping(value = "/business-service/api/PM", produces = "application/json;charset=UTF-8")
public class PmDataController {
@Resource
private PmDataService pmDataService;
@RequestMapping(value = "/Average", method = {RequestMethod.GET})
@ApiOperation(value = "PM2.5年平均浓度", httpMethod = "GET")
public AjaxResult pmYearAverage(@RequestParam(value = "region") String region) {
PmKeyValueVo byRegion = pmDataService.findByRegion(region);
return AjaxResult.success(byRegion);
}
@RequestMapping(value = "/ChangeRate", method = {RequestMethod.GET})
@ApiOperation(value = "年澜湄5国PM2.5年平均浓度变化率", httpMethod = "GET")
public AjaxResult changeRate() {
PmKeyValueEnVo pmKeyValueEnVo = pmDataService.changeRate();
return AjaxResult.success(pmKeyValueEnVo);
}
@RequestMapping(value = "/YearRate", method = {RequestMethod.GET})
@ApiOperation(value = "PM2.5年平均浓度占比", httpMethod = "GET")
public AjaxResult yearRatio(@RequestParam(value = "year") String year,
@RequestParam(value = "region") String region) {
List<PmYearConcentrationRatioVo> pmYearConcentrationRatioVos = pmDataService.yearRatio(year,region);
return AjaxResult.success(pmYearConcentrationRatioVos);
}
@RequestMapping(value = "/YearAverage", method = {RequestMethod.GET})
@ApiOperation(value = "澜湄5国PM2.5年平均浓度", httpMethod = "GET")
public AjaxResult average(@RequestParam(value = "year") String year) {
PmKeyValueEnVo average = pmDataService.average(year);
return AjaxResult.success(average);
}
@RequestMapping(value = "/ChangeRateRatio", method = {RequestMethod.GET})
@ApiOperation(value = "2016-2020年PM2.5年平均浓度变化率占比", httpMethod = "GET")
public AjaxResult changeRateRatio(@RequestParam(value = "year") String year,
@RequestParam(value = "region") String region) {
List<PmYearConcentrationRatioVo> pmYearConcentrationRatioVos = pmDataService.changeRateRatio(year,region);
return AjaxResult.success(pmYearConcentrationRatioVos);
}
@RequestMapping(value = "/MonthAverage", method = {RequestMethod.GET})
@ApiOperation(value = "PM2.5月平均浓度", httpMethod = "GET")
public AjaxResult monthAverage(@RequestParam(value = "year") String year,
@RequestParam(value = "region") String region) {
PmKeyValueEnVo pmKeyValueEnVo = pmDataService.monthAverage(year, region);
return AjaxResult.success(pmKeyValueEnVo);
}
@RequestMapping(value = "/ProvinceAverage", method = {RequestMethod.GET})
@ApiOperation(value = "各省PM2.5平均浓度", httpMethod = "GET")
public AjaxResult provinceAverage(@RequestParam(value = "year") String year,
@RequestParam(value = "country") String country) {
PmKeyValueEnVo pmKeyValueEnVo = pmDataService.provinceAverage(year, country);
return AjaxResult.success(pmKeyValueEnVo);
}
@RequestMapping(value = "/ProvinceChangeRate", method = {RequestMethod.GET})
@ApiOperation(value = "各省PM2.5年之间变化", httpMethod = "GET")
public AjaxResult provinceChangeRate(@RequestParam(value = "year") String year,
@RequestParam(value = "country") String country) {
PmKeyValueEnVo pmKeyValueEnVo = pmDataService.provinceChangeRate(year, country);
return AjaxResult.success(pmKeyValueEnVo);
}
}

View File

@ -21,61 +21,59 @@ import java.time.LocalDateTime;
import java.util.List;
/**
* 各区域VGI
* 各区域VGI
*/
@Api(tags = "各区域VGI")
@RestController
@RequestMapping(value = "/business-service/api/orderMng", produces = "application/json;charset=UTF-8")
public class RegionVGIController
{
public class RegionVGIController {
@Resource
private IRegionVGIService regionVGIService;
/**
* 查询方法
*
* @return 参数类
*/
@RequestMapping(value = "/SelectRegion",method = {RequestMethod.GET})
@ApiOperation(value = "查询方法",httpMethod = "GET")
public AjaxResult SelectRegion()
{
List<RegionVGIVO> vgivost= regionVGIService.selectRegion();
@RequestMapping(value = "/SelectRegion", method = {RequestMethod.GET})
@ApiOperation(value = "查询方法", httpMethod = "GET")
public AjaxResult SelectRegion() {
List<RegionVGIVO> vgivost = regionVGIService.selectRegion();
return AjaxResult.success(vgivost);
}
/**
* 删除方法
*
* @param ID id
* @return 状态码
*/
@RequestMapping(value = "/DelRegion",method = {RequestMethod.DELETE})
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
@RequestMapping(value = "/DelRegion", method = {RequestMethod.DELETE})
@ApiOperation(value = "删除方法", httpMethod = "DELETE")
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
public AjaxResult DelRegion(@Param("ID") String ID)
{
public AjaxResult DelRegion(@Param("ID") String ID) {
int NUM = regionVGIService.DelRegion(ID);
if (NUM>0)
{
if (NUM > 0) {
return AjaxResult.success();
}
return AjaxResult.error();
return AjaxResult.error();
}
/**
* 新增方法
*
* @param vgivo 新增实体类
* @return 状态码
*/
@ApiOperation(value = "新增方法",httpMethod = "POST")
@RequestMapping(value = "/IntoRegion",method = {RequestMethod.POST})
public AjaxResult IntoRegion(@RequestBody RegionVGIVO vgivo)
{
@ApiOperation(value = "新增方法", httpMethod = "POST")
@RequestMapping(value = "/IntoRegion", method = {RequestMethod.POST})
public AjaxResult IntoRegion(@RequestBody RegionVGIVO vgivo) {
vgivo.setCreatedTime(LocalDateTime.now());
int NUM = regionVGIService.IntoRegion(vgivo);
if (NUM>0)
{
int NUM = regionVGIService.IntoRegion(vgivo);
if (NUM > 0) {
return AjaxResult.success();
}
return AjaxResult.error();
return AjaxResult.error();
}
}

View File

@ -27,50 +27,48 @@ public class RegionalSystemController {
/**
* 查询方法
*
* @return 参数类
*/
@RequestMapping(value = "/selectRegional",method = {RequestMethod.GET})
@ApiOperation(value = "查询方法",httpMethod = "GET")
public AjaxResult selectRegional(@RequestParam("region") String region)
{
List<RegionalSystemVO> eastVOSList= systemService.selectRegional(region);
@RequestMapping(value = "/selectRegional", method = {RequestMethod.GET})
@ApiOperation(value = "查询方法", httpMethod = "GET")
public AjaxResult selectRegional(@RequestParam("region") String region) {
List<RegionalSystemVO> eastVOSList = systemService.selectRegional(region);
return AjaxResult.success(eastVOSList);
}
/**
* 删除方法
*
* @param ID id
* @return 状态码
*/
@RequestMapping(value = "/DelRegional",method = {RequestMethod.DELETE})
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
@RequestMapping(value = "/DelRegional", method = {RequestMethod.DELETE})
@ApiOperation(value = "删除方法", httpMethod = "DELETE")
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
public AjaxResult DelRegional(@RequestParam("ID") String ID)
{
public AjaxResult DelRegional(@RequestParam("ID") String ID) {
int NUM = systemService.DelRegional(ID);
if (NUM>0)
{
if (NUM > 0) {
return AjaxResult.success();
}
return AjaxResult.error();
return AjaxResult.error();
}
/**
* 新增方法
*
* @param eastVOS 新增实体类
* @return 状态码
*/
@ApiOperation(value = "新增方法",httpMethod = "POST")
@RequestMapping(value = "/IntoRegional",method = {RequestMethod.POST})
public AjaxResult IntoRegional(@RequestBody RegionalSystemVO eastVOS)
{
@ApiOperation(value = "新增方法", httpMethod = "POST")
@RequestMapping(value = "/IntoRegional", method = {RequestMethod.POST})
public AjaxResult IntoRegional(@RequestBody RegionalSystemVO eastVOS) {
eastVOS.setCreateTime(LocalDateTime.now());
int NUM = systemService.IntoRegional(eastVOS);
if (NUM>0)
{
int NUM = systemService.IntoRegional(eastVOS);
if (NUM > 0) {
return AjaxResult.success();
}
return AjaxResult.error();
return AjaxResult.error();
}
}

View File

@ -56,6 +56,7 @@ public class SpecialController {
private IRegionalSystemService systemService;
/**
*
*/
@RequestMapping(value = "/helpSaveExcel")
@ -65,25 +66,23 @@ public class SpecialController {
return IntoRegion(value);
}
@RequestMapping(value = "/helpWeatherClass",method = {RequestMethod.GET})
public AjaxResult helpWeatherClass(String city,String type)
{
String url="https://restapi.amap.com/v3/weather/weatherInfo";
Map<String,String> map=new HashMap<>();
map.put("key","37087f0a3007dc67d37859553cd02d33");
map.put("city",city);
if (type!=null){ map.put("extensions",type);}
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);
@RequestMapping(value = "/helpWeatherClass", method = {RequestMethod.GET})
public AjaxResult helpWeatherClass(String city, String type) {
String url = "https://restapi.amap.com/v3/weather/weatherInfo";
Map<String, String> map = new HashMap<>();
map.put("key", "37087f0a3007dc67d37859553cd02d33");
map.put("city", city);
if (type != null) {
map.put("extensions", type);
}
map.put("output", "json");
String value = WeatherUtils.httpRequest(url, map);
WeatherUtilsVO vo = JSON.parseObject(value, WeatherUtilsVO.class);
return AjaxResult.success(vo);
} /**
}
/**
* 森林覆盖率模板导入
*/
@RequestMapping(value = "/helpExcelAorest")
@ -94,7 +93,7 @@ public class SpecialController {
}
/**
*平均植被覆盖度和净初级生产力
* 平均植被覆盖度和净初级生产力
*/
@RequestMapping(value = "/helpExcelnpp")
private AjaxResult helpExcelnpp(@RequestBody MultipartFile file) {
@ -123,18 +122,16 @@ public class SpecialController {
return IntoRegional(value);
}
public AjaxResult IntoRegional(List<RegionalSystemVO> eastVOS)
{
public AjaxResult IntoRegional(List<RegionalSystemVO> eastVOS) {
try {
for (int i = 0; i < eastVOS.size(); i++) {
eastVOS.get(i).setCreateTime(LocalDateTime.now());
systemService.IntoRegional(eastVOS.get(i));
}
return AjaxResult.success();
}
catch (Exception E){
} catch (Exception E) {
E.getMessage();
return AjaxResult.error(E.getMessage());
return AjaxResult.error(E.getMessage());
}
}
@ -159,33 +156,29 @@ public class SpecialController {
}
public AjaxResult IntoAorestCoverage(List<AorestCoverageVO> eastVOS)
{
public AjaxResult IntoAorestCoverage(List<AorestCoverageVO> eastVOS) {
try {
for (int i = 0; i < eastVOS.size(); i++) {
eastVOS.get(i).setCreateTime(LocalDateTime.now());
service.IntoAorestCoverage(eastVOS.get(i));
}
return AjaxResult.success();
}
catch (Exception E){
} catch (Exception E) {
E.getMessage();
return AjaxResult.error(E.getMessage());
return AjaxResult.error(E.getMessage());
}
}
public AjaxResult IntoVegetation(List<VegetationCoverageVO> eastVOS)
{
public AjaxResult IntoVegetation(List<VegetationCoverageVO> eastVOS) {
try {
for (int i = 0; i < eastVOS.size(); i++) {
eastVOS.get(i).setCreateTime(LocalDateTime.now());
coverageService.IntoVegetation(eastVOS.get(i));
}
return AjaxResult.success();
}
catch (Exception E){
} catch (Exception E) {
E.getMessage();
return AjaxResult.error(E.getMessage());
return AjaxResult.error(E.getMessage());
}
}

View File

@ -0,0 +1,94 @@
package com.ruoyi.web.controller.yada;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain_yada.SpecialVO;
import com.ruoyi.system.domain_yada.UploadSpecialVO;
import com.ruoyi.system.service_yada.ISpecialReportService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.aspectj.weaver.loadtime.Aj;
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/Special", produces = "application/json;charset=UTF-8")
@Api(tags = "专题报告")
public class SpecialReportController {
@Resource
private ISpecialReportService service;
@RequestMapping(value = "/getSpecial", method = {RequestMethod.GET})
@ApiOperation(value = "返回专题数据", httpMethod = "GET")
public AjaxResult getSpecial(String zone) {
List<SpecialVO> value = service.selectSpecial(zone);
return AjaxResult.success(value);
}
@RequestMapping(value = "/DelSpecial", method = {RequestMethod.GET})
@ApiOperation(value = "删除专题数据", httpMethod = "GET")
public AjaxResult DelSpecial(@RequestParam("id") Integer id) {
Integer value = service.DelSpecial(id);
if (value > 0) {
return AjaxResult.success("成功!");
} else {
return AjaxResult.error();
}
}
@RequestMapping(value = "/updateUploadSpecial", method = {RequestMethod.GET})
@ApiOperation(value = "修改下载数量", httpMethod = "GET")
public AjaxResult updateUploadSpecial(@RequestParam("id") Integer id) {
Integer value = service.updateUploadSpecial(id);
if (value > 0) {
return AjaxResult.success("成功!");
}
return AjaxResult.error();
}
@RequestMapping(value = "/getUploadSpecial")
@ApiOperation(value = "返回专题通报")
public AjaxResult getUploadSpecial(String fileName) {
List<UploadSpecialVO> value = service.selectUploadSpecial(fileName);
return AjaxResult.success(value);
}
@RequestMapping(value = "/getUploadStandard")
@ApiOperation(value = "返回专题规范")
public AjaxResult getUploadStandard(String fileName) {
List<UploadSpecialVO> value = service.selectUploadSpecial1(fileName);
return AjaxResult.success(value);
}
@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/陆域中文1130.pdf";
break;
case "en":
route = "avatar/word/陆域中文1130.pdf";
break;
default:
return AjaxResult.error("未找到对应路径");
}
return AjaxResult.success(route);
}
}

View File

@ -4,6 +4,7 @@ import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.file.FileUploadUtils;
import com.ruoyi.common.utils.file.FileUtils;
import com.ruoyi.system.domain_yada.MapServicesVO;
import com.ruoyi.system.domain_yada.ThematicMapDomain;
import com.ruoyi.system.service_yada.ThematicMapService;
import io.swagger.annotations.*;
@ -22,6 +23,7 @@ import java.util.List;
/**
* 专题图模块
*
* @author taco chen
*/
@RestController
@ -33,56 +35,79 @@ public class ThematicMapController {
private ThematicMapService thematicMapService;
/**
* 查询方法
* 查询专题图
*
* @param response 响应头
* @return 参数类
*/
@ApiOperation("获取所有专题图")
@ApiImplicitParams({})
@ApiResponses({
@ApiResponse(code =200,message = "请求成功"),
@ApiResponse(code =401,message = "没有认证"),
@ApiResponse(code =403,message = "权限不足"),
@ApiResponse(code =404,message = "未找到")
@ApiResponse(code = 200, message = "请求成功"),
@ApiResponse(code = 401, message = "没有认证"),
@ApiResponse(code = 403, message = "权限不足"),
@ApiResponse(code = 404, message = "未找到")
})
@RequestMapping(value = "/get/all",method = {RequestMethod.POST})
public AjaxResult selectAllThematicMap(HttpServletResponse response,@RequestBody ThematicMapDomain thematicMapDomain)
{
List<ThematicMapDomain> res= thematicMapService.selectAll(thematicMapDomain.getPictureType(),
thematicMapDomain.getPictureTypeOne(),thematicMapDomain.getPictureTypeTwo());
@RequestMapping(value = "/get/all", method = {RequestMethod.POST})
public AjaxResult selectAllThematicMap(HttpServletResponse response, @RequestBody ThematicMapDomain thematicMapDomain) {
List<ThematicMapDomain> res = thematicMapService.selectAll(thematicMapDomain.getPictureType(),
thematicMapDomain.getPictureTypeOne(), thematicMapDomain.getPictureTypeTwo());
return AjaxResult.success(res);
}
/**
* 查询地图服务
*
* @param response 响应头
* @return 参数类
*/
@ApiOperation("所有地图服务")
@ApiImplicitParams({})
@ApiResponses({
@ApiResponse(code = 200, message = "请求成功"),
@ApiResponse(code = 401, message = "没有认证"),
@ApiResponse(code = 403, message = "权限不足"),
@ApiResponse(code = 404, message = "未找到")
})
@RequestMapping(value = "/get/map", method = {RequestMethod.GET})
public AjaxResult selectMap(HttpServletResponse response,
String chartType, String chartName, String particularYear) {
List<MapServicesVO> res = thematicMapService.selMapServers(chartName, chartType, particularYear);
return AjaxResult.success(res);
}
/**
* 删除方法
*
* @param id id
* @return 状态码
*/
@RequestMapping(value = "/delete",method = {RequestMethod.DELETE})
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
@RequestMapping(value = "/delete", method = {RequestMethod.DELETE})
@ApiOperation(value = "删除方法", httpMethod = "DELETE")
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "long", paramType = "path", dataTypeClass = long.class)
public AjaxResult deleteThematicMap(@Param("id") Long id)
{
public AjaxResult deleteThematicMap(@Param("id") Long id) {
int num = thematicMapService.deleteById(id);
if (num>0) {
if (num > 0) {
return AjaxResult.success();
}
return AjaxResult.error();
return AjaxResult.error();
}
/**
* 新增方法
*
* @param thematicMapDomain 新增实体类
* @return 状态码
*/
@ApiOperation(value = "新增方法",httpMethod = "POST")
@RequestMapping(value = "/add",method = {RequestMethod.POST})
public AjaxResult saveThematicMap(@RequestBody ThematicMapDomain thematicMapDomain)
{
@ApiOperation(value = "新增方法", httpMethod = "POST")
@RequestMapping(value = "/add", method = {RequestMethod.POST})
public AjaxResult saveThematicMap(@RequestBody ThematicMapDomain thematicMapDomain) {
thematicMapDomain.setCreatedTime(LocalDateTime.now());
int num = thematicMapService.save(thematicMapDomain);
if (num>0) {
if (num > 0) {
return AjaxResult.success();
}
return AjaxResult.error();

View File

@ -33,52 +33,50 @@ public class UrbanController {
/**
* 查询方法
*
* @param response 响应头
* @param request 客户端请求
* @param request 客户端请求
* @return 参数类
*/
@RequestMapping(value = "/selectUrban",method = {RequestMethod.GET})
@ApiOperation(value = "查询方法",httpMethod = "GET")
public AjaxResult selectUrban(HttpServletResponse response, HttpServletRequest request,@RequestBody UrbanVO urbanVO)
{
List<UrbanVO> eastVOSList= urbanService.selectUrban(urbanVO.getName(),urbanVO.getParticularYear());
@RequestMapping(value = "/selectUrban", method = {RequestMethod.GET})
@ApiOperation(value = "查询方法", httpMethod = "GET")
public AjaxResult selectUrban(HttpServletResponse response, HttpServletRequest request, @RequestBody UrbanVO urbanVO) {
List<UrbanVO> eastVOSList = urbanService.selectUrban(urbanVO.getName(), urbanVO.getParticularYear());
return AjaxResult.success(eastVOSList);
}
/**
* 删除方法
*
* @param ID id
* @return 状态码
*/
@RequestMapping(value = "/DelUrban",method = {RequestMethod.DELETE})
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
public AjaxResult DelUrban(@Param("ID") String ID)
{
@RequestMapping(value = "/DelUrban", method = {RequestMethod.DELETE})
@ApiOperation(value = "删除方法", httpMethod = "DELETE")
public AjaxResult DelUrban(@Param("ID") String ID) {
int NUM = urbanService.DelUrban(ID);
if (NUM>0)
{
if (NUM > 0) {
return AjaxResult.success();
}
return AjaxResult.error();
return AjaxResult.error();
}
/**
* 新增方法
*
* @param eastVOS 新增实体类
* @return 状态码
*/
@ApiOperation(value = "新增方法",httpMethod = "POST")
@RequestMapping(value = "/IntoUrban",method = {RequestMethod.POST})
@ApiOperation(value = "新增方法", httpMethod = "POST")
@RequestMapping(value = "/IntoUrban", method = {RequestMethod.POST})
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "long", paramType = "path", dataTypeClass = long.class)
public AjaxResult IntoUrban(@RequestBody UrbanVO eastVOS)
{
public AjaxResult IntoUrban(@RequestBody UrbanVO eastVOS) {
eastVOS.setCreateTime(LocalDateTime.now());
int NUM = urbanService.IntoUrban(eastVOS);
if (NUM>0)
{
int NUM = urbanService.IntoUrban(eastVOS);
if (NUM > 0) {
return AjaxResult.success();
}
return AjaxResult.error();
return AjaxResult.error();
}
}

View File

@ -33,50 +33,48 @@ public class VegetationCoverageController {
/**
* 查询方法
*
* @return 参数类
*/
@RequestMapping(value = "/selectVegetation",method = {RequestMethod.GET})
@ApiOperation(value = "查询方法",httpMethod = "GET")
public AjaxResult selectVegetation()
{
List<VegetationCoverageVO> eastVOSList= coverageService.selectVegetation();
@RequestMapping(value = "/selectVegetation", method = {RequestMethod.GET})
@ApiOperation(value = "查询方法", httpMethod = "GET")
public AjaxResult selectVegetation(String type) {
List<VegetationCoverageVO> eastVOSList = coverageService.selectVegetation(type);
return AjaxResult.success(eastVOSList);
}
/**
* 删除方法
*
* @param ID id
* @return 状态码
*/
@RequestMapping(value = "/DelVegetation",method = {RequestMethod.DELETE})
@ApiOperation(value = "删除方法",httpMethod = "DELETE")
@RequestMapping(value = "/DelVegetation", method = {RequestMethod.DELETE})
@ApiOperation(value = "删除方法", httpMethod = "DELETE")
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "long", paramType = "path", dataTypeClass = long.class)
public AjaxResult DelVegetation(@Param("ID") String ID)
{
public AjaxResult DelVegetation(@Param("ID") String ID) {
int NUM = coverageService.DelVegetation(ID);
if (NUM>0)
{
if (NUM > 0) {
return AjaxResult.success();
}
return AjaxResult.error();
return AjaxResult.error();
}
/**
* 新增方法
*
* @param eastVOS 新增实体类
* @return 状态码
*/
@ApiOperation(value = "新增方法",httpMethod = "POST")
@RequestMapping(value = "/IntoVegetation",method = {RequestMethod.POST})
public AjaxResult IntoVegetation(@RequestBody VegetationCoverageVO eastVOS)
{
@ApiOperation(value = "新增方法", httpMethod = "POST")
@RequestMapping(value = "/IntoVegetation", method = {RequestMethod.POST})
public AjaxResult IntoVegetation(@RequestBody VegetationCoverageVO eastVOS) {
eastVOS.setCreateTime(LocalDateTime.now());
int NUM = coverageService.IntoVegetation(eastVOS);
if (NUM>0)
{
int NUM = coverageService.IntoVegetation(eastVOS);
if (NUM > 0) {
return AjaxResult.success();
}
return AjaxResult.error();
return AjaxResult.error();
}
}

View File

@ -0,0 +1,31 @@
package com.ruoyi.web.controller.yada;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain_yada.Dictionary;
import com.ruoyi.system.service_yada.IAorestCoverageService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author: JinSheng Song
* @Date: 2022/7/14 11:56
*/
@RestController
@RequestMapping(value = "/dictionary", produces = "application/json;charset=UTF-8")
public class dictionaryController {
@Resource
private IAorestCoverageService service;
@RequestMapping(value = "/select", method = {RequestMethod.GET})
public AjaxResult Dictionary(String type) {
List<Dictionary> diclist = service.selectDic(type);
return AjaxResult.success(diclist);
}
}

View File

@ -2,24 +2,24 @@
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
# driverClassName: com.mysql.cj.jdbc.Driver
# driverClassName: com.mysql.cj.jdbc.Driver
driver-class-name: org.postgresql.Driver
druid:
master:
#url: jdbc:postgresql://47.243.79.66:5432/yada?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=Asia/Shanghai
url: jdbc:postgresql://121.36.229.60:5432/yada?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=Asia/Shanghai
#url: jdbc:postgresql://192.168.2.9:5432/yada?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=Asia/Shanghai
# username: postgres
# password: postgres
url: jdbc:postgresql://118.195.242.28:5432/yada?AllowPublicKeyRetrieval=True&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
username: gty
password: 308525
username: sjs
password: song5325
# url: jdbc:mysql://192.168.2.9:3306/nuoyi?AllowPublicKeyRetrieval=True&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
# username: saas
# password: XKrs123.
# 从库数据源
slave:
# 从数据源开关/默认关闭
enabled: false
url:
username:
password:
url:
username:
password:
# 初始连接数
initialSize: 5
# 最小连接池数量
@ -35,12 +35,12 @@ spring:
# 配置一个连接在池中最大生存的时间,单位是毫秒
maxEvictableIdleTimeMillis: 900000
# 配置检测连接是否有效select * from pg_stat_activity
# validationQuery: SELECT 1 FROM DUAL
# validationQuery: SELECT 1 FROM DUAL
validationQuery: SELECT version()
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
webStatFilter:
webStatFilter:
enabled: true
statViewServlet:
enabled: true

View File

@ -9,7 +9,7 @@ ruoyi:
# 实例演示开关
demoEnabled: true
# 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath
profile: /home/gty/ruoyi/uploadPath
profile: /home/sjs/ruoyi/uploadPath
# 获取ip地址开关
addressEnabled: false
# 验证码类型 math 数组计算 char 字符验证
@ -18,8 +18,8 @@ ruoyi:
# 开发环境配置
server:
# 服务器的HTTP端口默认为8080
port: 8080
#port: 6061
port: 6061
#port: 8080
servlet:
# 应用的访问路径
context-path: /
@ -66,7 +66,7 @@ spring:
# 数据库索引
database: 0
# 密码
password: '*&jkjusWETO(^ses%i'
password: sdust2020
# 连接超时时间
timeout: 10s
lettuce:

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!-- 日志存放路径 -->
<property name="log.path" value="/home/ruoyi/logs" />
<property name="log.path" value="/home/sjs/ruoyi/logs/yada" />
<!-- 日志输出格式 -->
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />