Merge pull request #384 from Kitzanos/fix-ndg-save-issue-prod

Cherry-pick ( Fixed NDG issue)
This commit is contained in:
Rinaldo
2026-03-03 07:56:59 +01:00
committed by GitHub

View File

@@ -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;
}