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
0e9c6c4d
Commit
0e9c6c4d
authored
Jun 09, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(大编辑):管道增减功能开发
1.改造变更登记作废、使用登记作废调整
parent
f7492288
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
45 deletions
+52
-45
JgChangeRegistrationReformServiceImpl.java
...z/service/impl/JgChangeRegistrationReformServiceImpl.java
+52
-45
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 @
0e9c6c4d
...
@@ -1606,52 +1606,59 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -1606,52 +1606,59 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
// 压力管道
// 压力管道
case
YLGD:
case
YLGD:
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
oldTechInfo
);
// 编辑过则按照编辑的数据进行恢复管道信息
JSONArray
piePines
=
jsonObject
.
getJSONArray
(
"equipmentLists"
);
Boolean
isRollBack
=
backupManager
.
restore
(
jgChangeRegistrationReform
.
getSequenceNbr
()
+
""
);
// 装置和设备es中的安改维单位信息恢复
if
(
isRollBack
){
// 进行过编辑逻辑
String
uscUnitCreditCode
=
jsonObject
.
getString
(
USC_UNIT_CREDIT_CODE
);
// 1.原装置、新装置重新计算管道长度
String
uscUnitName
=
jsonObject
.
getString
(
USC_UNIT_NAME
);
this
.
updateTotalPieLineLength
(
jgChangeRegistrationReform
.
getProjectContraptionId
());
jgProjectContraptionService
.
lambdaUpdate
()
}
else
{
//未编辑过,走原有逻辑
.
eq
(
IdxBizJgProjectContraption:
:
getSequenceNbr
,
jgChangeRegistrationReform
.
getProjectContraptionId
())
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
oldTechInfo
);
.
set
(
IdxBizJgProjectContraption:
:
getUscUnitCreditCode
,
uscUnitCreditCode
)
JSONArray
piePines
=
jsonObject
.
getJSONArray
(
"equipmentLists"
);
.
set
(
IdxBizJgProjectContraption:
:
getUscUnitName
,
uscUnitName
)
// 装置和设备es中的安改维单位信息恢复
.
update
();
String
uscUnitCreditCode
=
jsonObject
.
getString
(
USC_UNIT_CREDIT_CODE
);
for
(
int
i
=
0
;
i
<
piePines
.
size
();
i
++){
String
uscUnitName
=
jsonObject
.
getString
(
USC_UNIT_NAME
);
JSONObject
item
=
piePines
.
getJSONObject
(
i
);
jgProjectContraptionService
.
lambdaUpdate
()
String
rcd
=
item
.
getString
(
"record"
);
.
eq
(
IdxBizJgProjectContraption:
:
getSequenceNbr
,
jgChangeRegistrationReform
.
getProjectContraptionId
())
// 删除
.
set
(
IdxBizJgProjectContraption:
:
getUscUnitCreditCode
,
uscUnitCreditCode
)
iIdxBizJgTechParamsPipelineService
.
remove
(
new
LambdaQueryWrapper
<
IdxBizJgTechParamsPipeline
>().
eq
(
IdxBizJgTechParamsPipeline:
:
getRecord
,
rcd
));
.
set
(
IdxBizJgProjectContraption:
:
getUscUnitName
,
uscUnitName
)
// 插入
.
update
();
IdxBizJgTechParamsPipeline
pipeline
=
BeanUtil
.
copyProperties
(
item
,
IdxBizJgTechParamsPipeline
.
class
);
for
(
int
i
=
0
;
i
<
piePines
.
size
();
i
++){
pipeline
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
JSONObject
item
=
piePines
.
getJSONObject
(
i
);
iIdxBizJgTechParamsPipelineService
.
save
(
pipeline
);
String
rcd
=
item
.
getString
(
"record"
);
// es
// 删除
Map
<
String
,
Map
<
String
,
Object
>>
resultMap
=
MapBuilder
.<
String
,
Map
<
String
,
Object
>>
create
()
iIdxBizJgTechParamsPipelineService
.
remove
(
new
LambdaQueryWrapper
<
IdxBizJgTechParamsPipeline
>().
eq
(
IdxBizJgTechParamsPipeline:
:
getRecord
,
rcd
));
.
put
(
rcd
,
MapBuilder
.<
String
,
Object
>
create
()
// 插入
.
put
(
USC_UNIT_NAME
,
uscUnitName
)
IdxBizJgTechParamsPipeline
pipeline
=
BeanUtil
.
copyProperties
(
item
,
IdxBizJgTechParamsPipeline
.
class
);
.
put
(
USC_UNIT_CREDIT_CODE
,
uscUnitCreditCode
)
pipeline
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
.
build
())
iIdxBizJgTechParamsPipelineService
.
save
(
pipeline
);
.
build
();
// es
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
resultMap
);
Map
<
String
,
Map
<
String
,
Object
>>
resultMap
=
MapBuilder
.<
String
,
Map
<
String
,
Object
>>
create
()
}
.
put
(
rcd
,
MapBuilder
.<
String
,
Object
>
create
()
// 检验信息恢复
.
put
(
USC_UNIT_NAME
,
uscUnitName
)
JSONObject
inspectData
=
jsonObject
.
getJSONObject
(
"inspectData"
);
.
put
(
USC_UNIT_CREDIT_CODE
,
uscUnitCreditCode
)
if
(
inspectData
!=
null
){
.
build
())
// 被更新前的检验信息
.
build
();
JSONArray
oData
=
Optional
.
ofNullable
(
inspectData
.
getJSONArray
(
"oData"
)).
orElse
(
new
JSONArray
());
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
resultMap
);
// 改造登记本次插入的检验信息主键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
()){
JSONObject
inspectData
=
jsonObject
.
getJSONObject
(
"inspectData"
);
List
<
String
>
ids
=
insertIds
.
toJavaList
(
String
.
class
);
if
(
inspectData
!=
null
){
inspectionDetectionInfoMapper
.
deleteBatchIds
(
ids
);
// 被更新前的检验信息
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
;
...
...
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