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
3f555ab7
Commit
3f555ab7
authored
Jan 20, 2026
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg): 修复设备状态判断和装置变更逻辑
- 添加无报废管道设备时的装置变更处理逻辑 - 实现新证号生成时的装置和管道信息更新
parent
244ea76a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
4 deletions
+30
-4
JgChangeRegistrationUnitServiceImpl.java
...biz/service/impl/JgChangeRegistrationUnitServiceImpl.java
+30
-4
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/JgChangeRegistrationUnitServiceImpl.java
View file @
3f555ab7
...
...
@@ -2540,14 +2540,14 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
List
<
Long
>
projectSeqs
=
projectsUnderSameUseOrgCodeNotInThisApply
.
stream
().
map
(
IdxBizJgProjectContraption:
:
getSequenceNbr
).
collect
(
Collectors
.
toList
());
Integer
usedEquipCount
=
idxBizJgUseInfoService
.
lambdaQuery
()
.
in
(
IdxBizJgUseInfo:
:
getProjectContraptionId
,
projectSeqs
)
.
notIn
(
IdxBizJgUseInfo:
:
getEquState
,
EquipmentEnum
.
BAOFEI
.
getCode
().
toString
(),
EquipmentEnum
.
BAOFEI
.
getCode
().
toString
())
.
notIn
(
IdxBizJgUseInfo:
:
getEquState
,
EquipmentEnum
.
BAOFEI
.
getCode
().
toString
(),
EquipmentEnum
.
ZHUXIAO
.
getCode
().
toString
())
.
select
(
IdxBizJgUseInfo:
:
getRecord
)
.
count
();
if
(
usedEquipCount
==
0
)
{
// 所有装置下没有在用的管道,则更新原使用登记证状态为已注销
useRegistrationManageService
.
lambdaUpdate
()
.
eq
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
useRegistrationCode
)
.
set
(
JgUseRegistrationManage:
:
getCertificateStatus
,
CertificateStatusEnum
.
YIZHUXIAO
.
get
Cod
e
())
.
set
(
JgUseRegistrationManage:
:
getCertificateStatus
,
CertificateStatusEnum
.
YIZHUXIAO
.
get
Nam
e
())
.
update
();
}
}
...
...
@@ -2650,13 +2650,39 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
idxBizJgOtherInfoService
.
updateBatchById
(
batch
);
}
// 重新计算新老装置长度
pipelineDataChangeService
.
updatePipelineLength
(
String
.
valueOf
(
oldProjectContraption
.
getSequenceNbr
()));
// 重新计算新装置长度
pipelineDataChangeService
.
updatePipelineLength
(
String
.
valueOf
(
newProjectContraption
.
getSequenceNbr
()));
targetProjectContraption
=
newProjectContraption
;
// 新装置ID加人到待生成履历装置ID
projectContraptionIds
.
add
(
String
.
valueOf
(
newProjectContraption
.
getSequenceNbr
()));
}
else
{
// 没有报废的管道设备,直接将装置变更到新单位;
// 如果是新生成证号,则更新装置和管道对应证号信息
if
(
isNewCode
)
{
targetProjectContraption
.
setUseRegistrationCode
(
useRegistrationCode
);
projectContraptionService
.
updateById
(
targetProjectContraption
);
List
<
List
<
IdxBizJgRegisterInfo
>>
registerInfoBatches
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
registerInfos
.
size
();
i
+=
ONE_BATCH_SIZE
)
{
registerInfoBatches
.
add
(
registerInfos
.
subList
(
i
,
Math
.
min
(
i
+
ONE_BATCH_SIZE
,
registerInfos
.
size
())));
}
for
(
List
<
IdxBizJgRegisterInfo
>
batch
:
registerInfoBatches
)
{
batch
.
forEach
(
registerInfo
->
registerInfo
.
setUseOrgCode
(
useRegistrationCode
));
idxBizJgRegisterInfoService
.
updateBatchById
(
batch
);
}
List
<
List
<
IdxBizJgUseInfo
>>
useInfoBatches
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
useInfosForNotScrap
.
size
();
i
+=
ONE_BATCH_SIZE
)
{
useInfoBatches
.
add
(
useInfosForNotScrap
.
subList
(
i
,
Math
.
min
(
i
+
ONE_BATCH_SIZE
,
useInfosForNotScrap
.
size
())));
}
for
(
List
<
IdxBizJgUseInfo
>
batch
:
useInfoBatches
)
{
batch
.
forEach
(
useInfo
->
{
useInfo
.
setEquState
(
String
.
valueOf
(
EquipmentEnum
.
ZAIYONG
.
getCode
()));
});
idxBizJgUseInfoService
.
updateBatchById
(
batch
);
}
}
}
this
.
updateProjectContraptionAndRegistrationManage
(
registrationUnit
,
targetProjectContraption
,
useRegistrationCode
,
targetEqIdList
,
isNewCode
);
this
.
updateUseInfoAndEs
(
targetEqIdList
,
registrationUnit
,
isNewCode
,
isNewCode
?
useRegistrationCode
:
null
);
...
...
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