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
3d2c1b33
Commit
3d2c1b33
authored
Mar 22, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改监管码生成
parent
4795d9b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
22 deletions
+26
-22
EquipmentCategoryServiceImpl.java
...le/tzs/biz/service/impl/EquipmentCategoryServiceImpl.java
+26
-22
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 @
3d2c1b33
...
@@ -234,13 +234,13 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -234,13 +234,13 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
if
(
ObjectUtils
.
isEmpty
(
map
))
{
if
(
ObjectUtils
.
isEmpty
(
map
))
{
map
=
getRegionList
();
map
=
getRegionList
();
}
}
list
=
(
List
<
LinkedHashMap
>)
map
.
get
(
regionCode
);
list
=
(
List
<
LinkedHashMap
>)
map
.
get
(
regionCode
);
return
list
;
return
list
;
}
}
}
}
public
Map
<
String
,
Object
>
getRegionList
()
{
public
Map
<
String
,
Object
>
getRegionList
()
{
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
List
<
LinkedHashMap
>
cityList
=
new
ArrayList
<>();
List
<
LinkedHashMap
>
cityList
=
new
ArrayList
<>();
FeignClientResult
tree
=
privilegeFeginService
.
getTree
();
FeignClientResult
tree
=
privilegeFeginService
.
getTree
();
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
tree
.
getResult
();
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
tree
.
getResult
();
...
@@ -252,7 +252,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -252,7 +252,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
redisUtils
.
set
(
CITY
,
cityMap
);
redisUtils
.
set
(
CITY
,
cityMap
);
if
(!
ObjectUtils
.
isEmpty
(
cityList
))
{
if
(!
ObjectUtils
.
isEmpty
(
cityList
))
{
List
<
LinkedHashMap
>
region
=
(
List
<
LinkedHashMap
>)
privilegeFeginService
.
getTree
().
getResult
();
List
<
LinkedHashMap
>
region
=
(
List
<
LinkedHashMap
>)
privilegeFeginService
.
getTree
().
getResult
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
for
(
LinkedHashMap
linkedHashMap
:
cityList
)
{
for
(
LinkedHashMap
linkedHashMap
:
cityList
)
{
List
<
LinkedHashMap
>
regionList
=
deleteTreeData
(
region
,
linkedHashMap
.
get
(
"regionCode"
).
toString
());
List
<
LinkedHashMap
>
regionList
=
deleteTreeData
(
region
,
linkedHashMap
.
get
(
"regionCode"
).
toString
());
...
@@ -309,31 +309,35 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -309,31 +309,35 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
Map
<
String
,
Object
>
divisionMap
=
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQH
.
getCode
(),
county
);
Map
<
String
,
Object
>
divisionMap
=
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQH
.
getCode
(),
county
);
String
division
=
ObjectUtils
.
isEmpty
(
divisionMap
)
?
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQH
.
getCode
(),
city
).
get
(
"code"
).
toString
()
:
divisionMap
.
get
(
"code"
).
toString
();
String
division
=
ObjectUtils
.
isEmpty
(
divisionMap
)
?
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQH
.
getCode
(),
city
).
get
(
"code"
).
toString
()
:
divisionMap
.
get
(
"code"
).
toString
();
StringBuilder
supervisorCode
=
new
StringBuilder
();
StringBuilder
supervisorCode
=
new
StringBuilder
();
supervisorCode
.
append
(
division
).
append
(
equipCategory
).
append
(
"-"
);
//获取行政区划区县、市是否存在历史监管码
//获取行政区划区县、市是否存在历史监管码
CategoryOtherInfo
supervisor
=
categoryOtherInfoMapper
.
selectSupervisorCode
(
supervisorCode
.
toString
());
CategoryOtherInfo
supervisor
=
categoryOtherInfoMapper
.
selectSupervisorCode
(
supervisorCode
.
toString
());
//查询对应record对应数据
//查询对应record对应数据
CategoryOtherInfo
otherInfo
=
categoryOtherInfoMapper
.
selectOne
(
new
QueryWrapper
<
CategoryOtherInfo
>().
eq
(
"RECORD"
,
record
));
CategoryOtherInfo
otherInfo
=
categoryOtherInfoMapper
.
selectOne
(
new
QueryWrapper
<
CategoryOtherInfo
>().
eq
(
"RECORD"
,
record
));
if
(!
ObjectUtils
.
isEmpty
(
otherInfo
)
&&
ObjectUtils
.
isEmpty
(
otherInfo
.
getSupervisoryCode
()))
{
if
(!
ObjectUtils
.
isEmpty
(
otherInfo
))
{
//生成对应监管码
if
(!
ObjectUtils
.
isEmpty
(
otherInfo
.
getSupervisoryCode
()))
{
if
(!
ObjectUtils
.
isEmpty
(
supervisor
))
{
supervisorCode
=
new
StringBuilder
(
otherInfo
.
getSupervisoryCode
());
if
(
supervisor
.
getSupervisoryCode
()
!=
null
)
{
}
else
{
//获取补零位长度
supervisorCode
.
append
(
division
).
append
(
equipCategory
).
append
(
"-"
);
String
supervisoryCode
=
supervisor
.
getSupervisoryCode
().
substring
(
4
);
//生成对应监管码
long
num
=
Long
.
valueOf
(
supervisoryCode
)
+
1
;
if
(!
ObjectUtils
.
isEmpty
(
supervisor
))
{
int
numLength
=
String
.
valueOf
(
num
).
length
();
if
(
supervisor
.
getSupervisoryCode
()
!=
null
)
{
int
a
=
7
-
numLength
;
//获取补零位长度
StringBuilder
zero
=
new
StringBuilder
();
String
supervisoryCode
=
supervisor
.
getSupervisoryCode
().
substring
(
4
);
for
(
int
i
=
0
;
i
<
a
;
i
++)
{
long
num
=
Long
.
valueOf
(
supervisoryCode
)
+
1
;
zero
.
append
(
EquipmentCategoryEnum
.
BLW
.
getCode
());
int
numLength
=
String
.
valueOf
(
num
).
length
();
int
a
=
7
-
numLength
;
StringBuilder
zero
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
a
;
i
++)
{
zero
.
append
(
EquipmentCategoryEnum
.
BLW
.
getCode
());
}
zero
.
append
(
num
);
supervisorCode
.
append
(
zero
);
}
else
{
supervisorCode
.
append
(
EquipmentCategoryEnum
.
JGM
.
getCode
());
}
}
zero
.
append
(
num
);
supervisorCode
.
append
(
zero
);
}
else
{
}
else
{
supervisorCode
.
append
(
EquipmentCategoryEnum
.
JGM
.
getCode
());
supervisorCode
.
append
(
EquipmentCategoryEnum
.
JGM
.
getCode
());
}
}
}
else
{
supervisorCode
.
append
(
EquipmentCategoryEnum
.
JGM
.
getCode
());
}
}
}
}
...
...
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