调整批调去重逻辑

This commit is contained in:
黎润豪 2026-04-21 15:55:59 +08:00
parent c4b22272f4
commit 9cfa118df1
1 changed files with 5 additions and 11 deletions

View File

@ -169,11 +169,10 @@ public class PenaltySecurityController {
}
// 保存吊销主体清单到PENALTY_ENT_INFO表
if (StringUtils.isNotBlank(penaltyCaseInfo.getCaseid())) {
penaltyCaseInfoService.lambdaUpdate().eq(PenaltyCaseInfo::getCaseid, penaltyCaseInfo.getCaseid()).remove();
}
for (PenaltyCaseInfoEntInfoDto entInfoDto : requestDto.getPenaltylist()) {
PenaltyEntInfo one = penaltyEntInfoService.lambdaQuery().eq(PenaltyEntInfo::getCaseid, requestDto.getCaseid())
.eq(PenaltyEntInfo::getPripid, entInfoDto.getPripid()).ne(PenaltyEntInfo::getFlgDeleted, CommonConstants.TRUE_1)
.last("limit 1").one();
PenaltyEntInfo penaltyEntInfo = new PenaltyEntInfo();
penaltyEntInfo.setCaseid(requestDto.getCaseid());
penaltyEntInfo.setPripid(entInfoDto.getPripid());
@ -182,13 +181,8 @@ public class PenaltySecurityController {
penaltyEntInfo.setEnttype(StringUtils.trimToEmpty(cleanEntTypeCode(entInfoDto.getEnttype())));
penaltyEntInfo.setUpdateTime(LocalDateTime.now());
penaltyEntInfo.setFlgDeleted("0");
if (one == null) {
penaltyEntInfo.setCreateTime(LocalDateTime.now());
penaltyEntInfoService.save(penaltyEntInfo);
} else {
penaltyEntInfo.setId(one.getId());
penaltyEntInfoService.updateById(penaltyEntInfo);
}
penaltyEntInfo.setCreateTime(LocalDateTime.now());
penaltyEntInfoService.save(penaltyEntInfo);
}
return SecurityResultAcceptVO.success(penaltyAcceptLog.getAcceptId());