Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
d51f521f
Commit
d51f521f
authored
Oct 09, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DEL] delete region service interface
parent
6c2fad8b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
66 deletions
+33
-66
RegionController.java
...in/java/pwc/taxtech/atms/controller/RegionController.java
+14
-15
RegionService.java
...src/main/java/pwc/taxtech/atms/service/RegionService.java
+0
-27
RegionServiceImpl.java
...java/pwc/taxtech/atms/service/impl/RegionServiceImpl.java
+19
-24
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/RegionController.java
View file @
d51f521f
package
pwc
.
taxtech
.
atms
.
controller
;
import
java.util.List
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -9,36 +8,36 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
io.swagger.annotations.ApiOperation
;
import
pwc.taxtech.atms.dto.VMRegionDevTreeData
;
import
pwc.taxtech.atms.dto.navtree.DevTreeDto
;
import
pwc.taxtech.atms.dto.navtree.IvhTreeDto
;
import
pwc.taxtech.atms.entity.Region
;
import
pwc.taxtech.atms.service.RegionService
;
import
pwc.taxtech.atms.service.impl.RegionServiceImpl
;
import
java.util.List
;
@RestController
@RequestMapping
(
"/api/v1/region"
)
public
class
RegionController
{
@Autowired
private
RegionService
regionService
;
@Autowired
private
RegionServiceImpl
regionService
;
@ApiOperation
(
value
=
"getSettingRegionTree"
,
notes
=
"生成区域及省市树形结构"
)
@RequestMapping
(
value
=
{
"/getSettingRegionTree"
},
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
{
"/getSettingRegionTree"
},
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@ResponseBody
public
List
<
DevTreeDto
<
VMRegionDevTreeData
>>
getSettingRegionTree
()
{
return
regionService
.
getRegionAreaTree
();
return
regionService
.
getRegionAreaTree
();
}
@ApiOperation
(
value
=
"getProvinceAndCityTreeList"
,
notes
=
"生成省市树形结构"
)
@RequestMapping
(
value
=
{
"/getProvinceAndCityTreeList"
},
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
{
"/getProvinceAndCityTreeList"
},
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@ResponseBody
public
List
<
DevTreeDto
<
IvhTreeDto
<
Region
>>>
getProvinceAndCityTreeList
()
{
return
regionService
.
getProvinceAndCityTreeList
();
return
regionService
.
getProvinceAndCityTreeList
();
}
@SuppressWarnings
(
"rawtypes"
)
@ApiOperation
(
value
=
"根据分区获取分区和行政区域树"
,
notes
=
"机构管理/卡片/区域/点击区域编辑按钮"
)
@RequestMapping
(
value
=
"getAreRegionTreeByNodeId"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/RegionService.java
deleted
100644 → 0
View file @
6c2fad8b
package
pwc
.
taxtech
.
atms
.
service
;
import
java.util.List
;
import
pwc.taxtech.atms.dto.VMRegionDevTreeData
;
import
pwc.taxtech.atms.dto.navtree.DevTreeDto
;
import
pwc.taxtech.atms.dto.navtree.IvhTreeDto
;
import
pwc.taxtech.atms.entity.Region
;
public
interface
RegionService
{
/**
* Generate Area and Region Tree
* @return List<DevTreeDto>
*/
public
List
<
DevTreeDto
<
VMRegionDevTreeData
>>
getRegionAreaTree
();
/**
* Generate Region and City Tree
* @return
*/
public
List
<
DevTreeDto
<
IvhTreeDto
<
Region
>>>
getProvinceAndCityTreeList
();
@SuppressWarnings
(
"rawtypes"
)
List
<
DevTreeDto
>
getAreaRegionTreeByNodeId
(
String
areaId
);
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/RegionServiceImpl.java
View file @
d51f521f
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
import
static
java
.
util
.
Comparator
.
comparing
;
import
static
java
.
util
.
Comparator
.
naturalOrder
;
import
static
java
.
util
.
Comparator
.
nullsLast
;
import
static
java
.
util
.
stream
.
Collectors
.
toList
;
import
static
pwc
.
taxtech
.
atms
.
common
.
CommonUtils
.
copyProperties
;
import
static
pwc
.
taxtech
.
atms
.
common
.
CommonUtils
.
getUUID
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Objects
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.exception.ApplicationException
;
import
pwc.taxtech.atms.common.CommonConstants
;
import
pwc.taxtech.atms.common.CommonUtils
;
import
pwc.taxtech.atms.common.SortUtils
;
...
...
@@ -30,12 +17,21 @@ import pwc.taxtech.atms.entity.AreaRegion;
import
pwc.taxtech.atms.entity.AreaRegionExample
;
import
pwc.taxtech.atms.entity.Region
;
import
pwc.taxtech.atms.entity.RegionExample
;
import
pwc.taxtech.atms.exception.ApplicationException
;
import
pwc.taxtech.atms.service.AreaRegionService
;
import
pwc.taxtech.atms.service.AreaService
;
import
pwc.taxtech.atms.service.RegionService
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Objects
;
import
static
java
.
util
.
Comparator
.*;
import
static
java
.
util
.
stream
.
Collectors
.
toList
;
import
static
pwc
.
taxtech
.
atms
.
common
.
CommonUtils
.
copyProperties
;
import
static
pwc
.
taxtech
.
atms
.
common
.
CommonUtils
.
getUUID
;
@Service
public
class
RegionServiceImpl
extends
AbstractService
implements
RegionService
{
public
class
RegionServiceImpl
extends
AbstractService
{
@Autowired
private
AreaService
areaService
;
...
...
@@ -48,7 +44,7 @@ public class RegionServiceImpl extends AbstractService implements RegionService
/*
* (non-Javadoc)
*
*
* @see pwc.taxtech.atms.service.RegionService#getRegionAreaTree()
*/
public
List
<
DevTreeDto
<
VMRegionDevTreeData
>>
getRegionAreaTree
()
{
...
...
@@ -92,7 +88,7 @@ public class RegionServiceImpl extends AbstractService implements RegionService
/**
* Recursively get area tree
*
*
* @param current
* @return List<DevTreeDto>
*/
...
...
@@ -136,7 +132,7 @@ public class RegionServiceImpl extends AbstractService implements RegionService
/**
* Get the region tree under an area
*
*
* @param area
* @return List<DevTreeDto>
*/
...
...
@@ -189,7 +185,7 @@ public class RegionServiceImpl extends AbstractService implements RegionService
/*
* (non-Javadoc)
*
*
* @see pwc.taxtech.atms.service.RegionService#getProvinceAndCityTreeList()
*/
public
List
<
DevTreeDto
<
IvhTreeDto
<
Region
>>>
getProvinceAndCityTreeList
()
{
...
...
@@ -268,8 +264,7 @@ public class RegionServiceImpl extends AbstractService implements RegionService
return
devTree
;
}
@SuppressWarnings
({
"rawtypes"
,
"unchecked"
})
@Override
@SuppressWarnings
({
"rawtypes"
,
"unchecked"
})
public
List
<
DevTreeDto
>
getAreaRegionTreeByNodeId
(
String
areaId
)
{
Area
toNode
=
areaMapper
.
selectByPrimaryKey
(
areaId
);
Region
regionInfo
=
null
;
...
...
@@ -365,9 +360,9 @@ public class RegionServiceImpl extends AbstractService implements RegionService
/**
* 获取当前节点的子节点(必须是自定义的区域或者是城市及以上的区域)
*/
@SuppressWarnings
({
"rawtypes"
,
"unchecked"
})
@SuppressWarnings
({
"rawtypes"
,
"unchecked"
})
private
List
<
DevTreeDto
>
getAreaRegionChildrenList
(
RegionShortDto
current
,
List
<
Area
>
areaList
,
List
<
RegionShortDto
>
relationRegionQuery
)
{
List
<
RegionShortDto
>
relationRegionQuery
)
{
List
<
DevTreeDto
>
subWarpList
=
new
ArrayList
<>();
// 获取区域
List
<
Area
>
subList
=
areaList
.
stream
().
filter
(
sa
->
Objects
.
equals
(
sa
.
getParentId
(),
current
.
getId
()))
...
...
@@ -435,7 +430,7 @@ public class RegionServiceImpl extends AbstractService implements RegionService
return
subWarpList
;
}
@SuppressWarnings
({
"rawtypes"
,
"unchecked"
})
@SuppressWarnings
({
"rawtypes"
,
"unchecked"
})
private
List
<
DevTreeDto
>
getNavTreeDtoList
(
RegionShortDto
currentNode
,
List
<
RegionShortDto
>
list
)
{
List
<
RegionShortDto
>
subList
=
list
.
stream
().
filter
(
sa
->
Objects
.
equals
(
sa
.
getParentId
(),
currentNode
.
getId
()))
.
collect
(
toList
());
...
...
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