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
eaa64c14
Commit
eaa64c14
authored
Jan 06, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.管道刷历史数据,生产环境异常数据适配
parent
a4d2a5b3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
40 deletions
+48
-40
DataHandlerServiceImpl.java
...ot/module/jg/biz/service/impl/DataHandlerServiceImpl.java
+48
-40
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/DataHandlerServiceImpl.java
View file @
eaa64c14
...
@@ -576,6 +576,9 @@ public class DataHandlerServiceImpl {
...
@@ -576,6 +576,9 @@ public class DataHandlerServiceImpl {
Map
<
Long
,
List
<
String
>>
projectContraptionIdRecordsMap
=
new
HashMap
<>();
Map
<
Long
,
List
<
String
>>
projectContraptionIdRecordsMap
=
new
HashMap
<>();
for
(
JgInstallationNotice
installationNotice
:
noticeList
){
for
(
JgInstallationNotice
installationNotice
:
noticeList
){
List
<
JgInstallationNoticeEq
>
noticeEqs
=
installationNoticeEqService
.
list
(
new
LambdaQueryWrapper
<
JgInstallationNoticeEq
>().
eq
(
JgInstallationNoticeEq:
:
getEquipTransferId
,
installationNotice
.
getSequenceNbr
()).
select
(
JgInstallationNoticeEq:
:
getEquId
,
JgInstallationNoticeEq:
:
getInformNumber
));
List
<
JgInstallationNoticeEq
>
noticeEqs
=
installationNoticeEqService
.
list
(
new
LambdaQueryWrapper
<
JgInstallationNoticeEq
>().
eq
(
JgInstallationNoticeEq:
:
getEquipTransferId
,
installationNotice
.
getSequenceNbr
()).
select
(
JgInstallationNoticeEq:
:
getEquId
,
JgInstallationNoticeEq:
:
getInformNumber
));
if
(
noticeEqs
.
isEmpty
()){
continue
;
}
List
<
String
>
records
=
noticeEqs
.
stream
().
map
(
JgInstallationNoticeEq:
:
getEquId
).
collect
(
Collectors
.
toList
());
List
<
String
>
records
=
noticeEqs
.
stream
().
map
(
JgInstallationNoticeEq:
:
getEquId
).
collect
(
Collectors
.
toList
());
List
<
IdxBizJgUseInfo
>
useInfos
=
useInfoService
.
lambdaQuery
()
List
<
IdxBizJgUseInfo
>
useInfos
=
useInfoService
.
lambdaQuery
()
.
in
(
IdxBizJgUseInfo:
:
getRecord
,
records
)
.
in
(
IdxBizJgUseInfo:
:
getRecord
,
records
)
...
@@ -756,54 +759,59 @@ public class DataHandlerServiceImpl {
...
@@ -756,54 +759,59 @@ public class DataHandlerServiceImpl {
private
void
updateProjectContraptionAfter
(
JgUseRegistration
useRegistration
,
JgInstallationNotice
installationNotice
)
{
private
void
updateProjectContraptionAfter
(
JgUseRegistration
useRegistration
,
JgInstallationNotice
installationNotice
)
{
// 特殊处理 将任意一个的 record 放入到remark字段
// 特殊处理 将任意一个的 record 放入到remark字段
IdxBizJgUseInfo
useInfo
=
getIdxBizJgUseInfo
(
installationNotice
.
getRemark
());
IdxBizJgUseInfo
useInfo
=
getIdxBizJgUseInfo
(
installationNotice
.
getRemark
());
LambdaUpdateWrapper
<
IdxBizJgProjectContraption
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
if
(
useInfo
!=
null
){
updateWrapper
.
eq
(
BaseEntity:
:
getSequenceNbr
,
installationNotice
.
getProjectContraptionId
());
LambdaUpdateWrapper
<
IdxBizJgProjectContraption
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getUscUnitCreditCode
,
null
);
updateWrapper
.
eq
(
BaseEntity:
:
getSequenceNbr
,
installationNotice
.
getProjectContraptionId
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getUscUnitName
,
null
);
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getUscUnitCreditCode
,
null
);
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getUseRegistrationCode
,
useRegistration
.
getUseRegistrationCode
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getUscUnitName
,
null
);
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getProvince
,
useInfo
.
getProvince
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getUseRegistrationCode
,
useRegistration
.
getUseRegistrationCode
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getProvinceName
,
useInfo
.
getProvinceName
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getProvince
,
useInfo
.
getProvince
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getCity
,
useInfo
.
getCity
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getProvinceName
,
useInfo
.
getProvinceName
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getCityName
,
useInfo
.
getCityName
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getCity
,
useInfo
.
getCity
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getCounty
,
useInfo
.
getCounty
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getCityName
,
useInfo
.
getCityName
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getCountyName
,
useInfo
.
getCountyName
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getCounty
,
useInfo
.
getCounty
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getStreet
,
useInfo
.
getFactoryUseSiteStreet
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getCountyName
,
useInfo
.
getCountyName
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getStreetName
,
useInfo
.
getStreetName
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getStreet
,
useInfo
.
getFactoryUseSiteStreet
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getAddress
,
useInfo
.
getAddress
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getStreetName
,
useInfo
.
getStreetName
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getUseDate
,
useRegistration
.
getAuditPassDate
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getAddress
,
useInfo
.
getAddress
());
projectContraptionService
.
update
(
null
,
updateWrapper
);
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getUseDate
,
useRegistration
.
getAuditPassDate
());
projectContraptionService
.
update
(
null
,
updateWrapper
);
}
}
}
private
void
createProjectInspectInfoAfter
(
JgUseRegistration
useRegistration
)
{
private
void
createProjectInspectInfoAfter
(
JgUseRegistration
useRegistration
)
{
JgRegistrationHistory
jgRegistrationHistory
=
getRegistrationHistory
(
useRegistration
.
getSequenceNbr
()
+
""
);
JgRegistrationHistory
jgRegistrationHistory
=
getRegistrationHistory
(
useRegistration
.
getSequenceNbr
()
+
""
);
JSONObject
mapData
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
if
(
jgRegistrationHistory
!=
null
){
IdxBizJgProjectInspection
inspectionDetectionInfo
=
new
IdxBizJgProjectInspection
();
JSONObject
mapData
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
BeanUtil
.
copyProperties
(
mapData
,
inspectionDetectionInfo
);
IdxBizJgProjectInspection
inspectionDetectionInfo
=
new
IdxBizJgProjectInspection
();
// 兼容最早的老数据,管道的检验信息单独维护
BeanUtil
.
copyProperties
(
mapData
,
inspectionDetectionInfo
);
if
(
inspectionDetectionInfo
.
getInspectConclusion
()
==
null
&&
mapData
.
containsKey
(
"equipmentLists"
)){
// 兼容最早的老数据,管道的检验信息单独维护
List
<
Map
<
String
,
Object
>>
equipmentLists
=
null
;
if
(
inspectionDetectionInfo
.
getInspectConclusion
()
==
null
&&
mapData
.
containsKey
(
"equipmentLists"
)){
try
{
List
<
Map
<
String
,
Object
>>
equipmentLists
=
null
;
equipmentLists
=
objectMapper
.
readValue
(
try
{
objectMapper
.
writeValueAsString
(
mapData
.
get
(
"equipmentLists"
)),
equipmentLists
=
objectMapper
.
readValue
(
new
TypeReference
<
ArrayList
<
Map
<
String
,
Object
>>>()
{
objectMapper
.
writeValueAsString
(
mapData
.
get
(
"equipmentLists"
)),
}
new
TypeReference
<
ArrayList
<
Map
<
String
,
Object
>>>()
{
);
}
if
(!
equipmentLists
.
isEmpty
()){
);
Object
record
=
equipmentLists
.
get
(
0
).
get
(
"record"
);
if
(!
equipmentLists
.
isEmpty
()){
IdxBizJgInspectionDetectionInfo
idxBizJgInspectionDetectionInfo
=
iIdxBizJgInspectionDetectionInfoService
.
queryNewestDetailByRecord
(
String
.
valueOf
(
record
));
Object
record
=
equipmentLists
.
get
(
0
).
get
(
"record"
);
BeanUtil
.
copyProperties
(
idxBizJgInspectionDetectionInfo
,
inspectionDetectionInfo
);
IdxBizJgInspectionDetectionInfo
idxBizJgInspectionDetectionInfo
=
iIdxBizJgInspectionDetectionInfoService
.
queryNewestDetailByRecord
(
String
.
valueOf
(
record
));
inspectionDetectionInfo
.
setRecord
(
null
);
BeanUtil
.
copyProperties
(
idxBizJgInspectionDetectionInfo
,
inspectionDetectionInfo
);
inspectionDetectionInfo
.
setRecord
(
null
);
}
}
catch
(
JsonProcessingException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
}
catch
(
JsonProcessingException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
inspectionDetectionInfo
.
setProjectContraptionId
(
useRegistration
.
getProjectContraptionId
());
inspectionDetectionInfo
.
setRecDate
(
new
Date
());
// 使用登记创建新增的检验信息id设置为使用登记的主键id,在作废时级联作废
inspectionDetectionInfo
.
setSequenceNbr
(
useRegistration
.
getSequenceNbr
()
+
""
);
projectInspectionMapper
.
insert
(
inspectionDetectionInfo
);
}
}
inspectionDetectionInfo
.
setProjectContraptionId
(
useRegistration
.
getProjectContraptionId
());
inspectionDetectionInfo
.
setRecDate
(
new
Date
());
// 使用登记创建新增的检验信息id设置为使用登记的主键id,在作废时级联作废
inspectionDetectionInfo
.
setSequenceNbr
(
useRegistration
.
getSequenceNbr
()
+
""
);
projectInspectionMapper
.
insert
(
inspectionDetectionInfo
);
}
}
private
IdxBizJgUseInfo
getIdxBizJgUseInfo
(
String
record
)
{
private
IdxBizJgUseInfo
getIdxBizJgUseInfo
(
String
record
)
{
...
...
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