地图服务

This commit is contained in:
songjinsheng 2022-06-30 16:06:16 +08:00
parent b51521dac7
commit b8d90525ae
7 changed files with 159 additions and 1 deletions

View File

@ -4,6 +4,9 @@ import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.util.ObjectUtils;
/** /**
* 启动程序 * 启动程序
@ -20,7 +23,7 @@ public class RuoYiApplication
SpringApplication.run(RuoYiApplication.class, args); SpringApplication.run(RuoYiApplication.class, args);
System.out.println(); System.out.println();
System.out.println(" --->>>启动成功!<<<---"); System.out.println(" --->>>启动成功!<<<---");
} }
} }

View File

@ -4,6 +4,7 @@ import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.file.FileUploadUtils; import com.ruoyi.common.utils.file.FileUploadUtils;
import com.ruoyi.common.utils.file.FileUtils; 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.domain_yada.ThematicMapDomain;
import com.ruoyi.system.service_yada.ThematicMapService; import com.ruoyi.system.service_yada.ThematicMapService;
import io.swagger.annotations.*; import io.swagger.annotations.*;
@ -52,6 +53,29 @@ public class ThematicMapController {
thematicMapDomain.getPictureTypeOne(),thematicMapDomain.getPictureTypeTwo()); thematicMapDomain.getPictureTypeOne(),thematicMapDomain.getPictureTypeTwo());
return AjaxResult.success(res); 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.POST})
public AjaxResult selectMap(HttpServletResponse response,
String chartType,String chartName)
{
List<MapServicesVO> res= thematicMapService.selMapServers(chartName,chartType);
return AjaxResult.success(res);
}
/** /**
* 删除方法 * 删除方法
* @param id id * @param id id

View File

@ -0,0 +1,79 @@
package com.ruoyi.system.domain_yada;
/**
* 地图服务类
* @Author: JinSheng Song
* @Date: 2022/6/30 15:48
*/
public class MapServicesVO extends SysBaseEntity
{
private String id;
/**
* 地图类型
*/
private String chartType;
/**
* 地图名称
*/
private String chartName;
/**
* 图层
*/
private String layer;
/**
* 年份
*/
private String particularYear;
/**
* 分辨率
*/
private String resolvingPower;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getChartType() {
return chartType;
}
public void setChartType(String chartType) {
this.chartType = chartType;
}
public String getChartName() {
return chartName;
}
public void setChartName(String chartName) {
this.chartName = chartName;
}
public String getLayer() {
return layer;
}
public void setLayer(String layer) {
this.layer = layer;
}
public String getParticularYear() {
return particularYear;
}
public void setParticularYear(String particularYear) {
this.particularYear = particularYear;
}
public String getResolvingPower() {
return resolvingPower;
}
public void setResolvingPower(String resolvingPower) {
this.resolvingPower = resolvingPower;
}
}

View File

