Merge remote-tracking branch 'origin/feature/REQ-3581' into feature/REQ-3581
This commit is contained in:
commit
3e9c347c67
@ -46,6 +46,7 @@ public class CompleteVisaChangeStampHandler implements ProcessInstanceEventHandl
|
||||
@Override
|
||||
public void onCompleted(ProcessInstanceDTO dto) {
|
||||
Long visaId = Long.valueOf(dto.getBusinessKey());
|
||||
log.info("CompleteVisaChangeStampHandler visaId, {}", visaId);
|
||||
Long operatorId = Optional.ofNullable(dto.getLastOperationAssigner())
|
||||
.map(e -> Long.valueOf(e.getPersonId()))
|
||||
.orElse(null);
|
||||
@ -56,20 +57,23 @@ public class CompleteVisaChangeStampHandler implements ProcessInstanceEventHandl
|
||||
.build();
|
||||
List<ChangeRecordRelation> allRecordRelations = changeRecordRelationService.findByCondition(visaRelationDto);
|
||||
|
||||
log.info("CompleteVisaChangeStampHandler allRecordRelations, {}", JSON.toJSONString(allRecordRelations));
|
||||
|
||||
List<ChangeRecordRelation> changeRecordRelations = allRecordRelations.stream()
|
||||
.filter(e -> Objects.equals(JSON.parseObject(e.getContent()).getString("approvalId"), dto.getProcessInstanceId()))
|
||||
.collect(Collectors.toList());
|
||||
if (CollectionUtils.isEmpty(changeRecordRelations)) {
|
||||
log.warn("用印审核完成数据异常,未找到对应的用印申请记录,visaId,{}; processInstanceId,{}", visaId, dto.getProcessInstanceId());
|
||||
log.warn("CompleteVisaChangeStampHandler 用印审核完成数据异常,未找到对应的用印申请记录,visaId,{}; processInstanceId,{}", visaId, dto.getProcessInstanceId());
|
||||
return;
|
||||
}
|
||||
|
||||
if (changeRecordRelations.size() > 1) {
|
||||
log.warn("用印审核完成数据异常,找到多条对应的用印申请记录,visaId,{}; processInstanceId,{}", visaId, dto.getProcessInstanceId());
|
||||
log.warn("CompleteVisaChangeStampHandler 用印审核完成数据异常,找到多条对应的用印申请记录,visaId,{}; processInstanceId,{}", visaId, dto.getProcessInstanceId());
|
||||
}
|
||||
ChangeRecordRelation changeRecordRelation = changeRecordRelations.stream()
|
||||
.findFirst()
|
||||
.get();
|
||||
log.info("CompleteVisaChangeStampHandler changeRecordRelation, {}", JSON.toJSONString(changeRecordRelation));
|
||||
|
||||
ChangeRecordRelation update = new ChangeRecordRelation();
|
||||
update.setId(changeRecordRelation.getId());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user