This commit is contained in:
songjinsheng 2022-07-14 15:00:55 +08:00
parent e348a10862
commit 52095ccd04
18 changed files with 114 additions and 53 deletions

View File

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

View File

@ -56,12 +56,12 @@ public class CityExpandControllerr
/** /**
* 获取城市不透水面各种信息 * 获取城市不透水面各种信息
* @param city * @param city
* @param superior * @param country
* @return * @return
*/ */
@RequestMapping(value = "/selectInformation",method = {RequestMethod.GET}) @RequestMapping(value = "/selectInformation",method = {RequestMethod.GET})
public AjaxResult selectInformation(String city,String superior){ public AjaxResult selectInformation(String city,String country,String year){
List<CityInformation> value= service.selectInfrom(city,superior); List<CityInformation> value= service.selectInfrom(city,country,year);
return AjaxResult.success(value); return AjaxResult.success(value);
} }

View File

@ -34,7 +34,7 @@ public class ThematicMapController {
private ThematicMapService thematicMapService; private ThematicMapService thematicMapService;
/** /**
* 查询方法 * 查询专题图
* @param response 响应头 * @param response 响应头
* @return 参数类 * @return 参数类
*/ */
@ -56,7 +56,7 @@ public class ThematicMapController {
/** /**
* 查询方法 * 查询地图服务
* @param response 响应头 * @param response 响应头
* @return 参数类 * @return 参数类
*/ */
@ -68,11 +68,11 @@ public class ThematicMapController {
@ApiResponse(code =403,message = "权限不足"), @ApiResponse(code =403,message = "权限不足"),
@ApiResponse(code =404,message = "未找到") @ApiResponse(code =404,message = "未找到")
}) })
@RequestMapping(value = "/get/map",method = {RequestMethod.POST}) @RequestMapping(value = "/get/map",method = {RequestMethod.GET})
public AjaxResult selectMap(HttpServletResponse response, public AjaxResult selectMap(HttpServletResponse response,
String chartType,String chartName) String chartType,String chartName,String particularYear)
{ {
List<MapServicesVO> res= thematicMapService.selMapServers(chartName,chartType); List<MapServicesVO> res= thematicMapService.selMapServers(chartName,chartType,particularYear);
return AjaxResult.success(res); return AjaxResult.success(res);
} }

View File

@ -0,0 +1,33 @@
package com.ruoyi.web.controller.yada;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain_yada.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

@ -113,17 +113,17 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
.antMatchers("/webjars/**").anonymous() .antMatchers("/webjars/**").anonymous()
.antMatchers("/login", "/captcha/get", "/captcha/check").permitAll() .antMatchers("/login", "/captcha/get", "/captcha/check").permitAll()
.antMatchers("/*/api-docs").anonymous() .antMatchers("/*/api-docs").anonymous()
.antMatchers("/druid/**").anonymous() .antMatchers("/druid/**").anonymous();
// // 除上面外的所有请求全部需要鉴权认证 // // 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated() // .anyRequest().authenticated()
.and() // .and()
.headers().frameOptions().disable(); // .headers().frameOptions().disable();
httpSecurity.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler); // httpSecurity.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler);
// 添加JWT filter // // 添加JWT filter
httpSecurity.addFilterBefore(authenticationTokenFilter, UsernamePasswordAuthenticationFilter.class); // httpSecurity.addFilterBefore(authenticationTokenFilter, UsernamePasswordAuthenticationFilter.class);
// 添加CORS filter // // 添加CORS filter
httpSecurity.addFilterBefore(corsFilter, JwtAuthenticationTokenFilter.class); // httpSecurity.addFilterBefore(corsFilter, JwtAuthenticationTokenFilter.class);
httpSecurity.addFilterBefore(corsFilter, LogoutFilter.class); // httpSecurity.addFilterBefore(corsFilter, LogoutFilter.class);
} }
/** /**

View File

@ -29,6 +29,8 @@ public class MapServicesVO extends SysBaseEntity
*/ */
private String resolvingPower; private String resolvingPower;
private String serviceType;
public String getId() { public String getId() {
return id; return id;
} }
@ -76,4 +78,12 @@ public class MapServicesVO extends SysBaseEntity
public void setResolvingPower(String resolvingPower) { public void setResolvingPower(String resolvingPower) {
this.resolvingPower = resolvingPower; this.resolvingPower = resolvingPower;
} }
public String getServiceType() {
return serviceType;
}
public void setServiceType(String serviceType) {
this.serviceType = serviceType;
}
} }

