Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zh-baseversion-project
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王浩
zh-baseversion-project
Commits
0f3d440b
Commit
0f3d440b
authored
Jul 02, 2024
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 根据配置的市局代码查询 改市局下所有县区数据
parent
5bddd9d8
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
67 additions
and
3 deletions
+67
-3
DistrictPlanningController.java
...ong/web/controller/common/DistrictPlanningController.java
+16
-0
SysDictDataMapper.java
...main/java/com/zehong/system/mapper/SysDictDataMapper.java
+7
-0
TCountyLevelRegionMapper.java
...va/com/zehong/system/mapper/TCountyLevelRegionMapper.java
+7
-0
IDistrictPlanningService.java
...a/com/zehong/system/service/IDistrictPlanningService.java
+5
-1
ISysDictDataService.java
...n/java/com/zehong/system/service/ISysDictDataService.java
+7
-0
DistrictPlanningServiceImpl.java
...hong/system/service/impl/DistrictPlanningServiceImpl.java
+11
-2
SysDictDataServiceImpl.java
...om/zehong/system/service/impl/SysDictDataServiceImpl.java
+6
-0
SysDictDataMapper.xml
...em/src/main/resources/mapper/system/SysDictDataMapper.xml
+4
-0
TCountyLevelRegionMapper.xml
...main/resources/mapper/system/TCountyLevelRegionMapper.xml
+4
-0
No files found.
zh-baseversion-admin/src/main/java/com/zehong/web/controller/common/DistrictPlanningController.java
View file @
0f3d440b
package
com
.
zehong
.
web
.
controller
.
common
;
package
com
.
zehong
.
web
.
controller
.
common
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.system.service.IDistrictPlanningService
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
/**
/**
* 行政区规划controller
* 行政区规划controller
*/
*/
@RestController
@RestController
@RequestMapping
(
"/districtPlanning"
)
@RequestMapping
(
"/districtPlanning"
)
public
class
DistrictPlanningController
{
public
class
DistrictPlanningController
{
@Resource
IDistrictPlanningService
districtPlanningService
;
/**
* 查询监督检查列表
*/
@GetMapping
(
"/listCountyByDict"
)
public
AjaxResult
listCountyByDict
(){
return
AjaxResult
.
success
(
districtPlanningService
.
listCountyByDict
());
}
}
}
zh-baseversion-system/src/main/java/com/zehong/system/mapper/SysDictDataMapper.java
View file @
0f3d440b
...
@@ -36,6 +36,13 @@ public interface SysDictDataMapper
...
@@ -36,6 +36,13 @@ public interface SysDictDataMapper
*/
*/
public
String
selectDictLabel
(
@Param
(
"dictType"
)
String
dictType
,
@Param
(
"dictValue"
)
String
dictValue
);
public
String
selectDictLabel
(
@Param
(
"dictType"
)
String
dictType
,
@Param
(
"dictValue"
)
String
dictValue
);
/**
* 根据 标签查询
* @param dictType d
* @return r
*/
public
SysDictData
selectDictDataByLabel
(
String
dictType
);
/**
/**
* 根据字典数据ID查询信息
* 根据字典数据ID查询信息
*
*
...
...
zh-baseversion-system/src/main/java/com/zehong/system/mapper/TCountyLevelRegionMapper.java
View file @
0f3d440b
...
@@ -27,6 +27,13 @@ public interface TCountyLevelRegionMapper
...
@@ -27,6 +27,13 @@ public interface TCountyLevelRegionMapper
*/
*/
public
List
<
TCountyLevelRegion
>
selectTCountyLevelRegionList
(
TCountyLevelRegion
tCountyLevelRegion
);
public
List
<
TCountyLevelRegion
>
selectTCountyLevelRegionList
(
TCountyLevelRegion
tCountyLevelRegion
);
/**
* 根据city_code 查询
* @param fCityId c
* @return r
*/
public
List
<
TCountyLevelRegion
>
queryByCityId
(
String
fCityId
);
/**
/**
* 新增县级行政区
* 新增县级行政区
*
*
...
...
zh-baseversion-system/src/main/java/com/zehong/system/service/IDistrictPlanningService.java
View file @
0f3d440b
package
com
.
zehong
.
system
.
service
;
package
com
.
zehong
.
system
.
service
;
import
com.zehong.system.domain.TCountyLevelRegion
;
import
java.util.List
;
/**
/**
* 行政区规划service
* 行政区规划service
*
*
...
@@ -8,5 +12,5 @@ package com.zehong.system.service;
...
@@ -8,5 +12,5 @@ package com.zehong.system.service;
*/
*/
public
interface
IDistrictPlanningService
{
public
interface
IDistrictPlanningService
{
String
assemble
CountyByDict
();
List
<
TCountyLevelRegion
>
list
CountyByDict
();
}
}
zh-baseversion-system/src/main/java/com/zehong/system/service/ISysDictDataService.java
View file @
0f3d440b
...
@@ -18,6 +18,13 @@ public interface ISysDictDataService
...
@@ -18,6 +18,13 @@ public interface ISysDictDataService
*/
*/
public
List
<
SysDictData
>
selectDictDataList
(
SysDictData
dictData
);
public
List
<
SysDictData
>
selectDictDataList
(
SysDictData
dictData
);
/**
* 根据标签查询
* @param dictLable d
* @return r
*/
public
SysDictData
selectByLable
(
String
dictLable
);
/**
/**
* 根据字典类型和字典键值查询字典数据信息
* 根据字典类型和字典键值查询字典数据信息
*
*
...
...
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/DistrictPlanningServiceImpl.java
View file @
0f3d440b
package
com
.
zehong
.
system
.
service
.
impl
;
package
com
.
zehong
.
system
.
service
.
impl
;
import
com.zehong.common.core.domain.entity.SysDictData
;
import
com.zehong.system.domain.TCountyLevelRegion
;
import
com.zehong.system.mapper.TCityLevelRegionMapper
;
import
com.zehong.system.mapper.TCityLevelRegionMapper
;
import
com.zehong.system.mapper.TCountyLevelRegionMapper
;
import
com.zehong.system.mapper.TCountyLevelRegionMapper
;
import
com.zehong.system.service.IDistrictPlanningService
;
import
com.zehong.system.service.IDistrictPlanningService
;
import
com.zehong.system.service.ISysDictDataService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
/**
* @Author: zehong
* @Author: zehong
...
@@ -20,13 +24,18 @@ public class DistrictPlanningServiceImpl implements IDistrictPlanningService {
...
@@ -20,13 +24,18 @@ public class DistrictPlanningServiceImpl implements IDistrictPlanningService {
@Resource
@Resource
private
TCountyLevelRegionMapper
countyLevelRegionMapper
;
private
TCountyLevelRegionMapper
countyLevelRegionMapper
;
@Resource
private
ISysDictDataService
sysDictDataService
;
/**
/**
* 根据配置的 市查询 县-区数据 city_under_admin_plan city_code
* 根据配置的 市查询 县-区数据 city_under_admin_plan city_code
* @return r
* @return r
*/
*/
@Override
@Override
public
String
assembleCountyByDict
()
{
public
List
<
TCountyLevelRegion
>
listCountyByDict
()
{
return
null
;
SysDictData
city_code
=
sysDictDataService
.
selectByLable
(
"city_code"
);
String
dictValue
=
city_code
.
getDictValue
();
return
countyLevelRegionMapper
.
queryByCityId
(
dictValue
);
}
}
}
}
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/SysDictDataServiceImpl.java
View file @
0f3d440b
...
@@ -31,6 +31,12 @@ public class SysDictDataServiceImpl implements ISysDictDataService
...
@@ -31,6 +31,12 @@ public class SysDictDataServiceImpl implements ISysDictDataService
return
dictDataMapper
.
selectDictDataList
(
dictData
);
return
dictDataMapper
.
selectDictDataList
(
dictData
);
}
}
@Override
public
SysDictData
selectByLable
(
String
dictLable
)
{
return
dictDataMapper
.
selectDictDataByLabel
(
dictLable
);
}
/**
/**
* 根据字典类型和字典键值查询字典数据信息
* 根据字典类型和字典键值查询字典数据信息
*
*
...
...
zh-baseversion-system/src/main/resources/mapper/system/SysDictDataMapper.xml
View file @
0f3d440b
...
@@ -50,6 +50,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -50,6 +50,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select dict_label from sys_dict_data
select dict_label from sys_dict_data
where dict_type = #{dictType} and dict_value = #{dictValue}
where dict_type = #{dictType} and dict_value = #{dictValue}
</select>
</select>
<select
id=
"selectDictDataByLabel"
resultMap=
"SysDictDataResult"
>
<include
refid=
"selectDictDataVo"
/>
where dict_label = #{dictType}
</select>
<select
id=
"selectDictDataById"
parameterType=
"Long"
resultMap=
"SysDictDataResult"
>
<select
id=
"selectDictDataById"
parameterType=
"Long"
resultMap=
"SysDictDataResult"
>
<include
refid=
"selectDictDataVo"
/>
<include
refid=
"selectDictDataVo"
/>
...
...
zh-baseversion-system/src/main/resources/mapper/system/TCountyLevelRegionMapper.xml
View file @
0f3d440b
...
@@ -26,6 +26,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -26,6 +26,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"fIsMajor != null "
>
and f_is_major = #{fIsMajor}
</if>
<if
test=
"fIsMajor != null "
>
and f_is_major = #{fIsMajor}
</if>
</where>
</where>
</select>
</select>
<select
id=
"queryByCityId"
resultMap=
"TCountyLevelRegionResult"
>
<include
refid=
"selectTCountyLevelRegionVo"
/>
where f_city_id = #{fCityId}
</select>
<select
id=
"selectTCountyLevelRegionById"
parameterType=
"Long"
resultMap=
"TCountyLevelRegionResult"
>
<select
id=
"selectTCountyLevelRegionById"
parameterType=
"Long"
resultMap=
"TCountyLevelRegionResult"
>
<include
refid=
"selectTCountyLevelRegionVo"
/>
<include
refid=
"selectTCountyLevelRegionVo"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment