REQ-3982: fix bugs

This commit is contained in:
yanglin 2025-04-29 17:47:30 +08:00
parent b9d315f4f3
commit fe1665b755
2 changed files with 6 additions and 0 deletions

View File

@ -14,6 +14,7 @@ import java.util.stream.Collectors;
import javax.annotation.Resource;
import cn.axzo.nanopart.visa.api.enums.VisaStampStatusEnum;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;
@ -171,6 +172,10 @@ public class EssAllEventHandler implements EventHandler, InitializingBean {
if (Objects.equals(EssContractState.CANCEL, contract.getState()) && optVisa.isPresent()) {
ChangeRecord changeRecord = optVisa.get();
VisaProcessPhase phase = determinePhase(changeRecord, contract);
VisaStampStatusEnum stampStatus = phase == VisaProcessPhase.PROJECT ? changeRecord.getStampStatus() : changeRecord.getStampStatusPay();
if (stampStatus == VisaStampStatusEnum.UNPRINTED) {
return;
}
VisaRelationFieldEnum fieldType = phase == VisaProcessPhase.PROJECT ? PROCESS_INSTANCE_OF_ESS
: PROCESS_INSTANCE_OF_ESS_PAY;
List<ChangeRecordRelation> visaRelations = changeRecordRelationService.findByCondition(VisaRelationDto.builder()

View File

@ -5,6 +5,7 @@ import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
import cn.axzo.nanopart.visa.api.enums.VisaStampStatusEnum;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;