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
214fea86
Commit
214fea86
authored
Jan 23, 2024
by
lisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改es同步设备信息
parent
074dd233
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
5 deletions
+26
-5
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+26
-5
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 @
214fea86
...
...
@@ -105,12 +105,33 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
public
void
updateEquipMessage
(
String
currentDocumentId
,
String
useOrgCode
)
{
// 市
List
<
LinkedHashMap
>
city
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
"CITY"
);
// 区
List
<
LinkedHashMap
>
region
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
"REGION"
);
LambdaQueryWrapper
<
JgRegistrationHistory
>
lambdaSelect
=
new
QueryWrapper
<
JgRegistrationHistory
>().
lambda
();
lambdaSelect
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
currentDocumentId
);
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryService
.
getBaseMapper
().
selectOne
(
lambdaSelect
);
JSONObject
map
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
map
.
remove
(
"status"
);
UseInfo
useInfo
=
new
UseInfo
();
BeanUtil
.
copyProperties
(
map
,
useInfo
);
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"city"
))
&&
!
ObjectUtils
.
isEmpty
(
city
))
{
city
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
map
.
get
(
"city"
))))
{
useInfo
.
setCityName
(
String
.
valueOf
(
item
.
get
(
"regionName"
)));
}
});
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"county"
))
&&
!
ObjectUtils
.
isEmpty
(
city
))
{
region
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
map
.
get
(
"county"
))))
{
useInfo
.
setCountyName
(
String
.
valueOf
(
item
.
get
(
"regionName"
)));
}
});
}
useInfo
.
setProvince
(
"610000"
);
useInfo
.
setProvinceName
(
"陕西省"
);
LambdaQueryWrapper
<
UseInfo
>
lambda
=
new
QueryWrapper
<
UseInfo
>().
lambda
();
lambda
.
eq
(
UseInfo:
:
getRecord
,
map
.
get
(
"equipId"
));
// 更新使用信息
...
...
@@ -125,7 +146,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 更新设备使用登记证
idxBizJgRegisterInfoMapper
.
updateUseOrgCodeByEquip
(
String
.
valueOf
(
map
.
get
(
"equipId"
)),
useOrgCode
);
// 更新es
createCode
(
String
.
valueOf
(
map
.
get
(
"equipId"
)),
map
);
createCode
(
String
.
valueOf
(
map
.
get
(
"equipId"
)),
map
,
useInfo
.
getProvinceName
()
+
"/"
+
useInfo
.
getCityName
()
+
"/"
+
useInfo
.
getCountyName
()
);
}
public
void
updateHistory
(
JSONObject
map
,
String
equipId
,
String
currentDocumentId
,
String
supervisoryCode
)
{
...
...
@@ -657,7 +678,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
*
* @param record
*/
public
void
createCode
(
String
record
,
JSONObject
dataMap
)
{
public
void
createCode
(
String
record
,
JSONObject
dataMap
,
String
usePlace
)
{
// 其他信息
LambdaQueryWrapper
<
IdxBizJgOtherInfo
>
lambdaOth
=
new
QueryWrapper
<
IdxBizJgOtherInfo
>().
lambda
();
lambdaOth
.
eq
(
IdxBizJgOtherInfo:
:
getRecord
,
record
);
...
...
@@ -693,9 +714,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
param
.
put
(
"CODE96333"
,
otherInfo
.
getCode96333
());
param
.
put
(
"USE_UNIT_CREDIT_CODE"
,
dataMap
.
get
(
"useUnitCreditCode"
));
param
.
put
(
"USE_UNIT_NAME"
,
dataMap
.
get
(
"useUnitName"
));
param
.
put
(
"
CITY"
,
dataMap
.
get
(
"city
"
));
param
.
put
(
"
COUNTY"
,
dataMap
.
get
(
"county"
)
);
param
.
put
(
"
ADDRESS"
,
"陕西省"
+
dataMap
.
getOrDefault
(
"city"
,
""
)
+
dataMap
.
getOrDefault
(
"county"
,
""
)
+
dataMap
.
getOrDefault
(
"address"
,
""
)
);
param
.
put
(
"
ADDRESS"
,
dataMap
.
getOrDefault
(
"address"
,
"
"
));
param
.
put
(
"
USE_PLACE"
,
usePlace
);
param
.
put
(
"
STATUS"
,
"已认领"
);
objMap
.
put
(
record
,
param
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
objMap
);
}
...
...
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