diff --git a/src/main/java/net/gepafin/tendermanagement/dao/AppointmentDao.java b/src/main/java/net/gepafin/tendermanagement/dao/AppointmentDao.java index aa81aab5..0bdc8d59 100644 --- a/src/main/java/net/gepafin/tendermanagement/dao/AppointmentDao.java +++ b/src/main/java/net/gepafin/tendermanagement/dao/AppointmentDao.java @@ -166,6 +166,13 @@ public class AppointmentDao { NdganagEntity ndganagEntity = ndganagRepository.findByVatNumber(company.getVatNumber()); if (ndganagEntity != null && ndganagEntity.getNdg() != null) { ndgResponse.setNdg(ndganagEntity.getNdg()); + company.setNdg(ndganagEntity.getNdg()); + application.setNdg(ndganagEntity.getNdg()); + application.setNdgStatus(GepafinConstant.NDG_GENERATED); + application.setStatus(ApplicationStatusTypeEnum.NDG.getValue()); + + companyRepository.save(company); + applicationRepository.save(application); return ndgResponse; }