View File

@ -24,8 +24,7 @@ public interface AorestCoverageMapper {
List<UploadFile> selectUpload(@Param("fileId") String fileId,@Param("fileName") String fileName); List<UploadFile> selectUpload(@Param("fileId") String fileId,@Param("fileName") String fileName);
List<Dictionary> selectDic(@Param("codingType") String codingType,@Param("codingType1") String codingType1, List<Dictionary> selectDic(@Param("codingType") String codingType);
@Param("codingType2") String codingType2);
List<Dictionary> selectNow(@Param("codingType2") String codingType2); List<Dictionary> selectNow(@Param("codingType2") String codingType2);
} }

View File

@ -22,5 +22,6 @@ public interface CityExpandMapper {
@Param("country") String country); @Param("country") String country);
List<CityInformation> selectInfrom(@Param("city") String city, List<CityInformation> selectInfrom(@Param("city") String city,
@Param("country") String country); @Param("country") String country,
@Param("year") String year);
} }

View File

@ -30,7 +30,8 @@ public interface ThematicMapMapper {
* @return * @return
*/ */
List<MapServicesVO> selMapServers(@Param("chartName") String chartName, List<MapServicesVO> selMapServers(@Param("chartName") String chartName,
@Param("chartType") String chartType); @Param("chartType") String chartType,
@Param("particularYear") String particularYear);
/** /**
* 删除专题图根据编号 * 删除专题图根据编号

View File

@ -26,7 +26,6 @@ public interface IAorestCoverageService {
public List<UploadFile> selectUpload(String fileId,String fileName); public List<UploadFile> selectUpload(String fileId,String fileName);
List<Dictionary> selectDic(String codingType,String codingType1, List<Dictionary> selectDic(String codingType);
String codingType2);
List<Dictionary> selectNow(String codingType2); List<Dictionary> selectNow(String codingType2);
} }

View File

@ -17,5 +17,5 @@ public interface ICityExpandService {
List<OrientationVO> selectOrientation(String city, String superior,String country); List<OrientationVO> selectOrientation(String city, String superior,String country);
List<CityInformation> selectInfrom(String city, String country); List<CityInformation> selectInfrom(String city, String country,String year);
} }

View File

@ -27,7 +27,7 @@ public interface ThematicMapService {
* @param chartType * @param chartType
* @return * @return
*/ */
List<MapServicesVO> selMapServers(String chartName, String chartType); List<MapServicesVO> selMapServers(String chartName, String chartType,String particularYear);
/** /**
* 删除专题图根据编号 * 删除专题图根据编号

View File

@ -51,9 +51,8 @@ public class AorestCoverageServiceimpl implements IAorestCoverageService {
} }
@Override @Override
public List<Dictionary> selectDic(String codingType,String codingType1, public List<Dictionary> selectDic(String codingType) {
String codingType2) { return coverageMapper.selectDic(codingType);
return coverageMapper.selectDic(codingType,codingType1,codingType2);
} }
@Override @Override

View File

@ -10,6 +10,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.time.Year;
import java.util.List; import java.util.List;
/** /**
@ -34,7 +35,7 @@ public class CityExpandServiceimpl implements ICityExpandService {
} }
@Override @Override
public List<CityInformation> selectInfrom(String city, String country) { public List<CityInformation> selectInfrom(String city, String country,String year) {
return mapper.selectInfrom(city,country); return mapper.selectInfrom(city,country,year);
} }
} }

View File

@ -31,8 +31,8 @@ public class ThematicMapServiceImpl implements ThematicMapService {
} }
@Override @Override
public List<MapServicesVO> selMapServers(String chartName, String chartType) { public List<MapServicesVO> selMapServers(String chartName, String chartType,String particularYear) {
return thematicMapMapper.selMapServers(chartName,chartType); return thematicMapMapper.selMapServers(chartName,chartType,particularYear);
} }
/** /**

View File

@ -125,25 +125,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
]]> ]]>
</sql> </sql>
<select id="selectDic" resultMap="RM_Dictionary"> <select id="selectDic" resultMap="RM_Dictionary">
select <include refid="columnsdic"/> from dictionary select <include refid="columnsdic"/> from dictionary
where dictionary in where 1=1
(SELECT A.dictionary FROM dictionary a <if test="codingType!= null and codingType !=''">
join (select dictionary from dictionary AND coding_type = #{codingType}
where 1=1 </if>
<if test="codingType!= null and codingType !=''">
AND coding_type = #{codingType}
</if>
<if test="codingType1!= null and codingType1 !=''">
AND dictionary = #{codingType1}
</if>
) b on a.coding_type=b.dictionary
<if test="codingType2!= null and codingType2 !=''">
AND a.dictionary = #{codingType2}
</if>
)
</select> </select>
<!-- <select id="selectDic" resultMap="RM_Dictionary">-->
<!-- select <include refid="columnsdic"/> from dictionary-->
<!-- where dictionary in-->
<!-- (SELECT A.dictionary FROM dictionary a-->
<!-- join (select dictionary from dictionary-->
<!-- where 1=1-->
<!-- <if test="codingType!= null and codingType !=''">-->
<!-- AND coding_type = #{codingType}-->
<!-- </if>-->
<!-- <if test="codingType1!= null and codingType1 !=''">-->
<!-- AND dictionary = #{codingType1}-->
<!-- </if>-->
<!-- ) b on a.coding_type=b.dictionary-->
<!-- <if test="codingType2!= null and codingType2 !=''">-->
<!-- AND a.dictionary = #{codingType2}-->
<!-- </if>-->
<!-- )-->
<!-- </select>-->
<select id="selectNow" resultMap="RM_Dictionary"> <select id="selectNow" resultMap="RM_Dictionary">
select <include refid="columnsdic"/> from dictionary select <include refid="columnsdic"/> from dictionary

View File

@ -98,6 +98,10 @@
<if test="country!= null and country !=''"> <if test="country!= null and country !=''">
AND country = #{country} AND country = #{country}
</if> </if>
<if test="year!= null and year !=''">
AND year = #{year}
</if>
</select> </select>
</mapper> </mapper>

View File

@ -25,6 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="particularYear" column="particular_year"/> <result property="particularYear" column="particular_year"/>
<result property="layer" column="layer"/> <result property="layer" column="layer"/>
<result property="resolvingPower" column="resolving_power"/> <result property="resolvingPower" column="resolving_power"/>
<result property="serviceType" column="service_type"/>
</resultMap> </resultMap>
<sql id="columns"> <sql id="columns">
@ -34,7 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql> </sql>
<sql id="cloumns_Map"> <sql id="cloumns_Map">
<![CDATA[ <![CDATA[
id,chart_name,chart_type,particular_year,layer,resolving_power id,chart_name,chart_type,particular_year,layer,resolving_power,service_type
]]> ]]>
</sql> </sql>
@ -48,6 +49,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="chartName!= null and chartName !=''"> <if test="chartName!= null and chartName !=''">
AND chart_name = #{chartName} AND chart_name = #{chartName}
</if> </if>
<if test="particularYear!= null and particularYear !=''">
AND particular_year = #{particularYear}
</if>
</select> </select>
<select id="selectAllThematicMap" resultMap="RM_ThematicMap"> <select id="selectAllThematicMap" resultMap="RM_ThematicMap">