diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/AorestCoverageController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/AorestCoverageController.java index a998f9f39..6da94fe94 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/AorestCoverageController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/AorestCoverageController.java @@ -1,21 +1,27 @@ package com.ruoyi.web.controller.yada; +import com.ruoyi.common.config.RuoYiConfig; import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.system.domain_yada.AorestCoverageVO; -import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO; +import com.ruoyi.common.utils.file.FileUploadUtils; +import com.ruoyi.common.utils.file.FileUtils; +import com.ruoyi.system.domain_yada.*; import com.ruoyi.system.service_yada.IAorestCoverageService; import com.ruoyi.system.service_yada.IAustraliaMiddleEastService; +import com.ruoyi.system.service_yada.ThematicMapService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.xml.crypto.Data; +import java.security.Guard; import java.text.SimpleDateFormat; import java.time.LocalDateTime; import java.util.List; @@ -25,17 +31,22 @@ import java.util.List; */ @RestController @RequestMapping(value = "/business-service/api/Aorest", produces = "application/json;charset=UTF-8") +@Api(tags = "森林覆盖率") public class AorestCoverageController { @Resource private IAorestCoverageService service; + @Resource + private ThematicMapService thematicMapService; + /** * 查询方法 * @param response 响应头 * @param request 客户端请求 * @return 参数类 */ - @RequestMapping(value = "/selectAorestCoverage",method = {RequestMethod.POST}) + @RequestMapping(value = "/selectAorestCoverage",method = {RequestMethod.GET}) + @ApiOperation(value = "查询方法",httpMethod = "GET") public AjaxResult selectAorestCoverage(HttpServletResponse response, HttpServletRequest request) { List eastVOSList= service.selectAorestCoverage(); @@ -44,10 +55,12 @@ public class AorestCoverageController { /** * 删除方法 - * @param ID 单据id + * @param ID id * @return 状态码 */ - @RequestMapping(value = "/DelAorestCoverage",method = {RequestMethod.POST}) + @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) { int NUM = service.DelAorestCoverage(ID); @@ -65,9 +78,12 @@ public class AorestCoverageController { * @return 状态码 */ @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) @@ -80,6 +96,79 @@ public class AorestCoverageController { 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(); + + ThematicMapDomain domain=new ThematicMapDomain(); + + UploadFile value= null; + try { + value = uploadFile(file,upload); + } catch (Exception e) { + e.printStackTrace(); + } + + int NUM = service.IntoUpload(value); + domain.setPictureCode(value.getFileId()); + +// domain.setCreatedTime(LocalDateTime.now()); +// +// +// thematicMapService.save(domain); + if (NUM>0) + { + return AjaxResult.success(); + } + return AjaxResult.error(); + } + + + /** + * 文件查询 + * @param response 头 + * @param request 客户端请求 + * @return + */ + @RequestMapping(value = "/selectUpload",method = {RequestMethod.GET}) + @ApiOperation(value = "文件查询",httpMethod = "GET") + public AjaxResult selectUpload(HttpServletResponse response, HttpServletRequest request,@RequestBody UploadFile upload) + { + List eastVOSList= service.selectUpload(upload); + return AjaxResult.success(eastVOSList); + } + + + + + public UploadFile uploadFile(MultipartFile file,UploadFile upload) throws Exception + { + // 上传文件路径 + String filePath = RuoYiConfig.getUploadPath(); + // 上传并返回新文件名称 + String fileName = FileUploadUtils.upload(filePath, file); + upload.setFileId(String.valueOf(System.currentTimeMillis())); + upload.setFileName(file.getOriginalFilename()); + upload.setFilePath(fileName); + upload.setFileSize(String.valueOf(file.getSize())); + upload.setCreateTime(LocalDateTime.now()); + return upload; + } + + @RequestMapping(value = "/Dictionary") + @ApiOperation(value = "字典查询",httpMethod = "POST") + public AjaxResult Dictionary(@RequestBody Dictionary dic) + { + List diclist=service.selectDic(dic); + return AjaxResult.success(diclist); + } + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/AustraliaMiddleEastController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/AustraliaMiddleEastController.java index c02ec3642..d63cf544f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/AustraliaMiddleEastController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/AustraliaMiddleEastController.java @@ -3,6 +3,9 @@ package com.ruoyi.web.controller.yada; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.system.service_yada.IAustraliaMiddleEastService; import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestBody; @@ -21,6 +24,7 @@ import java.util.List; */ @RestController @RequestMapping(value = "/business-service/api/Australia", produces = "application/json;charset=UTF-8") +@Api(tags = "澳大利亚中东部地区") public class AustraliaMiddleEastController { @Resource @@ -32,7 +36,8 @@ public class AustraliaMiddleEastController * @param request 客户端请求 * @return 实体类 */ - @RequestMapping(value = "/SelectAustralia",method = {RequestMethod.POST}) + @ApiOperation(value = "查询方法",httpMethod = "GET") + @RequestMapping(value = "/SelectAustralia",method = {RequestMethod.GET}) public AjaxResult SelectAustralia(HttpServletResponse response, HttpServletRequest request) { List eastVOSList= australiaMiddleEastService.selectAustralia(); @@ -41,10 +46,12 @@ public class AustraliaMiddleEastController /** * 删除方法 - * @param ID 单据id + * @param ID id * @return 状态码 */ - @RequestMapping(value = "/DelAustralia",method = {RequestMethod.POST}) + @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) { int NUM = australiaMiddleEastService.DelAustralia(ID); @@ -62,6 +69,7 @@ public class AustraliaMiddleEastController * @return 状态码 */ @RequestMapping(value = "/IntoAustralia",method = {RequestMethod.POST}) + @ApiOperation(value = "新增方法",httpMethod = "POST") public AjaxResult IntoAustralia(@RequestBody AustraliaMiddleEastVO eastVOS) { eastVOS.setCreateTime(LocalDateTime.now()); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/GlobalTypeController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/GlobalTypeController.java index 860257f25..60716f416 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/GlobalTypeController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/GlobalTypeController.java @@ -5,6 +5,9 @@ import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO; import com.ruoyi.system.domain_yada.GlobalTypeVO; import com.ruoyi.system.service_yada.IAustraliaMiddleEastService; import com.ruoyi.system.service_yada.IGlobalTypeService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestBody; @@ -23,6 +26,7 @@ import java.util.List; */ @RestController @RequestMapping("/monitor/clobal") +@Api(tags = "全球各类型占比") public class GlobalTypeController { @Resource private IGlobalTypeService typeService; @@ -34,18 +38,21 @@ public class GlobalTypeController { * @return 参数类 */ @RequestMapping(value = "/selectGlobalType",method = {RequestMethod.POST}) - public AjaxResult selectGlobalType(HttpServletResponse response, HttpServletRequest request) + @ApiOperation(value = "查询方法",httpMethod = "POST") + public AjaxResult selectGlobalType(HttpServletResponse response, HttpServletRequest request,@RequestBody GlobalTypeVO TypeVO) { - List eastVOSList= typeService.selectGlobalType(); + List eastVOSList= typeService.selectGlobalType(TypeVO.getTypeName(),TypeVO.getParticularYear()); return AjaxResult.success(eastVOSList); } /** * 删除方法 - * @param ID 单据id + * @param ID id * @return 状态码 */ - @RequestMapping(value = "/DelGlobalType",method = {RequestMethod.POST}) + @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) { int NUM = typeService.DelGlobalType(ID); @@ -62,6 +69,7 @@ public class GlobalTypeController { * @param eastVOS 新增实体类 * @return 状态码 */ + @ApiOperation(value = "新增方法",httpMethod = "POST") @RequestMapping(value = "/IntoGlobalType",method = {RequestMethod.POST}) public AjaxResult IntoGlobalType(@RequestBody GlobalTypeVO eastVOS) { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/OceanTemperatureController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/OceanTemperatureController.java index 84447d796..9d173a7f9 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/OceanTemperatureController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/OceanTemperatureController.java @@ -5,6 +5,9 @@ import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO; import com.ruoyi.system.domain_yada.OceanTemperatureVO; import com.ruoyi.system.service_yada.IAustraliaMiddleEastService; import com.ruoyi.system.service_yada.IOceanTemperatureService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestBody; @@ -21,6 +24,7 @@ import java.util.List; /** * 海洋表面温度监测 */ +@Api(tags = "海洋表面温度监测") @RestController @RequestMapping(value = "/business-service/api/Ocean", produces = "application/json;charset=UTF-8") public class OceanTemperatureController { @@ -33,7 +37,8 @@ public class OceanTemperatureController { * @param request 客户端请求 * @return 参数类 */ - @RequestMapping(value = "/selectOcean",method = {RequestMethod.POST}) + @RequestMapping(value = "/selectOcean",method = {RequestMethod.GET}) + @ApiOperation(value = "查询方法",httpMethod = "GET") public AjaxResult selectOcean(HttpServletResponse response, HttpServletRequest request) { List eastVOSList= temperatureService.selectOcean(); @@ -42,10 +47,13 @@ public class OceanTemperatureController { /** * 删除方法 - * @param ID 单据id + * @param ID id * @return 状态码 */ - @RequestMapping(value = "/DelOcean",method = {RequestMethod.POST}) + @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) { int NUM = temperatureService.DelOcean(ID); @@ -62,6 +70,7 @@ public class OceanTemperatureController { * @param eastVOS 新增实体类 * @return 状态码 */ + @ApiOperation(value = "新增方法",httpMethod = "POST") @RequestMapping(value = "/IntoAustralia",method = {RequestMethod.POST}) public AjaxResult IntoOcean(@RequestBody OceanTemperatureVO eastVOS) { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/RegionVGIController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/RegionVGIController.java index 20c4fa56e..7bd772c99 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/RegionVGIController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/RegionVGIController.java @@ -3,6 +3,9 @@ package com.ruoyi.web.controller.yada; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.system.service_yada.IRegionVGIService; import com.ruoyi.system.domain_yada.RegionVGIVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestBody; @@ -20,6 +23,7 @@ import java.util.List; /** * 各区域VGI */ +@Api(tags = "各区域VGI") @RestController @RequestMapping(value = "/business-service/api/orderMng", produces = "application/json;charset=UTF-8") public class RegionVGIController @@ -32,7 +36,8 @@ public class RegionVGIController * @param request 客户端请求 * @return 参数类 */ - @RequestMapping(value = "/SelectRegion",method = {RequestMethod.POST}) + @RequestMapping(value = "/SelectRegion",method = {RequestMethod.GET}) + @ApiOperation(value = "查询方法",httpMethod = "GET") public AjaxResult SelectRegion(HttpServletResponse response, HttpServletRequest request) { List vgivost= regionVGIService.selectRegion(); @@ -41,10 +46,12 @@ public class RegionVGIController /** * 删除方法 - * @param ID 单据id + * @param ID id * @return 状态码 */ - @RequestMapping(value = "/DelRegion",method = {RequestMethod.POST}) + @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) { int NUM = regionVGIService.DelRegion(ID); @@ -61,6 +68,7 @@ public class RegionVGIController * @param vgivo 新增实体类 * @return 状态码 */ + @ApiOperation(value = "新增方法",httpMethod = "POST") @RequestMapping(value = "/IntoRegion",method = {RequestMethod.POST}) public AjaxResult IntoRegion(@RequestBody RegionVGIVO vgivo) { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/RegionalSystemController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/RegionalSystemController.java index 2e0dd5044..7e62948bd 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/RegionalSystemController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/RegionalSystemController.java @@ -6,6 +6,9 @@ import com.ruoyi.system.domain_yada.RegionVGIVO; import com.ruoyi.system.domain_yada.RegionalSystemVO; import com.ruoyi.system.service_yada.IAustraliaMiddleEastService; import com.ruoyi.system.service_yada.IRegionalSystemService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestBody; @@ -22,6 +25,7 @@ import java.util.List; /** * 区域生态系统 */ +@Api(tags = "区域生态系统") @RestController @RequestMapping(value = "/business-service/api/Regional", produces = "application/json;charset=UTF-8") public class RegionalSystemController { @@ -34,7 +38,8 @@ public class RegionalSystemController { * @param request 客户端请求 * @return 参数类 */ - @RequestMapping(value = "/selectRegional",method = {RequestMethod.POST}) + @RequestMapping(value = "/selectRegional",method = {RequestMethod.GET}) + @ApiOperation(value = "查询方法",httpMethod = "GET") public AjaxResult selectRegional(HttpServletResponse response, HttpServletRequest request) { List eastVOSList= systemService.selectRegional(); @@ -43,10 +48,12 @@ public class RegionalSystemController { /** * 删除方法 - * @param ID 单据id + * @param ID id * @return 状态码 */ - @RequestMapping(value = "/DelRegional",method = {RequestMethod.POST}) + @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(@Param("ID") String ID) { int NUM = systemService.DelRegional(ID); @@ -63,6 +70,7 @@ public class RegionalSystemController { * @param eastVOS 新增实体类 * @return 状态码 */ + @ApiOperation(value = "新增方法",httpMethod = "POST") @RequestMapping(value = "/IntoRegional",method = {RequestMethod.POST}) public AjaxResult IntoRegional(@RequestBody RegionalSystemVO eastVOS) { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/ThematicMapController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/ThematicMapController.java index 9614dd462..6c4d7bec8 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/ThematicMapController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/ThematicMapController.java @@ -1,6 +1,9 @@ package com.ruoyi.web.controller.yada; +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.ThematicMapDomain; import com.ruoyi.system.service_yada.ThematicMapService; import io.swagger.annotations.*; @@ -9,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; @@ -48,13 +52,14 @@ public class ThematicMapController { List res= thematicMapService.selectAll(); return AjaxResult.success(res); } - /** * 删除方法 - * @param id 单据id + * @param id id * @return 状态码 */ @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) { int num = thematicMapService.deleteById(id); @@ -69,9 +74,12 @@ public class ThematicMapController { * @param thematicMapDomain 新增实体类 * @return 状态码 */ + @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) { @@ -79,4 +87,6 @@ public class ThematicMapController { } return AjaxResult.error(); } + + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/UrbanController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/UrbanController.java index 129f2ff55..dda699379 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/UrbanController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/UrbanController.java @@ -5,6 +5,9 @@ import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO; import com.ruoyi.system.domain_yada.UrbanVO; import com.ruoyi.system.service_yada.IAustraliaMiddleEastService; import com.ruoyi.system.service_yada.IUrbanService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestBody; @@ -21,6 +24,7 @@ import java.util.List; /** * 中国城市监测 */ +@Api(tags = "中国城市监测") @RestController @RequestMapping(value = "/business-service/api/Urban", produces = "application/json;charset=UTF-8") public class UrbanController { @@ -33,7 +37,8 @@ public class UrbanController { * @param request 客户端请求 * @return 参数类 */ - @RequestMapping(value = "/selectUrban",method = {RequestMethod.POST}) + @RequestMapping(value = "/selectUrban",method = {RequestMethod.GET}) + @ApiOperation(value = "查询方法",httpMethod = "GET") public AjaxResult selectUrban(HttpServletResponse response, HttpServletRequest request) { List eastVOSList= urbanService.selectUrban(); @@ -42,10 +47,11 @@ public class UrbanController { /** * 删除方法 - * @param ID 单据id + * @param ID id * @return 状态码 */ - @RequestMapping(value = "/DelUrban",method = {RequestMethod.POST}) + @RequestMapping(value = "/DelUrban",method = {RequestMethod.DELETE}) + @ApiOperation(value = "删除方法",httpMethod = "DELETE") public AjaxResult DelUrban(@Param("ID") String ID) { int NUM = urbanService.DelUrban(ID); @@ -62,7 +68,9 @@ public class UrbanController { * @param eastVOS 新增实体类 * @return 状态码 */ + @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) { eastVOS.setCreateTime(LocalDateTime.now()); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/VegetationCoverageController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/VegetationCoverageController.java index 7d7db94d9..04cd4e870 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/VegetationCoverageController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/VegetationCoverageController.java @@ -5,6 +5,9 @@ import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO; import com.ruoyi.system.domain_yada.VegetationCoverageVO; import com.ruoyi.system.service_yada.IAustraliaMiddleEastService; import com.ruoyi.system.service_yada.IVegetationCoverageService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestBody; @@ -21,6 +24,7 @@ import java.util.List; /** * 平均植被覆盖度和净初级生产力 */ +@Api(tags = "平均植被覆盖度和净初级生产力") @RestController @RequestMapping(value = "/business-service/api/Vegetation", produces = "application/json;charset=UTF-8") public class VegetationCoverageController { @@ -33,7 +37,8 @@ public class VegetationCoverageController { * @param request 客户端请求 * @return 参数类 */ - @RequestMapping(value = "/selectVegetation",method = {RequestMethod.POST}) + @RequestMapping(value = "/selectVegetation",method = {RequestMethod.GET}) + @ApiOperation(value = "查询方法",httpMethod = "GET") public AjaxResult selectVegetation(HttpServletResponse response, HttpServletRequest request) { List eastVOSList= coverageService.selectVegetation(); @@ -42,10 +47,12 @@ public class VegetationCoverageController { /** * 删除方法 - * @param ID 单据id + * @param ID id * @return 状态码 */ - @RequestMapping(value = "/DelVegetation",method = {RequestMethod.POST}) + @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) { int NUM = coverageService.DelVegetation(ID); @@ -62,6 +69,7 @@ public class VegetationCoverageController { * @param eastVOS 新增实体类 * @return 状态码 */ + @ApiOperation(value = "新增方法",httpMethod = "POST") @RequestMapping(value = "/IntoVegetation",method = {RequestMethod.POST}) public AjaxResult IntoVegetation(@RequestBody VegetationCoverageVO eastVOS) { diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index 9bff4eb18..9d18a7d5c 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -6,7 +6,8 @@ spring: druid: # 主库数据源 master: - url: jdbc:mysql://192.168.2.9:3306/nuoyi?useUnicode=true&characterEncoding=UTF-8&useSSL=false&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 +# url: jdbc:mysql://192.168.2.9:3306/nuoyi?useUnicode=true&characterEncoding=UTF-8&useSSL=false&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + 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. # 从库数据源 diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index da6fb4a28..08ec999a1 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -92,7 +92,7 @@ token: # 令牌密钥 secret: abcdefghijklmnopqrstuvwxyz # 令牌有效期(默认30分钟) - expireTime: 30 + expireTime: 300 # MyBatis配置 mybatis: diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/TokenService.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/TokenService.java index 5b4c41466..f053fb356 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/TokenService.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/TokenService.java @@ -144,7 +144,7 @@ public class TokenService loginUser.setExpireTime(loginUser.getLoginTime() + expireTime * MILLIS_MINUTE); // 根据uuid将loginUser缓存 String userKey = getTokenKey(loginUser.getToken()); - redisCache.setCacheObject(userKey, loginUser, expireTime, TimeUnit.MINUTES); + redisCache.setCacheObject(userKey, loginUser, expireTime, TimeUnit.HOURS); } /** diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/Dictionary.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/Dictionary.java new file mode 100644 index 000000000..c485023aa --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/Dictionary.java @@ -0,0 +1,69 @@ +package com.ruoyi.system.domain_yada; + +/** + * @Author: JinSheng Song + * @Date: 2022/5/30 8:50 + */ +//字典表 +public class Dictionary extends SysBaseEntity +{ + private String codingType; + + private String codingType1; + + private String codingType2; + + private String dictionary; + + private String name; + + private String nameEn; + + public String getCodingType1() { + return codingType1; + } + + public void setCodingType1(String codingType1) { + this.codingType1 = codingType1; + } + + public String getCodingType2() { + return codingType2; + } + + public void setCodingType2(String codingType2) { + this.codingType2 = codingType2; + } + + public String getCodingType() { + return codingType; + } + + public void setCodingType(String codingType) { + this.codingType = codingType; + } + + public String getDictionary() { + return dictionary; + } + + public void setDictionary(String dictionary) { + this.dictionary = dictionary; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getNameEn() { + return nameEn; + } + + public void setNameEn(String nameEn) { + this.nameEn = nameEn; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/GlobalTypeVO.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/GlobalTypeVO.java index a1c20a217..de15e7b67 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/GlobalTypeVO.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/GlobalTypeVO.java @@ -15,7 +15,7 @@ public class GlobalTypeVO extends SysBaseEntity { private Double areaProportion; - private String area; + private Double area; private int particularYear; @@ -51,11 +51,11 @@ public class GlobalTypeVO extends SysBaseEntity { this.areaProportion = areaProportion; } - public String getArea() { + public Double getArea() { return area; } - public void setArea(String area) { + public void setArea(Double area) { this.area = area; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/ThematicMapDomain.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/ThematicMapDomain.java index 39fc939e4..11caf150e 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/ThematicMapDomain.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/ThematicMapDomain.java @@ -11,6 +11,12 @@ public class ThematicMapDomain extends SysBaseEntity { private Long id; + private String pictureCode; + + private String pictureTypeOne; + + private String pictureTypeTwo; + private String pictureZh; private String pictureEn; @@ -29,6 +35,31 @@ public class ThematicMapDomain extends SysBaseEntity { private LocalDateTime createdTime; + public String getPictureCode() { + return pictureCode; + } + + public void setPictureCode(String pictureCode) { + this.pictureCode = pictureCode; + } + + public String getPictureTypeOne() { + return pictureTypeOne; + } + + public void setPictureTypeOne(String pictureTypeOne) { + this.pictureTypeOne = pictureTypeOne; + } + + public String getPictureTypeTwo() { + return pictureTypeTwo; + } + + public void setPictureTypeTwo(String pictureTypeTwo) { + this.pictureTypeTwo = pictureTypeTwo; + } + + public Long getId() { return id; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/UploadFile.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/UploadFile.java new file mode 100644 index 000000000..6d0529a9f --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/UploadFile.java @@ -0,0 +1,60 @@ +package com.ruoyi.system.domain_yada; + +import java.time.LocalDate; + +/** + * @Author: JinSheng Song + * @Date: 2022/5/24 14:24 + */ +public class UploadFile extends SysBaseEntity +{ + private String id; + + private String fileId; + + private String fileName; + + private String filePath; + + private String fileSize; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getFileId() { + return fileId; + } + + public void setFileId(String fileId) { + this.fileId = fileId; + } + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public String getFilePath() { + return filePath; + } + + public void setFilePath(String filePath) { + this.filePath = filePath; + } + + public String getFileSize() { + return fileSize; + } + + public void setFileSize(String fileSize) { + this.fileSize = fileSize; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/AorestCoverageMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/AorestCoverageMapper.java index 0931f079f..bf9d00c02 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/AorestCoverageMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/AorestCoverageMapper.java @@ -1,6 +1,8 @@ package com.ruoyi.system.mapper_yada; import com.ruoyi.system.domain_yada.AorestCoverageVO; +import com.ruoyi.system.domain_yada.Dictionary; +import com.ruoyi.system.domain_yada.UploadFile; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -16,4 +18,10 @@ public interface AorestCoverageMapper { Integer DelAorestCoverage(@Param("id") String id); Integer IntoAorestCoverage(AorestCoverageVO eastVO); + + Integer IntoUpload(UploadFile file); + + List selectUpload(UploadFile file); + + List selectDic(Dictionary dic); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/GlobalTypeMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/GlobalTypeMapper.java index c6d93ba6c..8366c5ce6 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/GlobalTypeMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/GlobalTypeMapper.java @@ -11,7 +11,7 @@ import java.util.List; */ public interface GlobalTypeMapper { - List selectGlobalType(); + List selectGlobalType(@Param("typeName") String typeName, @Param("particularYear") Integer particularYear); Integer DelGlobalType(@Param("id") String id); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IAorestCoverageService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IAorestCoverageService.java index 938d9b3bb..0e53908a9 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IAorestCoverageService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IAorestCoverageService.java @@ -1,7 +1,10 @@ package com.ruoyi.system.service_yada; +import com.ruoyi.common.utils.PageUtils; import com.ruoyi.system.domain_yada.AorestCoverageVO; import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO; +import com.ruoyi.system.domain_yada.Dictionary; +import com.ruoyi.system.domain_yada.UploadFile; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -18,4 +21,10 @@ public interface IAorestCoverageService { public Integer DelAorestCoverage(@Param("id") String id); public Integer IntoAorestCoverage(AorestCoverageVO eastVO); + + public Integer IntoUpload(UploadFile file); + + public List selectUpload(UploadFile file); + + public List selectDic(Dictionary dic); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IGlobalTypeService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IGlobalTypeService.java index e09d8a5d3..08804ac47 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IGlobalTypeService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IGlobalTypeService.java @@ -13,7 +13,7 @@ import java.util.List; */ public interface IGlobalTypeService { - public List selectGlobalType(); + public List selectGlobalType(String typeName, Integer particularYear); public Integer DelGlobalType(String id); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/AorestCoverageServiceimpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/AorestCoverageServiceimpl.java index 0f9954891..6f0271493 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/AorestCoverageServiceimpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/AorestCoverageServiceimpl.java @@ -2,6 +2,8 @@ package com.ruoyi.system.service_yada.impl; import com.ruoyi.system.domain_yada.AorestCoverageVO; import com.ruoyi.system.domain_yada.AustraliaMiddleEastVO; +import com.ruoyi.system.domain_yada.Dictionary; +import com.ruoyi.system.domain_yada.UploadFile; import com.ruoyi.system.mapper_yada.AorestCoverageMapper; import com.ruoyi.system.mapper_yada.AustraliaMiddleEastMapper; import com.ruoyi.system.service_yada.IAorestCoverageService; @@ -36,4 +38,19 @@ public class AorestCoverageServiceimpl implements IAorestCoverageService { public Integer IntoAorestCoverage(AorestCoverageVO eastVO) { return coverageMapper.IntoAorestCoverage(eastVO); } + + @Override + public Integer IntoUpload(UploadFile file) { + return coverageMapper.IntoUpload(file); + } + + @Override + public List selectUpload(UploadFile file) { + return coverageMapper.selectUpload(file); + } + + @Override + public List selectDic(Dictionary dic) { + return coverageMapper.selectDic(dic); + } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/GlobalTypeServiceimpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/GlobalTypeServiceimpl.java index 1f3f7d3b6..a86b6c23f 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/GlobalTypeServiceimpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/GlobalTypeServiceimpl.java @@ -5,6 +5,8 @@ import com.ruoyi.system.domain_yada.GlobalTypeVO; import com.ruoyi.system.mapper_yada.AustraliaMiddleEastMapper; import com.ruoyi.system.mapper_yada.GlobalTypeMapper; import com.ruoyi.system.service_yada.IGlobalTypeService; +import org.apache.commons.compress.archivers.dump.DumpArchiveEntry; +import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -24,8 +26,8 @@ public class GlobalTypeServiceimpl implements IGlobalTypeService { @Override - public List selectGlobalType() { - return typeMapper.selectGlobalType(); + public List selectGlobalType(String typeName, Integer particularYear) { + return typeMapper.selectGlobalType(typeName, particularYear); } @Override diff --git a/ruoyi-system/src/main/resources/mapper/system/AorestCoverageMapper.xml b/ruoyi-system/src/main/resources/mapper/system/AorestCoverageMapper.xml index ab73ea165..378f41646 100644 --- a/ruoyi-system/src/main/resources/mapper/system/AorestCoverageMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/AorestCoverageMapper.xml @@ -61,4 +61,83 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/GlobalTypeMapper.xml b/ruoyi-system/src/main/resources/mapper/system/GlobalTypeMapper.xml index 314d8ebae..5ed298ce6 100644 --- a/ruoyi-system/src/main/resources/mapper/system/GlobalTypeMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/GlobalTypeMapper.xml @@ -21,9 +21,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" id,particular_year,type_name,type_name_en,area_proportion,area,created_by,created_time ]]> - diff --git a/ruoyi-system/src/main/resources/mapper/system/ThematicMapMapper.xml b/ruoyi-system/src/main/resources/mapper/system/ThematicMapMapper.xml index 8bc6ab2a5..5f796b70f 100644 --- a/ruoyi-system/src/main/resources/mapper/system/ThematicMapMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/ThematicMapMapper.xml @@ -6,6 +6,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + @@ -19,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -40,6 +43,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" picture_en , picture_name , picture_type , + picture_type_one, + picture_type_two, + picture_code, picture_time , picture_path, remarks, @@ -51,6 +57,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{pictureEn,jdbcType=VARCHAR}}, #{pictureName,jdbcType=VARCHAR}}, #{pictureType,jdbcType=VARCHAR}}, + #{pictureTypeOne,jdbcType=VARCHAR}}, + #{pictureTypeTwo,jdbcType=VARCHAR}}, + #{pictureCode,jdbcType=VARCHAR}}, #{pictureTime,jdbcType=TIMESTAMP}, #{picturePath,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR},