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
1687d10b
Commit
1687d10b
authored
Dec 18, 2024
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):使用登记添加省市区信息覆盖和属地部门字段
parent
7baa7148
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
1 deletion
+32
-1
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+32
-1
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
View file @
1687d10b
...
@@ -117,7 +117,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -117,7 +117,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
private
static
final
String
DEFINITION_KEY
=
"useRegistration"
;
private
static
final
String
DEFINITION_KEY
=
"useRegistration"
;
private
final
List
<
String
>
NOT_FLOWING_STATE
=
Arrays
.
asList
(
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位已撤回"
,
"已作废"
);
private
final
List
<
String
>
NOT_FLOWING_STATE
=
Arrays
.
asList
(
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位已撤回"
,
"已作废"
);
private
static
final
String
CITY
=
"CITY"
;
private
static
final
String
COUNTY
=
"COUNTY"
;
private
static
final
String
REGION
=
"REGION"
;
private
static
final
String
STREET
=
"STREET"
;
private
ApplicationContext
applicationContext
;
private
ApplicationContext
applicationContext
;
@Autowired
@Autowired
RedisUtils
redisUtils
;
RedisUtils
redisUtils
;
...
@@ -1080,10 +1083,38 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1080,10 +1083,38 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jgUseRegistration
.
setProjectContraption
(
jgProjectContraption
.
getProjectContraption
());
jgUseRegistration
.
setProjectContraption
(
jgProjectContraption
.
getProjectContraption
());
jgProjectContraption
.
setUseRegistrationCode
(
jgUseRegistration
.
getUseRegistrationCode
());
jgProjectContraption
.
setUseRegistrationCode
(
jgUseRegistration
.
getUseRegistrationCode
());
jgProjectContraption
.
setUseDate
(
String
.
valueOf
(
mapData
.
get
(
"useDate"
)));
jgProjectContraption
.
setUseDate
(
String
.
valueOf
(
mapData
.
get
(
"useDate"
)));
jgProjectContraption
.
setCity
(
String
.
valueOf
(
mapData
.
get
(
"city"
)));
jgProjectContraption
.
setCounty
(
String
.
valueOf
(
mapData
.
get
(
"county"
)));
jgProjectContraption
.
setStreet
(
String
.
valueOf
(
mapData
.
get
(
"factoryUseSiteStreet"
)));
jgProjectContraption
.
setAddress
(
String
.
valueOf
(
mapData
.
get
(
"address"
)));
jgProjectContraption
.
setCityName
(
getRegionName
(
CITY
,
CITY
.
toLowerCase
(),
mapData
));
jgProjectContraption
.
setCountyName
(
getRegionName
(
REGION
,
COUNTY
.
toLowerCase
(),
mapData
));
jgProjectContraption
.
setStreetName
(
getRegionName
(
STREET
,
"factoryUseSiteStreet"
,
mapData
));
if
(!
StringUtils
.
isEmpty
(
mapData
.
get
(
"orgBranchCode"
)))
{
jgProjectContraption
.
setOrgName
(
String
.
valueOf
(
mapData
.
getString
(
"orgBranchCode"
)).
split
(
"_"
)[
1
]);
jgProjectContraption
.
setOrgCode
(
String
.
valueOf
(
mapData
.
getString
(
"orgBranchCode"
)).
split
(
"_"
)[
0
]);
}
jgProjectContraptionService
.
updateById
(
jgProjectContraption
);
jgProjectContraptionService
.
updateById
(
jgProjectContraption
);
}
}
}
}
/**
* 根据code获取市区县名字
* @param key key
* @param codeKey codeKey
* @param mapData 表单信息
* @return name
*/
private
String
getRegionName
(
String
key
,
String
codeKey
,
JSONObject
mapData
)
{
return
Optional
.
ofNullable
((
List
<
LinkedHashMap
>)
redisUtils
.
get
(
key
))
.
flatMap
(
list
->
list
.
stream
()
.
filter
(
item
->
String
.
valueOf
(
item
.
get
(
"regionCode"
))
.
equals
(
String
.
valueOf
(
mapData
.
get
(
codeKey
))))
.
map
(
item
->
(
String
)
item
.
get
(
"regionName"
))
.
findFirst
())
.
orElse
(
""
);
}
private
String
getInspectConclusionName
(
JSONObject
mapData
)
{
private
String
getInspectConclusionName
(
JSONObject
mapData
)
{
if
(
!
ObjectUtils
.
isEmpty
(
mapData
.
get
(
"inspectConclusion"
)))
{
if
(
!
ObjectUtils
.
isEmpty
(
mapData
.
get
(
"inspectConclusion"
)))
{
String
code
=
mapData
.
get
(
"inspectConclusion"
).
toString
();
String
code
=
mapData
.
get
(
"inspectConclusion"
).
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