ENSO影响监测

This commit is contained in:
2023-02-28 14:49:13 +08:00
parent 41ad8eebc3
commit d6a411e858
18 changed files with 1421 additions and 271 deletions

View File

@ -0,0 +1,109 @@
package com.ruoyi.web.controller.yada;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain_yada.entity.ENSOEventAnalysisEntity;
import com.ruoyi.system.domain_yada.entity.ENSOEventRateEntity;
import com.ruoyi.system.domain_yada.entity.ENSOMonthEventEntity;
import com.ruoyi.system.domain_yada.entity.ENSOYearUnusualRateEntity;
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 = "/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

@ -1,70 +0,0 @@
package com.ruoyi.web.controller.yada;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain_yada.entity.MonitorCountryCorrespondingEntity;
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.ESNOImpactService;
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 ESNOImpactController {
@Resource
private ESNOImpactService esnoImpactService;
@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 = esnoImpactService.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 = esnoImpactService.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 = esnoImpactService.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 = esnoImpactService.subzoneVaiLine(type, region,start, end);
return AjaxResult.success(pmKeyValueVo);
}
}