Commit 80a427f5 authored by Lambertliu's avatar Lambertliu

fix(jg):更名变更流程中bug修改

parent 69f2a90e
......@@ -316,11 +316,15 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
*/
private void delRepeatUseEquipData(JgChangeRegistrationName notice) {
if (NOT_FLOWING_STATE.contains(notice.getAuditStatus())) {
LambdaQueryWrapper<JgChangeRegistrationNameEq> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(JgChangeRegistrationNameEq::getNameChangeRegistrationId, notice.getSequenceNbr());
List<JgChangeRegistrationNameEq> noticeEqList = jgChangeRegistrationNameEqMapper.selectList(queryWrapper);
noticeEqList.forEach(noticeEq -> EquipUsedCheckStrategyContext.getUsedStrategy(CHANGE_NAME_KEY)
.delDataForCheckEquipRepeatUsed(Collections.singletonList(noticeEq.getCertificateSeq()), notice.getUseUnitCreditCode())
final String creditCode = notice.getUseUnitCreditCode().contains("_")
? notice.getUseUnitCreditCode().substring(notice.getUseUnitCreditCode().indexOf("_") + 1)
: notice.getUseUnitCreditCode();
jgChangeRegistrationNameEqMapper.selectList(
new LambdaQueryWrapper<JgChangeRegistrationNameEq>()
.eq(JgChangeRegistrationNameEq::getNameChangeRegistrationId, notice.getSequenceNbr())
).forEach(noticeEq ->
EquipUsedCheckStrategyContext.getUsedStrategy(CHANGE_NAME_KEY)
.delDataForCheckEquipRepeatUsed(Collections.singletonList(noticeEq.getCertificateSeq()), creditCode)
);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment