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
a3b62d9b
Commit
a3b62d9b
authored
Feb 26, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.压力管道改造变更登记开发,作废
parent
cbd39cac
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
16 deletions
+33
-16
JgChangeRegistrationReformServiceImpl.java
...z/service/impl/JgChangeRegistrationReformServiceImpl.java
+33
-16
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/JgChangeRegistrationReformServiceImpl.java
View file @
a3b62d9b
...
@@ -1526,6 +1526,26 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -1526,6 +1526,26 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
pipeline
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
pipeline
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
iIdxBizJgTechParamsPipelineService
.
save
(
pipeline
);
iIdxBizJgTechParamsPipelineService
.
save
(
pipeline
);
}
}
// 检验信息恢复
JSONObject
inspectData
=
jsonObject
.
getJSONObject
(
"inspectData"
);
if
(
inspectData
!=
null
){
// 被更新前的检验信息
JSONArray
oData
=
Optional
.
ofNullable
(
inspectData
.
getJSONArray
(
"oData"
)).
orElse
(
new
JSONArray
());
// 改造登记本次插入的检验信息主键sequenceNbr数组
JSONArray
insertIds
=
Optional
.
ofNullable
(
inspectData
.
getJSONArray
(
"insertIds"
)).
orElse
(
new
JSONArray
());
// 更新的检验信息换成原来的
for
(
int
i
=
0
;
i
<
oData
.
size
();
i
++){
JSONObject
item
=
oData
.
getJSONObject
(
i
);
InspectionDetectionInfo
inspectionDetectionInfo
=
BeanUtil
.
copyProperties
(
item
,
InspectionDetectionInfo
.
class
);
inspectionDetectionInfoMapper
.
deleteById
(
inspectionDetectionInfo
.
getSequenceNbr
());
inspectionDetectionInfoMapper
.
insert
(
inspectionDetectionInfo
);
}
// 新插入的删除
if
(!
insertIds
.
isEmpty
()){
List
<
String
>
ids
=
insertIds
.
toJavaList
(
String
.
class
);
inspectionDetectionInfoMapper
.
deleteBatchIds
(
ids
);
}
}
break
;
break
;
// 起重机械
// 起重机械
case
QZJX:
case
QZJX:
...
@@ -1610,32 +1630,27 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -1610,32 +1630,27 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
// 编辑时会有此数据,所以用来做标识,根据设备record + 检验报告编号判定唯一一条检验流水,有进行更新,无则进行插入
// 编辑时会有此数据,所以用来做标识,根据设备record + 检验报告编号判定唯一一条检验流水,有进行更新,无则进行插入
if
(
inspectionDetectionInfo
.
getInspectReportNo
()
!=
null
&&
inspectionDetectionInfo
.
getInspectReport
()
!=
null
){
if
(
inspectionDetectionInfo
.
getInspectReportNo
()
!=
null
&&
inspectionDetectionInfo
.
getInspectReport
()
!=
null
){
String
record
=
equipment
.
get
(
"record"
).
toString
();
String
record
=
equipment
.
get
(
"record"
).
toString
();
String
jySeq
=
equipment
.
get
(
"jySeq"
)
==
null
?
null
:
equipment
.
get
(
"jySeq"
).
toString
();
inspectionDetectionInfo
.
setInspectConclusion
((
String
)
equipment
.
get
(
"inspectConclusionCode"
));
inspectionDetectionInfo
.
setInspectConclusion
((
String
)
equipment
.
get
(
"inspectConclusionCode"
));
inspectionDetectionInfo
.
setSequenceNbr
(
jySeq
);
saveEquipOfPieLineInspectData
(
record
,
inspectionDetectionInfo
,
registrationReform
);
saveEquipOfPieLineInspectData
(
record
,
inspectionDetectionInfo
,
registrationReform
);
}
}
}
}
private
void
saveEquipOfPieLineInspectData
(
String
record
,
InspectionDetectionInfo
inspectionDetectionInfo
,
JgChangeRegistrationReform
registrationReform
)
{
private
void
saveEquipOfPieLineInspectData
(
String
record
,
InspectionDetectionInfo
inspectionDetectionInfo
,
JgChangeRegistrationReform
registrationReform
)
{
// 1.检验机构 + 设备+ 检验报告编号时 , 是唯一的为了防止老数据有重复的,程序健壮,故使用list进行处理
// 1.检验机构 + 设备+ 检验报告编号时 , 是唯一的为了防止老数据有重复的,程序健壮,故使用list进行处理
LambdaQueryWrapper
<
InspectionDetectionInfo
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
AbstractEquipBaseEntity:
:
getRecord
,
record
)
.
eq
(
InspectionDetectionInfo:
:
getInspectReportNo
,
inspectionDetectionInfo
.
getInspectReportNo
())
.
eq
(
InspectionDetectionInfo:
:
getInspectOrgCode
,
inspectionDetectionInfo
.
getInspectOrgCode
());
List
<
InspectionDetectionInfo
>
inspectionDetectionInfos
=
inspectionDetectionInfoMapper
.
selectList
(
wrapper
);
List
<
InspectionDetectionInfo
>
oInspectionDetectionInfos
=
new
ArrayList
<>(
inspectionDetectionInfos
);
String
insertId
=
null
;
String
insertId
=
null
;
if
(
inspectionDetectionInfos
.
isEmpty
()){
InspectionDetectionInfo
inspectionDetectionInfoOld
=
null
;
if
(
inspectionDetectionInfo
.
getSequenceNbr
()
!=
null
){
// 编辑
inspectionDetectionInfoOld
=
inspectionDetectionInfoMapper
.
selectById
(
inspectionDetectionInfo
.
getSequenceNbr
());
inspectionDetectionInfo
.
setRecDate
(
new
Date
());
inspectionDetectionInfoMapper
.
updateById
(
inspectionDetectionInfo
);
}
else
{
// 新增
insertId
=
sequence
.
nextId
()
+
""
;
insertId
=
sequence
.
nextId
()
+
""
;
inspectionDetectionInfo
.
setRecord
(
record
);
inspectionDetectionInfo
.
setRecord
(
record
);
inspectionDetectionInfo
.
setRecDate
(
new
Date
());
inspectionDetectionInfo
.
setRecDate
(
new
Date
());
inspectionDetectionInfo
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
inspectionDetectionInfo
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
inspectionDetectionInfoMapper
.
insert
(
inspectionDetectionInfo
);
inspectionDetectionInfoMapper
.
insert
(
inspectionDetectionInfo
);
}
else
{
for
(
InspectionDetectionInfo
inspectionDetectionInfo1
:
inspectionDetectionInfos
)
{
Bean
.
copyExistPropertis
(
inspectionDetectionInfo
,
inspectionDetectionInfo1
);
inspectionDetectionInfo1
.
setRecDate
(
new
Date
());
inspectionDetectionInfoMapper
.
updateById
(
inspectionDetectionInfo1
);
}
}
}
// 2.记录原始检验流水用来作废时恢复数据
// 2.记录原始检验流水用来作废时恢复数据
JSONObject
oldData
=
commonServiceImpl
.
queryHisOldData
(
registrationReform
.
getApplyNo
());
JSONObject
oldData
=
commonServiceImpl
.
queryHisOldData
(
registrationReform
.
getApplyNo
());
...
@@ -1643,7 +1658,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -1643,7 +1658,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
// 插入的检验数据ids
// 插入的检验数据ids
this
.
setInsertIds
(
inspectData
,
insertId
);
this
.
setInsertIds
(
inspectData
,
insertId
);
// 被更新的原行数据
// 被更新的原行数据
this
.
setOData
(
inspectData
,
oInspectionDetectionInfos
);
this
.
setOData
(
inspectData
,
inspectionDetectionInfoOld
);
oldData
.
put
(
"inspectData"
,
inspectData
);
oldData
.
put
(
"inspectData"
,
inspectData
);
LambdaUpdateWrapper
<
JgRegistrationHistory
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
JgRegistrationHistory
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
registrationReform
.
getApplyNo
());
updateWrapper
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
registrationReform
.
getApplyNo
());
...
@@ -1651,13 +1666,15 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -1651,13 +1666,15 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
jgRegistrationHistoryServiceImpl
.
update
(
updateWrapper
);
jgRegistrationHistoryServiceImpl
.
update
(
updateWrapper
);
}
}
private
void
setOData
(
JSONObject
inspectData
,
List
<
InspectionDetectionInfo
>
oInspectionDetectionInfos
)
{
private
void
setOData
(
JSONObject
inspectData
,
InspectionDetectionInfo
oInspectionDetectionInfo
)
{
JSONArray
oData
=
inspectData
.
getJSONArray
(
"oData"
);
JSONArray
oData
=
inspectData
.
getJSONArray
(
"oData"
);
if
(
oData
==
null
){
if
(
oData
==
null
){
oData
=
new
JSONArray
();
oData
=
new
JSONArray
();
inspectData
.
put
(
"oData"
,
oData
);
inspectData
.
put
(
"oData"
,
oData
);
}
}
oData
.
addAll
(
oInspectionDetectionInfos
);
if
(
oInspectionDetectionInfo
!=
null
){
oData
.
add
(
oInspectionDetectionInfo
);
}
}
}
private
void
setInsertIds
(
JSONObject
inspectData
,
String
insertId
)
{
private
void
setInsertIds
(
JSONObject
inspectData
,
String
insertId
)
{
...
...
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