diff --git a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java index b02d9c583..5a9e756cc 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java @@ -1,11 +1,15 @@ 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; /** @@ -19,6 +23,7 @@ public class RuoYiApplication { public static void main(String[] args) { + // System.setProperty("spring.devtools.restart.enabled", "false"); SpringApplication.run(RuoYiApplication.class, args); System.out.println(); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/CityExpandControllerr.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/CityExpandControllerr.java index 3eadcb588..39de9be0e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/CityExpandControllerr.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/CityExpandControllerr.java @@ -61,6 +61,11 @@ public class CityExpandControllerr */ @RequestMapping(value = "/selectInformation",method = {RequestMethod.GET}) public AjaxResult selectInformation(String city,String country,String year){ +// if (city.equals("")&&country.equals("")) +// { +// List value= service.selectMain(year); +// return AjaxResult.success(value); +// } List value= service.selectInfrom(city,country,year); return AjaxResult.success(value); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/SpecialReportController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/SpecialReportController.java index e9cb3df45..16150ae5b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/SpecialReportController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/SpecialReportController.java @@ -1,13 +1,20 @@ 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; + /** * 专题报告 */ @@ -17,6 +24,61 @@ import org.springframework.web.bind.annotation.RestController; public class SpecialReportController { + @Resource + private ISpecialReportService service; + + @RequestMapping(value = "/getSpecial",method = {RequestMethod.GET}) + @ApiOperation(value = "返回专题数据",httpMethod = "GET") + public AjaxResult getSpecial(String zone) + { + List 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 value=service.selectUploadSpecial(fileName); + + return AjaxResult.success(value); + } + + @RequestMapping(value = "/getUploadStandard") + @ApiOperation(value = "返回专题规范") + public AjaxResult getUploadStandard(String fileName) + { + List 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) @@ -25,10 +87,10 @@ public class SpecialReportController switch (path) { case "ch": - route="avatar/word/全球生态环境遥感监测2021年度报告-中文版-20220309.docx"; + route="avatar/word/陆域中文1130.pdf"; break; case "en": - route="avatar/word/全球生态环境遥感监测2021年度报告-英文简本-20211102.docx"; + route="avatar/word/陆域中文1130.pdf"; break; default: return AjaxResult.error("未找到对应路径"); diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index 31dfb10a3..a67f058ed 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -6,6 +6,7 @@ spring: driver-class-name: org.postgresql.Driver druid: master: + #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: sjs password: song5325 diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 8a97bdf3e..5aebc9856 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -9,7 +9,7 @@ ruoyi: # 实例演示开关 demoEnabled: true # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) - profile: D:/ruoyi/uploadPath + profile: D:/ruoyi/uploadPath #/home/sjs/ruoyi/uploadPath # 获取ip地址开关 addressEnabled: false # 验证码类型 math 数组计算 char 字符验证 @@ -134,3 +134,4 @@ xss: excludes: /system/notice/* # 匹配链接 urlPatterns: /system/*,/monitor/*,/tool/* + diff --git a/ruoyi-admin/src/main/resources/logback.xml b/ruoyi-admin/src/main/resources/logback.xml index a360583fa..21c1fe1ee 100644 --- a/ruoyi-admin/src/main/resources/logback.xml +++ b/ruoyi-admin/src/main/resources/logback.xml @@ -1,7 +1,7 @@ - + diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index 652fb8797..b58af4f19 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -113,17 +113,17 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter .antMatchers("/webjars/**").anonymous() .antMatchers("/login", "/captcha/get", "/captcha/check").permitAll() .antMatchers("/*/api-docs").anonymous() - .antMatchers("/druid/**").anonymous(); + .antMatchers("/druid/**").anonymous() // // 除上面外的所有请求全部需要鉴权认证 -// .anyRequest().authenticated() -// .and() -// .headers().frameOptions().disable(); -// httpSecurity.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler); -// // 添加JWT filter -// httpSecurity.addFilterBefore(authenticationTokenFilter, UsernamePasswordAuthenticationFilter.class); -// // 添加CORS filter -// httpSecurity.addFilterBefore(corsFilter, JwtAuthenticationTokenFilter.class); -// httpSecurity.addFilterBefore(corsFilter, LogoutFilter.class); + .anyRequest().authenticated() + .and() + .headers().frameOptions().disable(); + httpSecurity.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler); + // 添加JWT filter + httpSecurity.addFilterBefore(authenticationTokenFilter, UsernamePasswordAuthenticationFilter.class); + // 添加CORS filter + httpSecurity.addFilterBefore(corsFilter, JwtAuthenticationTokenFilter.class); + httpSecurity.addFilterBefore(corsFilter, LogoutFilter.class); } /** diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/SpecialVO.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/SpecialVO.java new file mode 100644 index 000000000..1544c750e --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/SpecialVO.java @@ -0,0 +1,78 @@ +package com.ruoyi.system.domain_yada; + +/** + * @Author: JinSheng Song + * @Date: 2022/7/20 11:48 + */ +public class SpecialVO extends SysBaseEntity +{ + private String id; + + private String fileName; + + private String dateTime; + + private String spaceDistinguish; + + private String timeDistinguish; + + private String zone; + + private String filePath; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public String getDateTime() { + return dateTime; + } + + public void setDateTime(String dateTime) { + this.dateTime = dateTime; + } + + public String getSpaceDistinguish() { + return spaceDistinguish; + } + + public void setSpaceDistinguish(String spaceDistinguish) { + this.spaceDistinguish = spaceDistinguish; + } + + public String getTimeDistinguish() { + return timeDistinguish; + } + + public void setTimeDistinguish(String timeDistinguish) { + this.timeDistinguish = timeDistinguish; + } + + public String getZone() { + return zone; + } + + public void setZone(String zone) { + this.zone = zone; + } + + public String getFilePath() { + return filePath; + } + + public void setFilePath(String filePath) { + this.filePath = filePath; + } +} 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 11caf150e..9c3162343 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 @@ -33,6 +33,8 @@ public class ThematicMapDomain extends SysBaseEntity { private String createdBy; + private String year; + private LocalDateTime createdTime; public String getPictureCode() { @@ -155,4 +157,12 @@ public class ThematicMapDomain extends SysBaseEntity { ", createdTime=" + createdTime + '}'; } + + public String getYear() { + return year; + } + + public void setYear(String year) { + this.year = year; + } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/UploadSpecialVO.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/UploadSpecialVO.java new file mode 100644 index 000000000..9f841aa4a --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/UploadSpecialVO.java @@ -0,0 +1,92 @@ +package com.ruoyi.system.domain_yada; + +import javax.xml.stream.events.DTD; +import java.awt.*; + +/** + * @Author: JinSheng Song + * @Date: 2022/7/20 16:47 + */ +public class UploadSpecialVO extends SysBaseEntity +{ + + private String id; + + private String fileName; + + private String uploadNum; + + private String filePath; + + private String type; + + private String remarks1; + + private String remarks2; + + private String sign; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public String getUploadNum() { + return uploadNum; + } + + public void setUploadNum(String uploadNum) { + this.uploadNum = uploadNum; + } + + public String getFilePath() { + return filePath; + } + + public void setFilePath(String filePath) { + this.filePath = filePath; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getRemarks1() { + return remarks1; + } + + public void setRemarks1(String remarks1) { + this.remarks1 = remarks1; + } + + public String getRemarks2() { + return remarks2; + } + + public void setRemarks2(String remarks2) { + this.remarks2 = remarks2; + } + + public String getSign() { + return sign; + } + + public void setSign(String sign) { + this.sign = sign; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/CityExpandMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/CityExpandMapper.java index 476a88ea2..95837e49e 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/CityExpandMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/CityExpandMapper.java @@ -24,4 +24,5 @@ public interface CityExpandMapper { List selectInfrom(@Param("city") String city, @Param("country") String country, @Param("year") String year); + List selectMain( @Param("year") String year); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/SpecialReportMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/SpecialReportMapper.java new file mode 100644 index 000000000..f4969a62c --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/SpecialReportMapper.java @@ -0,0 +1,28 @@ +package com.ruoyi.system.mapper_yada; + +import com.ruoyi.system.domain_yada.SpecialVO; +import com.ruoyi.system.domain_yada.UploadSpecialVO; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @Author: JinSheng Song + * @Date: 2022/7/20 11:54 + */ +public interface SpecialReportMapper { + + List selectSpecial(@Param("zone") String zone); + + List selectUploadSpecial(@Param("fileName") String fileName); + + List selectUploadSpecial1(@Param("fileName") String fileName); + + Integer updateUploadSpecial(@Param("id") Integer id); + + Integer IntoUploadSpecial(UploadSpecialVO specialVO); + + Integer DelSpecial(@Param("id") Integer id); + + Integer IntoSpecial(SpecialVO specialVO); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/ICityExpandService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/ICityExpandService.java index 3c4df8f80..e5f326d25 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/ICityExpandService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/ICityExpandService.java @@ -18,4 +18,6 @@ public interface ICityExpandService { List selectOrientation(String city, String superior,String country); List selectInfrom(String city, String country,String year); + + List selectMain(String year); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/ISpecialReportService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/ISpecialReportService.java index 0f677a36c..b369afcf0 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/ISpecialReportService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/ISpecialReportService.java @@ -1,9 +1,29 @@ package com.ruoyi.system.service_yada; +import com.ruoyi.system.domain_yada.SpecialVO; +import com.ruoyi.system.domain_yada.UploadSpecialVO; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + /** * 专题报告 * @Author: JinSheng Song * @Date: 2022/5/11 11:39 */ public interface ISpecialReportService { + + List selectSpecial(String zone); + + List selectUploadSpecial(String fileName); + + List selectUploadSpecial1(String fileName); + + Integer updateUploadSpecial( Integer id); + + Integer IntoUploadSpecial(UploadSpecialVO specialVO); + + Integer DelSpecial( Integer id); + + Integer IntoSpecial(SpecialVO specialVO); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/CityExpandServiceimpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/CityExpandServiceimpl.java index dc408551d..21cea5608 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/CityExpandServiceimpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/CityExpandServiceimpl.java @@ -38,4 +38,9 @@ public class CityExpandServiceimpl implements ICityExpandService { public List selectInfrom(String city, String country,String year) { return mapper.selectInfrom(city,country,year); } + + @Override + public List selectMain(String year) { + return mapper.selectMain(year); + } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/SpecialReportServiceimpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/SpecialReportServiceimpl.java index e96cd19b8..08c4b8e88 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/SpecialReportServiceimpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/SpecialReportServiceimpl.java @@ -1,12 +1,57 @@ package com.ruoyi.system.service_yada.impl; +import com.ruoyi.system.domain_yada.SpecialVO; +import com.ruoyi.system.domain_yada.UploadSpecialVO; +import com.ruoyi.system.mapper_yada.SpecialReportMapper; import com.ruoyi.system.service_yada.ISpecialReportService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; /** * 专题报告 * @Author: JinSheng Song * @Date: 2022/5/11 11:48 */ +@Service public class SpecialReportServiceimpl implements ISpecialReportService { + @Resource + private SpecialReportMapper mapper; + + @Override + public List selectSpecial(String zone) { + return mapper.selectSpecial(zone); + } + + @Override + public List selectUploadSpecial(String fileName) { + return mapper.selectUploadSpecial(fileName); + } + + @Override + public List selectUploadSpecial1(String fileName) { + return mapper.selectUploadSpecial1(fileName); + } + + @Override + public Integer updateUploadSpecial(Integer id) { + return mapper.updateUploadSpecial(id); + } + + @Override + public Integer IntoUploadSpecial(UploadSpecialVO specialVO) { + return mapper.IntoUploadSpecial(specialVO); + } + + @Override + public Integer DelSpecial(Integer id) { + return mapper.DelSpecial(id); + } + + @Override + public Integer IntoSpecial(SpecialVO specialVO) { + return mapper.IntoSpecial(specialVO); + } } diff --git a/ruoyi-system/src/main/resources/mapper/system/CityExpandMapper.xml b/ruoyi-system/src/main/resources/mapper/system/CityExpandMapper.xml index 18caabfb0..f620ada30 100644 --- a/ruoyi-system/src/main/resources/mapper/system/CityExpandMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/CityExpandMapper.xml @@ -103,5 +103,13 @@ + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/SpecialReportMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SpecialReportMapper.xml new file mode 100644 index 000000000..1d2c0deca --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/SpecialReportMapper.xml @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DELETE FROM special_table + WHERE ID=#{id} + + + + + + + + + + + + update upload_special set upload_num=upload_num+1 + where id=#{id} + + + + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/ThematicMapMapper.xml b/ruoyi-system/src/main/resources/mapper/system/ThematicMapMapper.xml index cdd7da39d..c26d3279d 100644 --- a/ruoyi-system/src/main/resources/mapper/system/ThematicMapMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/ThematicMapMapper.xml @@ -15,6 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -30,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"