diff --git a/backend/pom.xml b/backend/pom.xml
index b7bb00609b..27826a6cde 100644
--- a/backend/pom.xml
+++ b/backend/pom.xml
@@ -370,6 +370,18 @@
ST4
4.0.8
+
+
+ cn.hutool
+ hutool-all
+ 5.7.4
+
+
+
diff --git a/backend/src/main/java/io/dataease/base/domain/AreaMapping.java b/backend/src/main/java/io/dataease/base/domain/AreaMapping.java
new file mode 100644
index 0000000000..46c59b7fe5
--- /dev/null
+++ b/backend/src/main/java/io/dataease/base/domain/AreaMapping.java
@@ -0,0 +1,23 @@
+package io.dataease.base.domain;
+
+import java.io.Serializable;
+import lombok.Data;
+
+@Data
+public class AreaMapping implements Serializable {
+ private Long id;
+
+ private String provinceName;
+
+ private String provinceCode;
+
+ private String cityName;
+
+ private String cityCode;
+
+ private String countyName;
+
+ private String countyCode;
+
+ private static final long serialVersionUID = 1L;
+}
\ No newline at end of file
diff --git a/backend/src/main/java/io/dataease/base/domain/AreaMappingExample.java b/backend/src/main/java/io/dataease/base/domain/AreaMappingExample.java
new file mode 100644
index 0000000000..056db4893e
--- /dev/null
+++ b/backend/src/main/java/io/dataease/base/domain/AreaMappingExample.java
@@ -0,0 +1,680 @@
+package io.dataease.base.domain;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class AreaMappingExample {
+ protected String orderByClause;
+
+ protected boolean distinct;
+
+ protected List oredCriteria;
+
+ public AreaMappingExample() {
+ oredCriteria = new ArrayList();
+ }
+
+ public void setOrderByClause(String orderByClause) {
+ this.orderByClause = orderByClause;
+ }
+
+ public String getOrderByClause() {
+ return orderByClause;
+ }
+
+ public void setDistinct(boolean distinct) {
+ this.distinct = distinct;
+ }
+
+ public boolean isDistinct() {
+ return distinct;
+ }
+
+ public List getOredCriteria() {
+ return oredCriteria;
+ }
+
+ public void or(Criteria criteria) {
+ oredCriteria.add(criteria);
+ }
+
+ public Criteria or() {
+ Criteria criteria = createCriteriaInternal();
+ oredCriteria.add(criteria);
+ return criteria;
+ }
+
+ public Criteria createCriteria() {
+ Criteria criteria = createCriteriaInternal();
+ if (oredCriteria.size() == 0) {
+ oredCriteria.add(criteria);
+ }
+ return criteria;
+ }
+
+ protected Criteria createCriteriaInternal() {
+ Criteria criteria = new Criteria();
+ return criteria;
+ }
+
+ public void clear() {
+ oredCriteria.clear();
+ orderByClause = null;
+ distinct = false;
+ }
+
+ protected abstract static class GeneratedCriteria {
+ protected List criteria;
+
+ protected GeneratedCriteria() {
+ super();
+ criteria = new ArrayList();
+ }
+
+ public boolean isValid() {
+ return criteria.size() > 0;
+ }
+
+ public List getAllCriteria() {
+ return criteria;
+ }
+
+ public List getCriteria() {
+ return criteria;
+ }
+
+ protected void addCriterion(String condition) {
+ if (condition == null) {
+ throw new RuntimeException("Value for condition cannot be null");
+ }
+ criteria.add(new Criterion(condition));
+ }
+
+ protected void addCriterion(String condition, Object value, String property) {
+ if (value == null) {
+ throw new RuntimeException("Value for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value));
+ }
+
+ protected void addCriterion(String condition, Object value1, Object value2, String property) {
+ if (value1 == null || value2 == null) {
+ throw new RuntimeException("Between values for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value1, value2));
+ }
+
+ public Criteria andIdIsNull() {
+ addCriterion("id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdIsNotNull() {
+ addCriterion("id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdEqualTo(Long value) {
+ addCriterion("id =", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotEqualTo(Long value) {
+ addCriterion("id <>", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdGreaterThan(Long value) {
+ addCriterion("id >", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdGreaterThanOrEqualTo(Long value) {
+ addCriterion("id >=", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdLessThan(Long value) {
+ addCriterion("id <", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdLessThanOrEqualTo(Long value) {
+ addCriterion("id <=", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdIn(List values) {
+ addCriterion("id in", values, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotIn(List values) {
+ addCriterion("id not in", values, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdBetween(Long value1, Long value2) {
+ addCriterion("id between", value1, value2, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotBetween(Long value1, Long value2) {
+ addCriterion("id not between", value1, value2, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceNameIsNull() {
+ addCriterion("province_name is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceNameIsNotNull() {
+ addCriterion("province_name is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceNameEqualTo(String value) {
+ addCriterion("province_name =", value, "provinceName");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceNameNotEqualTo(String value) {
+ addCriterion("province_name <>", value, "provinceName");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceNameGreaterThan(String value) {
+ addCriterion("province_name >", value, "provinceName");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceNameGreaterThanOrEqualTo(String value) {
+ addCriterion("province_name >=", value, "provinceName");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceNameLessThan(String value) {
+ addCriterion("province_name <", value, "provinceName");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceNameLessThanOrEqualTo(String value) {
+ addCriterion("province_name <=", value, "provinceName");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceNameLike(String value) {
+ addCriterion("province_name like", value, "provinceName");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceNameNotLike(String value) {
+ addCriterion("province_name not like", value, "provinceName");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceNameIn(List values) {
+ addCriterion("province_name in", values, "provinceName");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceNameNotIn(List values) {
+ addCriterion("province_name not in", values, "provinceName");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceNameBetween(String value1, String value2) {
+ addCriterion("province_name between", value1, value2, "provinceName");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceNameNotBetween(String value1, String value2) {
+ addCriterion("province_name not between", value1, value2, "provinceName");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceCodeIsNull() {
+ addCriterion("province_code is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceCodeIsNotNull() {
+ addCriterion("province_code is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceCodeEqualTo(String value) {
+ addCriterion("province_code =", value, "provinceCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceCodeNotEqualTo(String value) {
+ addCriterion("province_code <>", value, "provinceCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceCodeGreaterThan(String value) {
+ addCriterion("province_code >", value, "provinceCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceCodeGreaterThanOrEqualTo(String value) {
+ addCriterion("province_code >=", value, "provinceCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceCodeLessThan(String value) {
+ addCriterion("province_code <", value, "provinceCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceCodeLessThanOrEqualTo(String value) {
+ addCriterion("province_code <=", value, "provinceCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceCodeLike(String value) {
+ addCriterion("province_code like", value, "provinceCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceCodeNotLike(String value) {
+ addCriterion("province_code not like", value, "provinceCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceCodeIn(List values) {
+ addCriterion("province_code in", values, "provinceCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceCodeNotIn(List values) {
+ addCriterion("province_code not in", values, "provinceCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceCodeBetween(String value1, String value2) {
+ addCriterion("province_code between", value1, value2, "provinceCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andProvinceCodeNotBetween(String value1, String value2) {
+ addCriterion("province_code not between", value1, value2, "provinceCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityNameIsNull() {
+ addCriterion("city_name is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityNameIsNotNull() {
+ addCriterion("city_name is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityNameEqualTo(String value) {
+ addCriterion("city_name =", value, "cityName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityNameNotEqualTo(String value) {
+ addCriterion("city_name <>", value, "cityName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityNameGreaterThan(String value) {
+ addCriterion("city_name >", value, "cityName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityNameGreaterThanOrEqualTo(String value) {
+ addCriterion("city_name >=", value, "cityName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityNameLessThan(String value) {
+ addCriterion("city_name <", value, "cityName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityNameLessThanOrEqualTo(String value) {
+ addCriterion("city_name <=", value, "cityName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityNameLike(String value) {
+ addCriterion("city_name like", value, "cityName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityNameNotLike(String value) {
+ addCriterion("city_name not like", value, "cityName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityNameIn(List values) {
+ addCriterion("city_name in", values, "cityName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityNameNotIn(List values) {
+ addCriterion("city_name not in", values, "cityName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityNameBetween(String value1, String value2) {
+ addCriterion("city_name between", value1, value2, "cityName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityNameNotBetween(String value1, String value2) {
+ addCriterion("city_name not between", value1, value2, "cityName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityCodeIsNull() {
+ addCriterion("city_code is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityCodeIsNotNull() {
+ addCriterion("city_code is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityCodeEqualTo(String value) {
+ addCriterion("city_code =", value, "cityCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityCodeNotEqualTo(String value) {
+ addCriterion("city_code <>", value, "cityCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityCodeGreaterThan(String value) {
+ addCriterion("city_code >", value, "cityCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityCodeGreaterThanOrEqualTo(String value) {
+ addCriterion("city_code >=", value, "cityCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityCodeLessThan(String value) {
+ addCriterion("city_code <", value, "cityCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityCodeLessThanOrEqualTo(String value) {
+ addCriterion("city_code <=", value, "cityCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityCodeLike(String value) {
+ addCriterion("city_code like", value, "cityCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityCodeNotLike(String value) {
+ addCriterion("city_code not like", value, "cityCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityCodeIn(List values) {
+ addCriterion("city_code in", values, "cityCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityCodeNotIn(List values) {
+ addCriterion("city_code not in", values, "cityCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityCodeBetween(String value1, String value2) {
+ addCriterion("city_code between", value1, value2, "cityCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andCityCodeNotBetween(String value1, String value2) {
+ addCriterion("city_code not between", value1, value2, "cityCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyNameIsNull() {
+ addCriterion("county_name is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyNameIsNotNull() {
+ addCriterion("county_name is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyNameEqualTo(String value) {
+ addCriterion("county_name =", value, "countyName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyNameNotEqualTo(String value) {
+ addCriterion("county_name <>", value, "countyName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyNameGreaterThan(String value) {
+ addCriterion("county_name >", value, "countyName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyNameGreaterThanOrEqualTo(String value) {
+ addCriterion("county_name >=", value, "countyName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyNameLessThan(String value) {
+ addCriterion("county_name <", value, "countyName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyNameLessThanOrEqualTo(String value) {
+ addCriterion("county_name <=", value, "countyName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyNameLike(String value) {
+ addCriterion("county_name like", value, "countyName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyNameNotLike(String value) {
+ addCriterion("county_name not like", value, "countyName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyNameIn(List values) {
+ addCriterion("county_name in", values, "countyName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyNameNotIn(List values) {
+ addCriterion("county_name not in", values, "countyName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyNameBetween(String value1, String value2) {
+ addCriterion("county_name between", value1, value2, "countyName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyNameNotBetween(String value1, String value2) {
+ addCriterion("county_name not between", value1, value2, "countyName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyCodeIsNull() {
+ addCriterion("county_code is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyCodeIsNotNull() {
+ addCriterion("county_code is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyCodeEqualTo(String value) {
+ addCriterion("county_code =", value, "countyCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyCodeNotEqualTo(String value) {
+ addCriterion("county_code <>", value, "countyCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyCodeGreaterThan(String value) {
+ addCriterion("county_code >", value, "countyCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyCodeGreaterThanOrEqualTo(String value) {
+ addCriterion("county_code >=", value, "countyCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyCodeLessThan(String value) {
+ addCriterion("county_code <", value, "countyCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyCodeLessThanOrEqualTo(String value) {
+ addCriterion("county_code <=", value, "countyCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyCodeLike(String value) {
+ addCriterion("county_code like", value, "countyCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyCodeNotLike(String value) {
+ addCriterion("county_code not like", value, "countyCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyCodeIn(List values) {
+ addCriterion("county_code in", values, "countyCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyCodeNotIn(List values) {
+ addCriterion("county_code not in", values, "countyCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyCodeBetween(String value1, String value2) {
+ addCriterion("county_code between", value1, value2, "countyCode");
+ return (Criteria) this;
+ }
+
+ public Criteria andCountyCodeNotBetween(String value1, String value2) {
+ addCriterion("county_code not between", value1, value2, "countyCode");
+ return (Criteria) this;
+ }
+ }
+
+ public static class Criteria extends GeneratedCriteria {
+
+ protected Criteria() {
+ super();
+ }
+ }
+
+ public static class Criterion {
+ private String condition;
+
+ private Object value;
+
+ private Object secondValue;
+
+ private boolean noValue;
+
+ private boolean singleValue;
+
+ private boolean betweenValue;
+
+ private boolean listValue;
+
+ private String typeHandler;
+
+ public String getCondition() {
+ return condition;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public Object getSecondValue() {
+ return secondValue;
+ }
+
+ public boolean isNoValue() {
+ return noValue;
+ }
+
+ public boolean isSingleValue() {
+ return singleValue;
+ }
+
+ public boolean isBetweenValue() {
+ return betweenValue;
+ }
+
+ public boolean isListValue() {
+ return listValue;
+ }
+
+ public String getTypeHandler() {
+ return typeHandler;
+ }
+
+ protected Criterion(String condition) {
+ super();
+ this.condition = condition;
+ this.typeHandler = null;
+ this.noValue = true;
+ }
+
+ protected Criterion(String condition, Object value, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.typeHandler = typeHandler;
+ if (value instanceof List>) {
+ this.listValue = true;
+ } else {
+ this.singleValue = true;
+ }
+ }
+
+ protected Criterion(String condition, Object value) {
+ this(condition, value, null);
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.secondValue = secondValue;
+ this.typeHandler = typeHandler;
+ this.betweenValue = true;
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue) {
+ this(condition, value, secondValue, null);
+ }
+ }
+}
\ No newline at end of file
diff --git a/backend/src/main/java/io/dataease/base/mapper/AreaMappingMapper.java b/backend/src/main/java/io/dataease/base/mapper/AreaMappingMapper.java
new file mode 100644
index 0000000000..0ae111c5e3
--- /dev/null
+++ b/backend/src/main/java/io/dataease/base/mapper/AreaMappingMapper.java
@@ -0,0 +1,30 @@
+package io.dataease.base.mapper;
+
+import io.dataease.base.domain.AreaMapping;
+import io.dataease.base.domain.AreaMappingExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface AreaMappingMapper {
+ long countByExample(AreaMappingExample example);
+
+ int deleteByExample(AreaMappingExample example);
+
+ int deleteByPrimaryKey(Long id);
+
+ int insert(AreaMapping record);
+
+ int insertSelective(AreaMapping record);
+
+ List selectByExample(AreaMappingExample example);
+
+ AreaMapping selectByPrimaryKey(Long id);
+
+ int updateByExampleSelective(@Param("record") AreaMapping record, @Param("example") AreaMappingExample example);
+
+ int updateByExample(@Param("record") AreaMapping record, @Param("example") AreaMappingExample example);
+
+ int updateByPrimaryKeySelective(AreaMapping record);
+
+ int updateByPrimaryKey(AreaMapping record);
+}
\ No newline at end of file
diff --git a/backend/src/main/java/io/dataease/base/mapper/AreaMappingMapper.xml b/backend/src/main/java/io/dataease/base/mapper/AreaMappingMapper.xml
new file mode 100644
index 0000000000..762158d570
--- /dev/null
+++ b/backend/src/main/java/io/dataease/base/mapper/AreaMappingMapper.xml
@@ -0,0 +1,243 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+ id, province_name, province_code, city_name, city_code, county_name, county_code
+
+
+
+
+ delete from area_mapping
+ where id = #{id,jdbcType=BIGINT}
+
+
+ delete from area_mapping
+
+
+
+
+
+ insert into area_mapping (id, province_name, province_code,
+ city_name, city_code, county_name,
+ county_code)
+ values (#{id,jdbcType=BIGINT}, #{provinceName,jdbcType=VARCHAR}, #{provinceCode,jdbcType=VARCHAR},
+ #{cityName,jdbcType=VARCHAR}, #{cityCode,jdbcType=VARCHAR}, #{countyName,jdbcType=VARCHAR},
+ #{countyCode,jdbcType=VARCHAR})
+
+
+ insert into area_mapping
+
+
+ id,
+
+
+ province_name,
+
+
+ province_code,
+
+
+ city_name,
+
+
+ city_code,
+
+
+ county_name,
+
+
+ county_code,
+
+
+
+
+ #{id,jdbcType=BIGINT},
+
+
+ #{provinceName,jdbcType=VARCHAR},
+
+
+ #{provinceCode,jdbcType=VARCHAR},
+
+
+ #{cityName,jdbcType=VARCHAR},
+
+
+ #{cityCode,jdbcType=VARCHAR},
+
+
+ #{countyName,jdbcType=VARCHAR},
+
+
+ #{countyCode,jdbcType=VARCHAR},
+
+
+
+
+
+ update area_mapping
+
+
+ id = #{record.id,jdbcType=BIGINT},
+
+
+ province_name = #{record.provinceName,jdbcType=VARCHAR},
+
+
+ province_code = #{record.provinceCode,jdbcType=VARCHAR},
+
+
+ city_name = #{record.cityName,jdbcType=VARCHAR},
+
+
+ city_code = #{record.cityCode,jdbcType=VARCHAR},
+
+
+ county_name = #{record.countyName,jdbcType=VARCHAR},
+
+
+ county_code = #{record.countyCode,jdbcType=VARCHAR},
+
+
+
+
+
+
+
+ update area_mapping
+ set id = #{record.id,jdbcType=BIGINT},
+ province_name = #{record.provinceName,jdbcType=VARCHAR},
+ province_code = #{record.provinceCode,jdbcType=VARCHAR},
+ city_name = #{record.cityName,jdbcType=VARCHAR},
+ city_code = #{record.cityCode,jdbcType=VARCHAR},
+ county_name = #{record.countyName,jdbcType=VARCHAR},
+ county_code = #{record.countyCode,jdbcType=VARCHAR}
+
+
+
+
+
+ update area_mapping
+
+
+ province_name = #{provinceName,jdbcType=VARCHAR},
+
+
+ province_code = #{provinceCode,jdbcType=VARCHAR},
+
+
+ city_name = #{cityName,jdbcType=VARCHAR},
+
+
+ city_code = #{cityCode,jdbcType=VARCHAR},
+
+
+ county_name = #{countyName,jdbcType=VARCHAR},
+
+
+ county_code = #{countyCode,jdbcType=VARCHAR},
+
+
+ where id = #{id,jdbcType=BIGINT}
+
+
+ update area_mapping
+ set province_name = #{provinceName,jdbcType=VARCHAR},
+ province_code = #{provinceCode,jdbcType=VARCHAR},
+ city_name = #{cityName,jdbcType=VARCHAR},
+ city_code = #{cityCode,jdbcType=VARCHAR},
+ county_name = #{countyName,jdbcType=VARCHAR},
+ county_code = #{countyCode,jdbcType=VARCHAR}
+ where id = #{id,jdbcType=BIGINT}
+
+
\ No newline at end of file
diff --git a/backend/src/main/java/io/dataease/map/api/MapApi.java b/backend/src/main/java/io/dataease/map/api/MapApi.java
new file mode 100644
index 0000000000..7c47924083
--- /dev/null
+++ b/backend/src/main/java/io/dataease/map/api/MapApi.java
@@ -0,0 +1,21 @@
+package io.dataease.map.api;
+
+import io.dataease.map.dto.entity.AreaEntity;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import java.util.List;
+
+@RequestMapping("/api/map")
+public interface MapApi {
+
+ @GetMapping("/resourceFull/{areaCode}")
+ String resourceFull(@PathVariable String areaCode);
+
+ @GetMapping("/asyncGeometry")
+ String asyncGeometry();
+
+ @GetMapping("/areaEntitys/{pcode}")
+ List areaEntitys(@PathVariable String pcode);
+}
diff --git a/backend/src/main/java/io/dataease/map/dto/entity/AreaEntity.java b/backend/src/main/java/io/dataease/map/dto/entity/AreaEntity.java
new file mode 100644
index 0000000000..3b5acae163
--- /dev/null
+++ b/backend/src/main/java/io/dataease/map/dto/entity/AreaEntity.java
@@ -0,0 +1,30 @@
+package io.dataease.map.dto.entity;
+
+import lombok.Builder;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+@Data
+@Builder
+public class AreaEntity implements Serializable {
+
+ private static final long serialVersionUID = -1326667005437020282L;
+
+ private String code;
+
+ private String name;
+
+ private String pcode;
+
+ private List children;
+
+ public void addChild(AreaEntity entity) {
+ children = Optional.ofNullable(children).orElse(new ArrayList<>());
+ entity.setPcode(code);
+ children.add(entity);
+ }
+}
diff --git a/backend/src/main/java/io/dataease/map/dto/entity/Constants.java b/backend/src/main/java/io/dataease/map/dto/entity/Constants.java
new file mode 100644
index 0000000000..5cd4bbcee8
--- /dev/null
+++ b/backend/src/main/java/io/dataease/map/dto/entity/Constants.java
@@ -0,0 +1,14 @@
+package io.dataease.map.dto.entity;
+
+public class Constants {
+
+ public static final String PROVINCE_CODE = "省gb";
+ public static final String PROVINCE_NAME = "省name";
+
+ public static final String CITY_CODE = "市gb";
+ public static final String CITY_NAME = "市name";
+
+ public static final String COUNTY_CODE = "县gb";
+ public static final String COUNTY_NAME = "县name";
+
+}
diff --git a/backend/src/main/java/io/dataease/map/dto/entity/District.java b/backend/src/main/java/io/dataease/map/dto/entity/District.java
new file mode 100644
index 0000000000..a26077d347
--- /dev/null
+++ b/backend/src/main/java/io/dataease/map/dto/entity/District.java
@@ -0,0 +1,24 @@
+package io.dataease.map.dto.entity;
+
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class District {
+
+ private String adcode;
+
+ private String center;
+
+ private String citycode;
+
+ private String level;
+
+ private String name;
+
+ private String polyline;
+
+ private List districts;
+}
diff --git a/backend/src/main/java/io/dataease/map/dto/entity/Feature.java b/backend/src/main/java/io/dataease/map/dto/entity/Feature.java
new file mode 100644
index 0000000000..a9ada4dae0
--- /dev/null
+++ b/backend/src/main/java/io/dataease/map/dto/entity/Feature.java
@@ -0,0 +1,15 @@
+package io.dataease.map.dto.entity;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class Feature implements Serializable {
+
+ private String type;
+
+ private Properties properties;
+
+ private Geometry geometry;
+}
diff --git a/backend/src/main/java/io/dataease/map/dto/entity/Geometry.java b/backend/src/main/java/io/dataease/map/dto/entity/Geometry.java
new file mode 100644
index 0000000000..9e903c40d8
--- /dev/null
+++ b/backend/src/main/java/io/dataease/map/dto/entity/Geometry.java
@@ -0,0 +1,17 @@
+package io.dataease.map.dto.entity;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+@Data
+public class Geometry implements Serializable {
+
+ private String type;
+
+ // 多个面构成
+ // point一维数组 polyline二维数组 polygon三维数组 MultiPolygon四维数组
+ private List>>> coordinates;
+
+}
diff --git a/backend/src/main/java/io/dataease/map/dto/entity/Parent.java b/backend/src/main/java/io/dataease/map/dto/entity/Parent.java
new file mode 100644
index 0000000000..0dd43cdf92
--- /dev/null
+++ b/backend/src/main/java/io/dataease/map/dto/entity/Parent.java
@@ -0,0 +1,11 @@
+package io.dataease.map.dto.entity;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class Parent implements Serializable {
+
+ private String adcode;
+}
diff --git a/backend/src/main/java/io/dataease/map/dto/entity/Properties.java b/backend/src/main/java/io/dataease/map/dto/entity/Properties.java
new file mode 100644
index 0000000000..56293b8316
--- /dev/null
+++ b/backend/src/main/java/io/dataease/map/dto/entity/Properties.java
@@ -0,0 +1,29 @@
+package io.dataease.map.dto.entity;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+
+@Data
+public class Properties implements Serializable {
+
+ private String adcode;
+
+ private String name;
+
+ private List center;
+
+ private List centroid;
+
+ private Integer childrenNum;
+
+ private String level;
+
+ private Parent parent;
+
+ private Integer subFeatureIndex;
+
+ private List acroutes;
+}
diff --git a/backend/src/main/java/io/dataease/map/dto/request/MapRequest.java b/backend/src/main/java/io/dataease/map/dto/request/MapRequest.java
new file mode 100644
index 0000000000..78619e7c03
--- /dev/null
+++ b/backend/src/main/java/io/dataease/map/dto/request/MapRequest.java
@@ -0,0 +1,21 @@
+package io.dataease.map.dto.request;
+
+import lombok.Builder;
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+@Builder
+public class MapRequest implements Serializable {
+
+ private String keywords;
+
+ private Integer subdistrict;
+
+ private String extensions;
+
+ private String key;
+
+ private Integer page = 1;
+}
diff --git a/backend/src/main/java/io/dataease/map/dto/response/MapResponse.java b/backend/src/main/java/io/dataease/map/dto/response/MapResponse.java
new file mode 100644
index 0000000000..103d106b1a
--- /dev/null
+++ b/backend/src/main/java/io/dataease/map/dto/response/MapResponse.java
@@ -0,0 +1,20 @@
+package io.dataease.map.dto.response;
+
+import io.dataease.map.dto.entity.District;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class MapResponse {
+
+ private String status;
+
+ private String info;
+
+ private String infocode;
+
+ private String count;
+
+ private List districts;
+}
diff --git a/backend/src/main/java/io/dataease/map/dto/response/MapResultDto.java b/backend/src/main/java/io/dataease/map/dto/response/MapResultDto.java
new file mode 100644
index 0000000000..1f8fae9baf
--- /dev/null
+++ b/backend/src/main/java/io/dataease/map/dto/response/MapResultDto.java
@@ -0,0 +1,16 @@
+package io.dataease.map.dto.response;
+
+import io.dataease.map.dto.entity.Feature;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+
+@Data
+public class MapResultDto implements Serializable {
+
+ private String type;
+
+ private List features;
+}
diff --git a/backend/src/main/java/io/dataease/map/server/MapServer.java b/backend/src/main/java/io/dataease/map/server/MapServer.java
new file mode 100644
index 0000000000..1d51b943cc
--- /dev/null
+++ b/backend/src/main/java/io/dataease/map/server/MapServer.java
@@ -0,0 +1,50 @@
+package io.dataease.map.server;
+
+import io.dataease.commons.utils.LogUtil;
+import io.dataease.map.api.MapApi;
+import io.dataease.map.dto.entity.AreaEntity;
+import io.dataease.map.service.MapService;
+import io.dataease.map.utils.MapUtils;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
+import java.util.List;
+
+@RestController
+public class MapServer implements MapApi {
+
+
+
+ @Resource
+ private MapService mapService;
+
+ @Override
+ public String resourceFull(@PathVariable String areaCode) {
+ return mapService.geometry(areaCode);
+ }
+
+ @Override
+ public String asyncGeometry() {
+ try {
+ // List areaEntities = MapUtils.readAreaEntity();
+ List areaEntities = mapService.areaEntities();
+ MapUtils.recursionWriteFull(areaEntities);
+ }catch (Exception e) {
+ LogUtil.error(e);
+ return e.getMessage();
+ }
+ return "async success";
+ }
+
+ @Override
+ public List areaEntitys(@PathVariable String pcode) {
+ List areaEntities = mapService.areaEntities();
+
+ return mapService.entitysByPid(areaEntities, pcode);
+
+ /*return areaEntities.stream().filter(item -> StringUtils.equals(item.getPcode(), pcode)).map(item -> {
+ item.setChildren(null);
+ return item;
+ }).collect(Collectors.toList());*/
+ }
+}
diff --git a/backend/src/main/java/io/dataease/map/service/MapService.java b/backend/src/main/java/io/dataease/map/service/MapService.java
new file mode 100644
index 0000000000..b27da8b05f
--- /dev/null
+++ b/backend/src/main/java/io/dataease/map/service/MapService.java
@@ -0,0 +1,51 @@
+package io.dataease.map.service;
+
+
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.io.file.FileReader;
+import io.dataease.map.dto.entity.AreaEntity;
+import io.dataease.map.utils.MapUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.cache.annotation.Cacheable;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class MapService {
+
+
+ private static final String dirPath = "/opt/dataease/data/feature/";
+
+ // 要不要加缓存呢?
+ public String geometry(String areaCode) {
+ String path = dirPath + "full/" + areaCode + "_full.json";
+ FileReader fileReader = new FileReader(path);
+ return fileReader.readString();
+ }
+
+ @Cacheable("sys_map_areas")
+ public List areaEntities() {
+ List areaEntities = MapUtils.readAreaEntity();
+ return areaEntities;
+ }
+
+ public List entitysByPid(List entities, String pid) {
+ for (int i = 0; i < entities.size(); i++) {
+ AreaEntity areaEntity = entities.get(i);
+ if (StringUtils.equals(pid, areaEntity.getCode())) {
+ return areaEntity.getChildren();
+ }
+
+ if (CollectionUtil.isNotEmpty(areaEntity.getChildren())) {
+ List areaEntities = entitysByPid(areaEntity.getChildren(), pid);
+ if (null != areaEntities){
+ return areaEntities;
+ }
+ }
+ }
+ return null;
+
+ }
+
+}
diff --git a/backend/src/main/java/io/dataease/map/utils/HttpUtils.java b/backend/src/main/java/io/dataease/map/utils/HttpUtils.java
new file mode 100644
index 0000000000..52f26f38b2
--- /dev/null
+++ b/backend/src/main/java/io/dataease/map/utils/HttpUtils.java
@@ -0,0 +1,40 @@
+package io.dataease.map.utils;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.http.HttpUtil;
+import cn.hutool.json.JSONUtil;
+import io.dataease.map.dto.request.MapRequest;
+import io.dataease.map.dto.response.MapResponse;
+
+
+import java.util.Map;
+
+public class HttpUtils {
+
+ private static final String url = "https://restapi.amap.com/v3/config/district";
+
+
+ private static final String key = "a5d10d5d05a3a0868cec67c4d66cf025";
+ private static final String extensions = "all";
+ private static final Integer subdistrict = 0;
+
+
+
+ public static MapResponse get(MapRequest request){
+ request.setKey(key);
+ request.setExtensions(extensions);
+ request.setSubdistrict(subdistrict);
+ Map param = BeanUtil.beanToMap(request);
+
+ String s = HttpUtil.get(url, param);
+ MapResponse mapResponse = JSONUtil.toBean(s, MapResponse.class);
+ return mapResponse;
+ }
+
+ public static MapResponse get(String code) {
+ MapRequest request = MapRequest.builder().keywords(code).build();
+ return get(request);
+ }
+
+
+}
diff --git a/backend/src/main/java/io/dataease/map/utils/MapUtils.java b/backend/src/main/java/io/dataease/map/utils/MapUtils.java
new file mode 100644
index 0000000000..0cc7edcc39
--- /dev/null
+++ b/backend/src/main/java/io/dataease/map/utils/MapUtils.java
@@ -0,0 +1,252 @@
+package io.dataease.map.utils;
+
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.io.file.FileWriter;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.json.JSONUtil;
+import io.dataease.base.domain.AreaMapping;
+import io.dataease.base.domain.AreaMappingExample;
+import io.dataease.base.mapper.AreaMappingMapper;
+import io.dataease.map.dto.entity.*;
+import io.dataease.map.dto.entity.Properties;
+import io.dataease.map.dto.response.MapResponse;
+import io.dataease.map.dto.response.MapResultDto;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.stream.Collectors;
+
+@Component
+public class MapUtils {
+
+
+ private static AreaMappingMapper areaMappingMapper;
+
+ @Autowired
+ public void setAreaMappingMapper(AreaMappingMapper areaMappingMapper) {
+ MapUtils.areaMappingMapper = areaMappingMapper;
+ }
+
+ private static final String path = "/opt/dataease/data/行政区划列表2020-03.xlsx";
+ private static final String featureDir = "/opt/dataease/data/feature/";
+
+
+ public static String formatCode(String code) {
+ return code.substring(3);
+ }
+
+ /*public static List