Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
9c199db5
Commit
9c199db5
authored
Mar 23, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改行政区划查询
parent
ce76e1f8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
EquipmentCategoryServiceImpl.java
...le/tzs/biz/service/impl/EquipmentCategoryServiceImpl.java
+10
-8
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/EquipmentCategoryServiceImpl.java
View file @
9c199db5
...
...
@@ -167,7 +167,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
}
}
//生成码
Map
<
String
,
String
>
codeMap
=
new
HashMap
<>()
;
Map
<
String
,
String
>
codeMap
;
synchronized
(
EquipmentCategoryServiceImpl
.
class
)
{
codeMap
=
creatCode
(
city
,
county
,
equipCategory
,
equipList
,
record
);
}
...
...
@@ -224,11 +224,11 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
@Override
public
List
<
LinkedHashMap
>
getRegion
(
String
level
,
String
parentId
)
{
List
<
LinkedHashMap
>
list
=
new
ArrayList
<>()
;
if
(
ObjectUtils
.
isEmpty
(
parentId
))
{
List
<
LinkedHashMap
>
list
;
if
(
!
ObjectUtils
.
isEmpty
(
level
))
{
list
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
PROVINCE
);
return
ObjectUtils
.
isEmpty
(
list
)
?
getProvinceList
(
level
)
:
list
;
}
else
{
}
else
if
(!
ObjectUtils
.
isEmpty
(
parentId
))
{
String
regionCode
=
parentId
.
split
(
"_"
)[
0
];
Map
<
String
,
Object
>
map
=
regionCode
.
endsWith
(
"0000"
)
?
(
Map
<
String
,
Object
>)
redisUtils
.
get
(
CITY
)
:
(
Map
<
String
,
Object
>)
redisUtils
.
get
(
REGION
);
if
(
ObjectUtils
.
isEmpty
(
map
))
{
...
...
@@ -236,12 +236,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
}
list
=
(
List
<
LinkedHashMap
>)
map
.
get
(
regionCode
);
return
list
;
}
else
{
return
new
ArrayList
<>();
}
}
public
Map
<
String
,
Object
>
getRegionList
()
{
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
List
<
LinkedHashMap
>
cityList
=
new
ArrayList
<>()
;
List
<
LinkedHashMap
>
cityList
;
FeignClientResult
tree
=
privilegeFeginService
.
getTree
();
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
tree
.
getResult
();
String
regionCode
=
((
List
<
LinkedHashMap
>)
privilegeFeginService
.
getProvince
(
"1"
).
getResult
()).
get
(
0
).
get
(
"regionCode"
).
toString
();
...
...
@@ -265,7 +267,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
}
public
List
<
LinkedHashMap
>
getProvinceList
(
String
level
)
{
List
<
LinkedHashMap
>
list
=
new
ArrayList
<>()
;
List
<
LinkedHashMap
>
list
;
FeignClientResult
result
=
privilegeFeginService
.
getProvince
(
level
);
list
=
(
List
<
LinkedHashMap
>)
result
.
getResult
();
list
.
get
(
0
).
put
(
"sequenceNbr"
,
list
.
get
(
0
).
get
(
"regionCode"
));
...
...
@@ -276,7 +278,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
@Override
public
Map
<
String
,
Object
>
getCategoryAndDefineByRecord
(
String
record
)
{
if
(
ObjectUtils
.
isEmpty
(
record
))
{
return
n
ull
;
return
n
ew
HashMap
<>()
;
}
return
equipmentCategoryMapper
.
getCategoryAndDefineByRecord
(
record
);
}
...
...
@@ -379,7 +381,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
}
}
if
(
ObjectUtils
.
isEmpty
(
supervisorCode
)
&&
ObjectUtils
.
isEmpty
(
elevatorCode
))
{
return
n
ull
;
return
n
ew
HashMap
<>()
;
}
resultMap
.
put
(
"supervisorCode"
,
ObjectUtils
.
isEmpty
(
supervisorCode
)
?
null
:
supervisorCode
.
toString
());
resultMap
.
put
(
"elevatorCode"
,
ObjectUtils
.
isEmpty
(
elevatorCode
)
?
null
:
elevatorCode
.
toString
());
...
...
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