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
af793dfb
Commit
af793dfb
authored
Jan 06, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.管道刷历史数据,装置的检验信息兼容最早版本的数据(单节管道维护)
parent
d736948b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
4 deletions
+31
-4
JgInstallationNoticeEqMapper.xml
...rc/main/resources/mapper/JgInstallationNoticeEqMapper.xml
+2
-1
DataHandlerServiceImpl.java
...ot/module/jg/biz/service/impl/DataHandlerServiceImpl.java
+29
-3
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgInstallationNoticeEqMapper.xml
View file @
af793dfb
...
...
@@ -4,7 +4,8 @@
<select
id=
"selectErrorRecordOfInIntoManage"
resultType=
"com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNoticeEq"
>
SELECT
ne.equ_id
ne.equ_id,
ne.inform_number
FROM
"tzs_jg_installation_notice" n,
tzs_jg_installation_notice_eq ne,
...
...
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 @
af793dfb
...
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper
;
...
...
@@ -17,6 +18,7 @@ import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
import
com.yeejoin.amos.boot.module.jg.api.enums.PipelineEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeEqMapper
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgInspectionDetectionInfoService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper
;
...
...
@@ -25,6 +27,7 @@ import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgProjectInspectionMapp
import
com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseEnterpriseInfoMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
...
...
@@ -111,6 +114,9 @@ public class DataHandlerServiceImpl {
@Resource
IdxBizJgProjectInspectionMapper
projectInspectionMapper
;
@Resource
IIdxBizJgInspectionDetectionInfoService
iIdxBizJgInspectionDetectionInfoService
;
/**
* 安装告知压力管道历史数据修复-详情中的设备列表修改为汇总表格式
...
...
@@ -642,7 +648,7 @@ public class DataHandlerServiceImpl {
idxBizJgProjectContraption
.
setRecDate
(
new
Date
());
idxBizJgProjectContraption
.
setIsDelete
(
Boolean
.
FALSE
);
// 安装告知完成后,创建装置的施工信息表
saveProjectConstructionAfterFinish
(
installationNotice
,
isFinish
,
e
qs
,
sequenceNbr
,
records
);
saveProjectConstructionAfterFinish
(
installationNotice
,
isFinish
,
noticeE
qs
,
sequenceNbr
,
records
);
// 安装告知表写入装置id
updateProjectContraptionId2Notice
(
installationNotice
,
idxBizJgProjectContraption
);
projectContraptionList
.
add
(
idxBizJgProjectContraption
);
...
...
@@ -666,7 +672,7 @@ public class DataHandlerServiceImpl {
private
void
updateProjectContraptionId2Notice
(
JgInstallationNotice
installationNotice
,
IdxBizJgProjectContraption
idxBizJgProjectContraption
)
{
LambdaUpdateWrapper
<
JgInstallationNotice
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
set
(
JgInstallationNotice:
:
getProjectContraptionId
,
installationNotice
.
getProjectContraptionId
());
updateWrapper
.
eq
(
BaseEntity:
:
getSequenceNbr
,
i
dxBizJgProjectContraption
.
getSequenceNbr
());
updateWrapper
.
eq
(
BaseEntity:
:
getSequenceNbr
,
i
nstallationNotice
.
getSequenceNbr
());
installationNoticeService
.
update
(
null
,
updateWrapper
);
}
...
...
@@ -773,8 +779,28 @@ public class DataHandlerServiceImpl {
JSONObject
mapData
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
IdxBizJgProjectInspection
inspectionDetectionInfo
=
new
IdxBizJgProjectInspection
();
BeanUtil
.
copyProperties
(
mapData
,
inspectionDetectionInfo
);
// 兼容最早的老数据,管道的检验信息单独维护
if
(
inspectionDetectionInfo
.
getInspectConclusion
()
==
null
&&
mapData
.
containsKey
(
"equipmentLists"
)){
List
<
Map
<
String
,
Object
>>
equipmentLists
=
null
;
try
{
equipmentLists
=
objectMapper
.
readValue
(
objectMapper
.
writeValueAsString
(
mapData
.
get
(
"equipmentLists"
)),
new
TypeReference
<
ArrayList
<
Map
<
String
,
Object
>>>()
{
}
);
if
(!
equipmentLists
.
isEmpty
()){
Object
record
=
equipmentLists
.
get
(
0
).
get
(
"record"
);
IdxBizJgInspectionDetectionInfo
idxBizJgInspectionDetectionInfo
=
iIdxBizJgInspectionDetectionInfoService
.
queryNewestDetailByRecord
(
String
.
valueOf
(
record
));
BeanUtil
.
copyProperties
(
idxBizJgInspectionDetectionInfo
,
inspectionDetectionInfo
);
inspectionDetectionInfo
.
setRecord
(
null
);
}
}
catch
(
JsonProcessingException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
inspectionDetectionInfo
.
setProjectContraptionId
(
useRegistration
.
getProjectContraptionId
());
inspectionDetectionInfo
.
setRecDate
(
new
Date
());
// 使用登记创建新增的检验信息id设置为使用登记的主键id,在作废时级联作废
inspectionDetectionInfo
.
setSequenceNbr
(
useRegistration
.
getSequenceNbr
()
+
""
);
projectInspectionMapper
.
insert
(
inspectionDetectionInfo
);
...
...
@@ -793,6 +819,6 @@ public class DataHandlerServiceImpl {
.
ne
(
JgUseRegistration:
:
getStatus
,
FlowStatusEnum
.
TO_BE_DISCARD
.
getName
())
.
ne
(
JgUseRegistration:
:
getProjectContraption
,
""
)
.
isNull
(
JgUseRegistration:
:
getProjectContraptionId
)
.
select
(
BaseEntity:
:
getSequenceNbr
,
JgUseRegistration:
:
getProjectContraption
,
JgUseRegistration:
:
getUseRegistrationCode
,
JgUseRegistration:
:
getStatus
));
.
select
(
BaseEntity:
:
getSequenceNbr
,
JgUseRegistration:
:
getProjectContraption
,
JgUseRegistration:
:
getUseRegistrationCode
,
JgUseRegistration:
:
getStatus
,
JgUseRegistration:
:
getAuditPassDate
));
}
}
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