@ -1,8 +1,10 @@
package com.ruoyi.system.mapper_yada; package com.ruoyi.system.mapper_yada;
import com.ruoyi.system.domain_yada.MapServicesVO;
import com.ruoyi.system.domain_yada.ThematicMapDomain; import com.ruoyi.system.domain_yada.ThematicMapDomain;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.time.LocalDateTime; import java.time.LocalDateTime;
@ -21,6 +23,15 @@ public interface ThematicMapMapper {
@Param("pictureTypeOne") String pictureTypeOne, @Param("pictureTypeOne") String pictureTypeOne,
@Param("pictureTypeTwo") String pictureTypeTwo); @Param("pictureTypeTwo") String pictureTypeTwo);
/**
* 查看地图服务
* @param chartName 服务名称
* @param chartType 服务类型
* @return
*/
List<MapServicesVO> selMapServers(@Param("chartName") String chartName,
@Param("chartType") String chartType);
/** /**
* 删除专题图根据编号 * 删除专题图根据编号
* @param id 编号 * @param id 编号

View File

@ -1,6 +1,8 @@
package com.ruoyi.system.service_yada; package com.ruoyi.system.service_yada;
import com.ruoyi.system.domain_yada.MapServicesVO;
import com.ruoyi.system.domain_yada.ThematicMapDomain; import com.ruoyi.system.domain_yada.ThematicMapDomain;
import org.apache.ibatis.annotations.Param;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List; import java.util.List;
@ -19,6 +21,14 @@ public interface ThematicMapService {
*/ */
List<ThematicMapDomain> selectAll(String pictureType,String pictureTypeOne, String pictureTypeTwo); List<ThematicMapDomain> selectAll(String pictureType,String pictureTypeOne, String pictureTypeTwo);
/**
* 获取地图服务
* @param chartName
* @param chartType
* @return
*/
List<MapServicesVO> selMapServers(String chartName, String chartType);
/** /**
* 删除专题图根据编号 * 删除专题图根据编号
* @param id 编号 * @param id 编号

View File

@ -1,5 +1,6 @@
package com.ruoyi.system.service_yada.impl; package com.ruoyi.system.service_yada.impl;
import com.ruoyi.system.domain_yada.MapServicesVO;
import com.ruoyi.system.domain_yada.ThematicMapDomain; import com.ruoyi.system.domain_yada.ThematicMapDomain;
import com.ruoyi.system.mapper_yada.ThematicMapMapper; import com.ruoyi.system.mapper_yada.ThematicMapMapper;
import com.ruoyi.system.service_yada.ThematicMapService; import com.ruoyi.system.service_yada.ThematicMapService;
@ -29,6 +30,11 @@ public class ThematicMapServiceImpl implements ThematicMapService {
return thematicMapMapper.selectAllThematicMap(pictureType,pictureTypeOne,pictureTypeTwo); return thematicMapMapper.selectAllThematicMap(pictureType,pictureTypeOne,pictureTypeTwo);
} }
@Override
public List<MapServicesVO> selMapServers(String chartName, String chartType) {
return thematicMapMapper.selMapServers(chartName,chartType);
}
/** /**
* 删除专题图根据编号 * 删除专题图根据编号
* @param id 编号 * @param id 编号

View File

@ -18,12 +18,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createdBy" column="created_by"/> <result property="createdBy" column="created_by"/>
<result property="createdTime" column="created_time"/> <result property="createdTime" column="created_time"/>
</resultMap> </resultMap>
<resultMap id="RM_MapServices" type="com.ruoyi.system.domain_yada.MapServicesVO">
<result property="id" column="id"/>
<result property="chartName" column="chart_name"/>
<result property="chartType" column="chart_type"/>
<result property="particularYear" column="particular_year"/>
<result property="layer" column="layer"/>
<result property="resolvingPower" column="resolving_power"/>
</resultMap>
<sql id="columns"> <sql id="columns">
<![CDATA[ <![CDATA[
id,picture_zh,picture_code,picture_type_one,picture_type_two,picture_en,picture_name,picture_type,picture_time,picture_path,picture_time,remarks,created_by,created_time id,picture_zh,picture_code,picture_type_one,picture_type_two,picture_en,picture_name,picture_type,picture_time,picture_path,picture_time,remarks,created_by,created_time
]]> ]]>
</sql> </sql>
<sql id="cloumns_Map">
<![CDATA[
id,chart_name,chart_type,particular_year,layer,resolving_power
]]>
</sql>
<select id="selMapServers" resultMap="RM_MapServices">
SELECT <include refid="cloumns_Map"/> FROM map_Services
WHERE 1=1
<if test="chartType!= null and chartType !=''">
AND chart_Type = #{chartType}
</if>
<if test="chartName!= null and chartName !=''">
AND chart_name = #{chartName}
</if>
</select>
<select id="selectAllThematicMap" resultMap="RM_ThematicMap"> <select id="selectAllThematicMap" resultMap="RM_ThematicMap">
SELECT <include refid="columns"/> FROM thematic_map SELECT <include refid="columns"/> FROM thematic_map