新增字典功能

This commit is contained in:
songjinsheng
2022-05-30 10:11:39 +08:00
parent 498a502c02
commit 42e4acf3dd
25 changed files with 494 additions and 47 deletions

View File

@ -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;
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}
}

View File

@ -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<UploadFile> selectUpload(UploadFile file);
List<Dictionary> selectDic(Dictionary dic);
}

View File

@ -11,7 +11,7 @@ import java.util.List;
*/
public interface GlobalTypeMapper {
List<GlobalTypeVO> selectGlobalType();
List<GlobalTypeVO> selectGlobalType(@Param("typeName") String typeName, @Param("particularYear") Integer particularYear);
Integer DelGlobalType(@Param("id") String id);

View File

@ -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<UploadFile> selectUpload(UploadFile file);
public List<Dictionary> selectDic(Dictionary dic);
}

View File

@ -13,7 +13,7 @@ import java.util.List;
*/
public interface IGlobalTypeService {
public List<GlobalTypeVO> selectGlobalType();
public List<GlobalTypeVO> selectGlobalType(String typeName, Integer particularYear);
public Integer DelGlobalType(String id);

View File

@ -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<UploadFile> selectUpload(UploadFile file) {
return coverageMapper.selectUpload(file);
}
@Override
public List<Dictionary> selectDic(Dictionary dic) {
return coverageMapper.selectDic(dic);
}
}

View File

@ -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<GlobalTypeVO> selectGlobalType() {
return typeMapper.selectGlobalType();
public List<GlobalTypeVO> selectGlobalType(String typeName, Integer particularYear) {
return typeMapper.selectGlobalType(typeName, particularYear);
}
@Override

View File

@ -61,4 +61,83 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
]]>
</insert>
<resultMap id="RM_Upload" type="com.ruoyi.system.domain_yada.UploadFile">
<result property="id" column="id"/>
<result property="fileId" column="file_id"/>
<result property="fileName" column="file_name"/>
<result property="fileSize" column="file_size"/>
<result property="filePath" column="file_path"/>
<result property="createBy" column="created_by"/>
<result property="createTime" column="created_time"/>
</resultMap>
<insert id="IntoUpload">
<![CDATA[
INSERT INTO sys_file_info (
id ,
file_id ,
file_name ,
file_size ,
file_path ,
created_by,
created_time
) VALUES (
#{id,jdbcType=VARCHAR},
#{fileId,jdbcType=VARCHAR},
#{fileName,jdbcType=VARCHAR},
#{fileSize,jdbcType=VARCHAR},
#{filePath,jdbcType=VARCHAR},
#{createBy,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}
)
]]>
</insert>
<select id="selectUpload" resultMap="RM_Upload">
SELECT file_id,file_name,file_size,file_path,created_by,created_time FROM sys_file_info
WHERE 1=1
<if test="@Ognl@isNotEmpty(paramBean.fileId)">
AND fileId = #{paramBean.fileId}
</if>
<if test="@Ognl@isNotEmpty(paramBean.fileName)">
AND file_name = #{paramBean.fileName}
</if>
</select>
<resultMap id="RM_Dictionary" type="com.ruoyi.system.domain_yada.Dictionary">
<result property="codingType" column="coding_type"/>
<result property="codingType1" column="codingType1"/>
<result property="codingType2" column="codingType2"/>
<result property="dictionary" column="dictionary"/>
<result property="name" column="name"/>
<result property="nameEn" column="name_en"/>
<result property="createBy" column="created_by"/>
<result property="createTime" column="created_time"/>
</resultMap>
<sql id="columnsdic">
<![CDATA[
coding_type,dictionary,name,nameEn,created_by,created_time
]]>
</sql>
<select id="selectDic" resultMap="RM_Dictionary">
select <include refid="columns"/> from dictionary
where coding_type in
(SELECT A.coding_type FROM dictionary a
join (select dictionary from dictionary
where 1=1
<if test="@Ognl@isNotEmpty(paramBean.codingType)">
AND coding_type = #{paramBean.codingType}
</if>
<if test="@Ognl@isNotEmpty(paramBean.codingType1)">
AND dictionary = #{paramBean.codingType1}
</if>
) b on a.coding_type=b.dictionary
and
<if test="@Ognl@isNotEmpty(paramBean.codingType2)">
AND a.dictionary = #{paramBean.codingType2}
</if>
)
</select>
</mapper>

View File

@ -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
]]>
</sql>
<select id="selectGlobalType" resultMap="RM_GlobalType">
SELECT <include refid="columns"/> FROM proportion_of_global_types;
SELECT <include refid="columns"/> FROM proportion_of_global_types
WHERE 1=1
<if test="particularYear!= null and particularYear !=''">
AND particular_year = #{particularYear}
</if>
<if test="typeName!= null and typeName !=''">
AND type_name = #{typeName}
</if>
</select>
<delete id="DelGlobalType">

View File

@ -6,6 +6,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap id="RM_ThematicMap" type="com.ruoyi.system.domain_yada.ThematicMapDomain">
<result property="id" column="id"/>
<result property="pictureZh" column="picture_zh"/>
<result property="pictureCode" column="picture_code"/>
<result property="pictureTypeOne" column="picture_type_one"/>
<result property="pictureTypeTwo" column="picture_type_two"/>
<result property="pictureEn" column="picture_en"/>
<result property="pictureName" column="picture_name"/>
<result property="pictureType" column="picture_type"/>
@ -19,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="columns">
<![CDATA[
id,picture_zh,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>
@ -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},